so if price reach 1.29000+-step then sell; if price reach 1.29000+-step+buffer zone pips then buy.
In details is Sell @1.29000;1.29250;1.29500;129750;1.30000 etc. and buy @1.29050;1.29300;1.29550;1.29800;1.30050 etc.
my code looks below.
Code: Select all
[IntrabarOrderGeneration = true]
inputs: priceX(1.25000),
step (0.00250),
buff (0.00050);
vars: Count(0);
Count= Count + 1;
if close = priceX + Count * step + buff then buy next bar at market;
if close = priceX + Count * step then sell short next bar at market;