inputs:
Rlth(18),
Rpnt(9.8),
Lots(1);
variables:
mhihest(0),
mlesiow(0),
Nechane(0),
outprice(0);
mhihest=Highest(high,Rlth);
mlesiow = Lowest(Low,Rlth);
Nechane = (mhihest - mlesiow)/((mhihest + mlesiow)*0.5)*100;
If (MarketPosition<>1 And Nechane<=Rpnt) then
buy Lots shares next bar at mhihest stop;
If (MarketPosition<>-1 And Nechane<=Rpnt) then
sellshort Lots shares next bar at mlesiow stop;
If (MarketPosition<>1 And Nechane<=Rpnt) then
buy Lots shares next bar at mhihest stop;
If (MarketPosition<>-1 And Nechane<=Rpnt) then
sellshort Lots shares next bar at mlesiow stop;