I have a little issue i am sure one of you codewizards can help with.
My main strategy methid is the this
protected override void OnBarUpdate() { if(Time[0].Hour == 15 && Time[0].Minute == 30)//Last 1 min bar before open { if(Open[0] < Close[0])//Up Bar { SetupTrade(1); } else if(Open[0] > Close[0])//Down Bar { SetupTrade(0); } else if(Open[0] == Close[0]) { if(Open[1] < Close[1]) SetupTrade(1); else SetupTrade(0); } } }
private void SetupTrade(int direction) { if(direction == 1) { EnterLongStopMarket(1, High[0] ,"NQUP"+CurrentBar); } else { EnterShortStopMarket(1, Low[0], "NQDOWN"+CurrentBar); } //SetProfitTarget(CalculationMode.Ticks, 20); SetTrailStop(CalculationMode.Ticks, TrailingStop); }
Calculate = Calculate.OnEachTick;
If i set
Calculate = Calculate.OnBarClose;
So is there a way to get the method firing precisly at 15.30 GMT+1 / 9.30 EST and at the same time have the trailingstop react to every tick ?
Best Regards,
Sune
Comment