I'm using a strategy with 2 Data Series.
- M3 chart
- 5 Seconds Chart (in the background / should only be for trade)
When testing with "historical" state, I always get an error message.
int index = 1; // for the 5 second chart
bool isLiveUntilCancelled = true;
double price = 1733.2; // Low Price of 5 Seconds Chart
string name = "example";
// Entry: 16.06.2020 21:03:25 (GC)
EnterLongLimit(index, isLiveUntilCancelled, 1, price, name);
// in the M3 chart, the stop is below the low
// Stop Time 16.06.2020 21:03:35 (GC)
double price = 1733;
ExitLongStopLimit(index, isLiveUntilCancelled, 1, price, price, "Stop " + name, name);
This stop loss also works.
but
// in the 5 second chart, the stop is below the low.
double price = 1733.1;
// Stop Time 16.06.2020 21:03:35 (GC)
ExitLongStopLimit(index, isLiveUntilCancelled, 1, price, price, "Stop " + name, name);
A Sell stop order placed at '16.06.2020 21:03:00' has been ignored since the stop price is greater than or equal to the close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.
Why is that?
Should you use the small timeframe as the primary chart and the larger timeframe in the background?
I want the orders to be executed on the 5 second chart, but it seems like the bars from the M3 are taken into account. Or am I doing something wrong?
Comment