Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
Indicator
Balance of power
THL:=If(H-L=0,.00001,H-L);
{Reward Based on the Open}
BuRBoO:=(H-O)/(THL);
BeRBoO:=(O-L)/(THL);
{Reward Based on the Close}
BuRBoC:=(C-L)/(THL);
BeRBoC:=(H-C)/(THL);
{Reward Based on the Open-Close}
BuRBoOC:=If(C>O,(C-O)/(THL),0);
BeRBoOC:=If(C>O,0,(O-C)/(THL));
BOP:=(BuRBoO+BuRBoC+BuRBoOC)/3 - (BeRBoO+BeRBoC+BeRBoOC)/3;
Sig:=Mov(Bop,14,S);
Sig;
BOP;
Expert
you will need the PowerPivots Plus Add-on for this expert to work
Highlights
Long
TD:=ExtFml("PowerPivots.TrendDirection",1,2);
THL:=If(H-L=0,.00001,H-L);
{Reward Based on the Open}
BuRBoO:=(H-O)/(THL);
BeRBoO:=(O-L)/(THL);
{Reward Based on the Close}
BuRBoC:=(C-L)/(THL);
BeRBoC:=(H-C)/(THL);
{Reward Based on the Open-Close}
BuRBoOC:=If(C>O,(C-O)/(THL),0);
BeRBoOC:=If(C>O,0,(O-C)/(THL));
BOP:=(BuRBoO+BuRBoC+BuRBoOC)/3 - (BeRBoO+BeRBoC+BeRBoOC)/3;
Sig:=Mov(Bop,14,S);
A:=If(Sig>0 AND TD>0,-1,If(Sig<0 AND TD<0,1,0));
A=-1
Short
TD:=ExtFml("PowerPivots.TrendDirection",1,2);
THL:=If(H-L=0,.00001,H-L);
{Reward Based on the Open}
BuRBoO:=(H-O)/(THL);
BeRBoO:=(O-L)/(THL);
{Reward Based on the Close}
BuRBoC:=(C-L)/(THL);
BeRBoC:=(H-C)/(THL);
{Reward Based on the Open-Close}
BuRBoOC:=If(C>O,(C-O)/(THL),0);
BeRBoOC:=If(C>O,0,(O-C)/(THL));
BOP:=(BuRBoO+BuRBoC+BuRBoOC)/3 - (BeRBoO+BeRBoC+BeRBoOC)/3;
Sig:=Mov(Bop,14,S);
A:=If(Sig>0 AND TD>0,-1,If(Sig<0 AND TD<0,1,0));
A=1
Out
TD:=ExtFml("PowerPivots.TrendDirection",1,2);
THL:=If(H-L=0,.00001,H-L);
{Reward Based on the Open}
BuRBoO:=(H-O)/(THL);
BeRBoO:=(O-L)/(THL);
{Reward Based on the Close}
BuRBoC:=(C-L)/(THL);
BeRBoC:=(H-C)/(THL);
{Reward Based on the Open-Close}
BuRBoOC:=If(C>O,(C-O)/(THL),0);
BeRBoOC:=If(C>O,0,(O-C)/(THL));
BOP:=(BuRBoO+BuRBoC+BuRBoOC)/3 - (BeRBoO+BeRBoC+BeRBoOC)/3;
Sig:=Mov(Bop,14,S);
A:=If(Sig>0 AND TD>0,-1,If(Sig<0 AND TD<0,1,0));
A=0
Symbols
Long Entry
TD:=ExtFml("PowerPivots.TrendDirection",1,2);
THL:=If(H-L=0,.00001,H-L);
{Reward Based on the Open}
BuRBoO:=(H-O)/(THL);
BeRBoO:=(O-L)/(THL);
{Reward Based on the Close}
BuRBoC:=(C-L)/(THL);
BeRBoC:=(H-C)/(THL);
{Reward Based on the Open-Close}
BuRBoOC:=If(C>O,(C-O)/(THL),0);
BeRBoOC:=If(C>O,0,(O-C)/(THL));
BOP:=(BuRBoO+BuRBoC+BuRBoOC)/3 - (BeRBoO+BeRBoC+BeRBoOC)/3;
Sig:=Mov(Bop,14,S);
A:=If(Sig>0 AND TD>0,-1,If(Sig<0 AND TD<0,1,0));
A=-1 AND Ref(A,-1)>-1
Short Entry
TD:=ExtFml("PowerPivots.TrendDirection",1,2);
THL:=If(H-L=0,.00001,H-L);
{Reward Based on the Open}
BuRBoO:=(H-O)/(THL);
BeRBoO:=(O-L)/(THL);
{Reward Based on the Close}
BuRBoC:=(C-L)/(THL);
BeRBoC:=(H-C)/(THL);
{Reward Based on the Open-Close}
BuRBoOC:=If(C>O,(C-O)/(THL),0);
BeRBoOC:=If(C>O,0,(O-C)/(THL));
BOP:=(BuRBoO+BuRBoC+BuRBoOC)/3 - (BeRBoO+BeRBoC+BeRBoOC)/3;
Sig:=Mov(Bop,14,S);
A:=If(Sig>0 AND TD>0,-1,If(Sig<0 AND TD<0,1,0));
A=1 AND Ref(A,-1)<1
Long Exit
TD:=ExtFml("PowerPivots.TrendDirection",1,2);
THL:=If(H-L=0,.00001,H-L);
{Reward Based on the Open}
BuRBoO:=(H-O)/(THL);
BeRBoO:=(O-L)/(THL);
{Reward Based on the Close}
BuRBoC:=(C-L)/(THL);
BeRBoC:=(H-C)/(THL);
{Reward Based on the Open-Close}
BuRBoOC:=If(C>O,(C-O)/(THL),0);
BeRBoOC:=If(C>O,0,(O-C)/(THL));
BOP:=(BuRBoO+BuRBoC+BuRBoOC)/3 - (BeRBoO+BeRBoC+BeRBoOC)/3;
Sig:=Mov(Bop,14,S);
A:=If(Sig>0 AND TD>0,-1,If(Sig<0 AND TD<0,1,0));
A=0 AND Ref(A,-1)=-1
Short Exit
TD:=ExtFml("PowerPivots.TrendDirection",1,2);
THL:=If(H-L=0,.00001,H-L);
{Reward Based on the Open}
BuRBoO:=(H-O)/(THL);
BeRBoO:=(O-L)/(THL);
{Reward Based on the Close}
BuRBoC:=(C-L)/(THL);
BeRBoC:=(H-C)/(THL);
{Reward Based on the Open-Close}
BuRBoOC:=If(C>O,(C-O)/(THL),0);
BeRBoOC:=If(C>O,0,(O-C)/(THL));
BOP:=(BuRBoO+BuRBoC+BuRBoOC)/3 - (BeRBoO+BeRBoC+BeRBoOC)/3;
Sig:=Mov(Bop,14,S);
A:=If(Sig>0 AND TD>0,-1,If(Sig<0 AND TD<0,1,0));
A=0 AND Ref(A,-1)=1
|