I wanted to backtest an idea but the entry is calculated on the openprice and an immediate entry (at open) when certain criteria is confirmed. The exit would be the close of that same bar (close).
I can close the order with the command “sell this bar on close”.
The only way to open an order according the documentation is with the bar close or next bar open.
Is there a way to open at this bar on open and close the position on the same bar close?
In the way…
Code: Select all
Condition1=open>something;
If condition1 then
buy this bar on open;
If marketcondition=1 then
Sell this bar on close;
I know this could be done by a smaller timeframe and intrabarordergeneration but I don’t have smaller TimeFrame date. I do think this would be unnecessary since I have all data I need on that timeframe since I only require the OHLC data.
I have done this with Excel but MC has a great backtest function and the backtestresults are way better then from that what I get from Excel.