I am doing backtesting on a Daily Bar trading strategy. It went OK.
However, after I added [IntraBarOrderGeneration=true] at the beginning of my program and compiled ok. The chart with this strategy did not show any trades, just like there was no strategy inserted.
Anyone can help ? Thanks.
IntraBarOrderGeneration problem
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: IntraBarOrderGeneration problem
Is the 'Strategy Performance Report' also not selectable? (greyed out, not clickable).I am doing backtesting on a Daily Bar trading strategy. It went OK.
However, after I added [IntraBarOrderGeneration=true] at the beginning of my program and compiled ok. The chart with this strategy did not show any trades, just like there was no strategy inserted.
Anyone can help ? Thanks.
It might be that, with intra-bar order generation enabled, the strategy submitted several orders at the very start of the chart and build up the maximum position size there. That would prevent any orders in the same direction from firing for the remainder of the chart. Not generating any trade at all is also a possibility, of course.
But I'm speculating and assuming a lot here since there's not much information to go on. Can you perhaps share a code example or something that might give us a better understanding of the daily bar trading strategy?
Re: IntraBarOrderGeneration problem
Thanks for reminding to click 'Strategy Performance Report'. I had not even tried to click it because I saw there were no trades shown on chart.
It did have back-test but the system went 'bankrupt' after some 10 trades, when there is a market data error with extreme Low. This Low was adopted by the system when [IntraBarOrderGeneration=true] was brought into effect.
Below are the key execution control parts of my Daily Bar system,
I want the system to run at 15;53pm before the market close at 16;00pm. Then places order to enter/exit accordingly.
Thanks.
It did have back-test but the system went 'bankrupt' after some 10 trades, when there is a market data error with extreme Low. This Low was adopted by the system when [IntraBarOrderGeneration=true] was brought into effect.
Below are the key execution control parts of my Daily Bar system,
I want the system to run at 15;53pm before the market close at 16;00pm. Then places order to enter/exit accordingly.
Code: Select all
[IntraBarOrderGeneration=True]
inputs: ...
vars: ...
if (LastBarOnChart_s = True) then
RecalcLastBarAfter(30);
...vars defined
...vars calculation
IF time >= 1553 then begin
...trading logic
END;
setstoploss (...);