buy order
a:= If(Ref(ROC(C,3,%) > Mov(ROC(C,3,%), 8,S),-1) AND ROC(C,3,%) > Mov( ROC(C,3,%),8, S),1,-1); {condition 1}
b:= If(C>Mov(H,13,S)AND ref(C>Mov(H,13,S),-1),1,-1); {condition 2}
d:= If(C>Mov(H,9,S),1,-1); {condition 3}
g:= if(WillR(11)>-50,1,-1); {condition 4}
a + b + d + g
sell short order
a:= If(Ref(ROC(C,3,%) < Mov(ROC(C,3,%), 8,S),-1) AND ROC(C,3,%) < Mov( ROC(C,3,%),8, S),1,-1); {condition 1}
b:= If(Ref(Mov(L,4,S)>C,-1) AND Mov(L,4,S)>C,1,-1); {condition 2}
d:= If(Mov(L,7,S)>C,1,-1); {condition 3}
g:= if(WillR(11)<-50,1,-1); {condition 4}
a + b + d + g
OK, although we have deviated from the initial question about one specifically built indicator ranging from Trade Long to Trade Short we have now got a couple of binary waves to consider.
Lets look at the next step.
buy order
a:= If(Ref(ROC(C,3,%) > Mov(ROC(C,3,%), 8,S),-1) AND ROC(C,3,%) > Mov( ROC(C,3,%),8, S),1,-1); {condition 1}
b:= If(C>Mov(H,13,S)AND ref(C>Mov(H,13,S),-1),1,-1); {condition 2}
d:= If(C>Mov(H,9,S),1,-1); {condition 3}
g:= if(WillR(11)>-50,1,-1); {condition 4}
wavetally := a + b + d + g; {results will range from +4 to -4}
buy := wavetally>=
? {change the red ? to a value from +4 to -4}
Lets apply the same logic to a sell order.
sell short order
a:= If(Ref(ROC(C,3,%) < Mov(ROC(C,3,%), 8,S),-1) AND ROC(C,3,%) < Mov( ROC(C,3,%),8, S),1,-1); {condition 1}
b:= If(Ref(Mov(L,4,S)>C,-1) AND Mov(L,4,S)>C,1,-1); {condition 2}
d:= If(Mov(L,7,S)>C,1,-1); {condition 3}
g:= if(WillR(11)<-50,1,-1); {condition 4}
wavetally := a + b + d + g; {results will range from +4 to -4}
sell short := wavetally>=
? {change the red ? to a value from +4 to -4}
Given now that you have built a new Buy Indicator & Sell Indicator try attaching these indicators to a chart (in a separate window) and compare your signals to current price trends etc. etc.
Hopefully this has been of some help.
😀