Skip to content

Instantly share code, notes, and snippets.

View siralam's full-sized avatar

Sira siralam

  • Hong Kong
View GitHub Profile
@siralam
siralam / Camear2Preview.java
Last active December 17, 2021 09:02
Zoomable Camera2Preview, but cannot gain focus on 2nd capture after zoomed.
package cameraview.com.cameraview;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.ImageFormat;
import android.graphics.Matrix;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.SurfaceTexture;
@siralam
siralam / ATR_RSI_MACD.pine
Last active October 22, 2023 11:19
TradingView: ATR + RSI + MACD
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © szewa1992
//@version=4
study("MACD + ATR + RSI", resolution="", overlay=false)
displayATR = input(title="Display ATR?", type=input.bool, defval=true)
displayRSI = input(title="Display RSI?", type=input.bool, defval=false)
displayMACD = input(title="Display MACD?", type=input.bool, defval=true)