This morning I placed my order via the my automated strategy and it placed the order at the wrong time.
It is only supposed to place the order when the 10:00 candle starts (9:00 AM Computer time, but 10:00 candle time stamp). I set the order at about 8:45 and expected that it would auto place the order when my computer reached 9:0 am
Here is the code that deals with that particular order placement:
else if (direction == TrendDirection.Down) { if (ShortEntry == null && ToTime(Time[0]) == ToTime(endRangeHr,endRangeMin,00) && ToTime(Time[0]) < ToTime(removeOrderHr, removeOrderMin,0) && restrictTrade == false) { ShortEntry = EnterShortStop(0, true, positionSize, ShortEntryPrice, "BreakoutShort"); }
[Description("Range End Hour")] [GridCategory("Parameters")] [Gui.Design.DisplayName("2 End Range Hr")] public int EndRangeHr { get { return endRangeHr; } set { endRangeHr = value; } }
I can not find any reason why this would have set the order prior to the 10:00 Candle (9:00 Computer time). Can you please see if you can find a possibility and let me know.
Thank you!
Comment