I`ve searched this forum for an answer to my question but I still haven`t figured it out. I hope somebody can help.
I developed a strategy that runs on 5 min Bars.Wihtin the code I added a second bar seris (1 day bars).
Here`s a piece of the code:
Add(PeriodType.Day, 1);
// Condition set: LONG ENTRY
if ( Some conditon based BarsArray[1] data) )
{
EnterLongLimit(DefaultQuantity, Close[0]*(1-Buylimit), "");
}
So, strategy runs on 5 min bars (set in the strategy window, primairy serie), while it continiously looks at 1 day Bar data (second serie). Oder entry is via limit order on the 5 min bar series (triggered if 1 Day bar serie conditions are true).
The trade results show exits before entry or both at the same time.
Also, the trade markers are all positioned at one time per day (but they do seem to indicate the correct price levels, just at the incorrect time).
All trades are ended via EXITONCLOSE setting in strategy tab.
I noticed that once I add trailingstop order (also on the 5 min bars) and the target is hit that the chart markers will be correct time wise but the Trades Tab still shows exits before entries.
I have 2 questions about this:
1) Any idea what`s causing this?
2) What would happen if traded to a live account? At what time would the trades be entered and exited?
Hope this is clear, also please see the screenshot.
Happy to provide any more info if required as I really want to understand this.
Michel
PS...CalculateOnBarClose is set to true...Setting it to False gives same result.
Thanks.
Michel
Comment