Академический Документы
Профессиональный Документы
Культура Документы
#http://www.optionstrategi.com/
###########################################################
declare upper;
input n = 5;
#TTM_Squeeze
input nK = 1.5;
input displaceTTM = 0;
rec countTTM = if TTM_UP == 1 and countTTM[1] == 0 then 1 else if TTM_DN == 0 and countTTM[1] >= 1
then countTTM[1] + 1 else 0;
rec countTTM1 = if TTM_DN == 1 and countTTM1[1] == 0 then 1 else if TTM_UP == 0 and countTTM1[1]
>= 1 then countTTM1[1] + 1 else 0;
#ADX
def up = (ADXsignal >= 27) and (ADXsignal <= 75) and (ADXsignal > ADXsignal[1]);
#MACD
input fastLength = 8;
input MACDLength = 9;
AssignPriceColor(if MACD1 > Avg then Color.BLUE else if MACD1 < Avg then Color.RED else
Color.CURRENT);
rec count = if MACD_UP == 1 and count[1] == 0 then 1 else if MACD_DN == 0 and count[1] >= 1 then
count[1] + 1 else 0;
rec count1 = if MACD_DN == 1 and count1[1] == 0 then 1 else if MACD_UP == 0 and count1[1] >= 1 then
count1[1] + 1 else 0;
########CEK BB
input DisplaceBB = 0;
#####ATR#####
input ATR_Period = 5;
#######################################################
plot CALL = PointCALL and PointUp and DotUp and DotTTMUp and up and BBup and slopUp ;
CALL.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
CALL.SetDefaultColor(Color.BLUE);
CALL.SetLineWeight(4);
plot PUT = PointPUT and PointDn and DotDn and DotTTMDn and up and BBdn and slopdn;
PUT.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
PUT.SetDefaultColor(Color.RED);
PUT.SetLineWeight(4);
#Ob/Os
plot OB = If( ( WR[1] < overBought ) and ( WR[0] > overBought ), high, Double.NaN );
OB.SetStyle( Curve.POINTS );
OB.SetDefaultColor( Color.BLACK );
OB.SetLineWeight(4);
AddLabel(bisConfirmed, " SIAP2 CALL ", if bisConfirmed then Color.BLUE else Color.BLUE);
SignalCALL.SetPaintingStrategy( PaintingStrategy.ARROW_UP );
SignalCALL.SetDefaultColor( Color.DARK_GREEN);
SignalCALL.SetLineWeight(2);
Alert(SignalCALL, "SIAP2 CALL !!!! Perhatikan Trend, Hindari Candle panjang", Alert.BAR, Sound.Ding);
OS.SetStyle( Curve.POINTS );
OS.SetDefaultColor( Color.BLACK );
OS.SetLineWeight(4);
AddLabel(sisConfirmed, " SIAP2 PUT ", if sisConfirmed then Color.RED else Color.RED);
signalPUT.SetPaintingStrategy( PaintingStrategy.ARROW_DOWN );
signalPUT.SetDefaultColor( Color.DARK_RED );
signalPUT.SetLineWeight(2);
Alert(signalPUT, "SIAP2 PUT !!!! Perhatikan Trend ,hindari Candle panjang", Alert.BAR, Sound.Ding);
#Update by OS
#http://www.optionstrategi.com/
###########################################################
input displace = 0;
input MA1_length = 3;
DefineGlobalColor("RisingMA", color.BLUE);
DefineGlobalColor("FallingMA", color.RED);
def SMA1;
switch (SimpleMovingAvg) {
case Simple:
case Weighted:
case Hull:
case Variable:
plot Trend1;
switch (movingAverageType2) {
case Simple:
case Exponential:
case Weighted:
case Hull:
case Variable:
Trend1.SetLineWeight(4);
Trend1.HideBubble();
Slooping.AssignValueColor(if sma3 > sma15[1] then color.GREEN else (if sma3 < sma15[1] then
color.MAGENTA else color.YELLOW));
Slooping.SetLineWeight(2);
#addLabel(yes,"", color.blue);
DA shortly entry
#MACD
input fastLength = 8;
input MACDLength = 9;
AssignPriceColor(if MACD1 > Avg then Color.BLUE else if MACD1 < Avg then color.RED else color.current);
rec count1=if MACD_DN==1 and count1[1]==0 then 1 else if MACD_UP==0 and count1[1]>=1 then
count1[1]+1 else 0;
#######
UpperLR.setlineWeight(2);
UpperLR.setdefaultColor(color.red);
LowerLR.setlineWeight(2);
LowerLR.setdefaultColor(color.BLUE);
CALL.setlineWeight(4);
CALL.setpaintingStrategy(paintingStrategy.BOOLEAN_ARROW_UP);
CALL.setdefaultColor(color.BLUE);
PUT.setlineWeight(4);
PUT.setpaintingStrategy(paintingStrategy.BOOLEAN_ARROW_DOWN);
PUT.setdefaultColor(color.RED);
AddLabel(CALL, " Short CALL ", if CALL then Color.BLUE else color.BLUE);
AddLabel(PUT , " Short PUT ", if PUT then Color.RED else Color.RED);
######################HL#########
ATR REVERSAL
declare upper;
Input Digit = 3;
def ATR_over = DeltaATR <= 0; AddLabel(yes, "ATR Kemarin : "+ round(ATR_Kemarin,Digit)+" >> Sekarang
: "+ round(ATR_hari_ini,digit), if DeltaATR > 0 then Color.BLUE else Color.RED);
declare upper;
Input Digit = 3;
DA LOWER
#http://www.optionstrategi.com/
###########################################################
declare lower ;
input MACDLength = 9;
#input simpleMovingAvg=0;
BB_Upper.SetDefaultColor(Color.GRAY);
BB_Lower.SetDefaultColor(Color.GRAY);
BB_Midline.SetDefaultColor(Color.GRAY);
BB_Midline.SetStyle(Curve.SHORT_DASH);
MACD_Line.SetDefaultColor(Color.WHITE);
MACD_Dots.SetStyle(Curve.FIRM);
MACD_Dots.SetLineWeight(3);
plot zero = 0;
zero.SetLineWeight(2);
AddVerticalLine(zero, " CROSS ", if MACD_Line < 0 then Color.RED else Color.BLACK);
#RSI#
#declare lower;
plot dmi1 = if DMI(length = 14)."DI+" >= DMI(length = 14)."DI-" then 1.75 else 1.5;
plot dmi2 = if DMI(length = 14)."DI+" < DMI(length = 14)."DI-" then 1.75 else 1.5;
rsi1.SetDefaultColor(Color.GREEN);
rsi2.SetDefaultColor(Color.RED);
dmi1.SetDefaultColor(Color.GREEN);
dmi2.SetDefaultColor(Color.RED);
sto1.SetDefaultColor(Color.GREEN);
sto1.SetLineWeight(1);
sto2.SetDefaultColor(Color.RED);
sto2.SetLineWeight(1);
#addLabel(yes,"Diamond", color.dark_green);