Prova questo, dovrebbe andare bene, provato sul Dax a 15m (Roberto magari controlla).
defParam cumulateOrders = false
defparam flatAfter = 220000
positionSize = 1
//—————————————————
pivot = (dHigh(1) + dLow(1) + dClose(1))/3
myPerc = 0.75
xPerc = (close*myPerc/100)/pointSize
myTargetL = pivot + xPerc
myTargetS = pivot – xPerc
myStopL = 0.5
myStopS = 0.5
if not onMarket and close crosses over pivot then
buy positionSize contracts at market
set stop %Loss myStopL
set target price myTargetL
endif
if not onMarket and close crosses under pivot then
sellShort positionSize contracts at market
set stop %Loss myStopS
set target price myTargetS
endif
//————————————————
graphOnPrice pivot
graphOnPrice myTargetL
graphOnPrice myTargetS
1 user thanked author for this post.