This is saved
as 2 seperate indicators:
a)
MY_TRADING_SYSTEM_2
mySAR:=SAR(0.075, 0.75);
LE:=
O > Mov(C, 50, W) AND
Mov(O, 21, W) > Mov(O, 38, E) AND
Mov(C, 5, W) > Mov(C, 13, W) AND
L > SAR(0.075, 0.75) AND
Fml( "Bull Power/Bear Power Histogram +") > 0;
LX:= O < mySAR;
SE:=
O < Mov(C, 50, W) AND
Mov(O, 21, W) < Mov(O, 38, E) AND
Mov(C, 5, W) < Mov(C, 13, W) AND
L < SAR(0.075, 0.75) AND
Fml( "Bull Power/Bear Power Histogram -") < 0;
SX:= O > mySAR;
{the latch}
ExtFml("ForumEquis.Latch", LE, LX, SE, SX);
b)
MY_TRADING_SYSTEM_3
mySAR:=SAR(0.075, 0.75);
LE:=
O > Mov(C, 50, W) AND
Mov(O, 21, W) > Mov(O, 38, E) AND
Mov(C, 5, W) > Mov(C, 13, W) AND
L > SAR(0.075, 0.75) AND
Fml( "Bull Power/Bear Power Histogram +") > 0;
LX:= L <= (Mov(Mov(O,50,W)-(
Mov(O,50,W)*(2.0/100)),5,W));
SE:=
O < Mov(C, 50, W) AND
Mov(O, 21, W) < Mov(O, 38, E) AND
Mov(C, 5, W) < Mov(C, 13, W) AND
L < SAR(0.075, 0.75) AND
Fml( "Bull Power/Bear Power Histogram -") < 0;
SX:= H >= (Mov(Mov(O,50,W)+(
Mov(O,50,W)*(2.0/100)),5,W));
{the latch}
ExtFml("ForumEquis.Latch", LE, LX, SE, SX);
####### END of INDICATORs ################
EXPERT Advisor for
LONG Trades (this is only for the „timeline“ green, red, blue..)
Bullish:
O > Mov(C, 50, W) AND
Mov(O, 21, W) > Mov(O, 38, E) AND
Mov(C, 5, W) > Mov(C, 13, W) AND
L > SAR(0.075, 0.75) AND
Fml( "Bull Power/Bear Power Histogram +") > 0
Bearish:
L <= (Mov(Mov(O,50,W)-( Mov(O,50,W)*(2.0/100)),5,W))
Symbols in
the LONG expert:
reBUY Long (green dots)
Z:= Fml( "MY_TRADING_SYSTEM_2");
Z=1 AND Ref(Z,-1)<>1;
HHV Long 2nd BUY (violet dots)
x:=1;
type:=1;
depth:=1;
pds:=20;
xHi:=If(x=1,H,C);
xLo:=If(x=1,L,C);
Hi:=(HHV(xHi,pds-1)>xHi)>Ref(HHV(xHi,pds-1)>xHi,-1);
HiVal1:=ValueWhen(1,Hi,Ref(xHi,-1));
Lo:=(LLV(xLo,pds-1)<xLo)>Ref(LLV(xLo,pds-1)<xLo,-1);
LoVal1:=ValueWhen(1,Lo,Ref(xLo,-1));
Hi:=Hi AND HiVal1>LoVal1*(1+depth/100);
Lo:=Lo AND LoVal1<HiVal1*(1-depth/100);
supp:=ValueWhen(1,Lo,Ref(xLo,-1));
res:=ValueWhen(1,Hi,Ref(xHi,-1));
comb:=If(BarsSince(Hi)<BarsSince(Lo),res,supp);
suppH:=Trough(1,xLo,depth);
supp:=If(type=1,supp, suppH);
If(C > res, 1,0) AND L > HHV(Ref(H, -1),5);
++ maybe here is not all needed, like combo and so.. i just reduced the code from another "script" until it fitted .. maybe only the half is needed and produces the same? ++
EXIT (blue EXIT sign)
{LongExit Symbol}
Z:=Fml("MY_TRADING_SYSTEM_3");
Z<>1 AND Ref(Z,-1)=1;