I have [IntraBarOrderGeneration=True] in my Stratgy. I log my trades also to a file. Although multicharts puts the Sell and ButTocover when I exit a trade at the end of the bar the condition that is met is met anyway, so many files are written, almost with evey tick. How can i test that the real SELL is given at the end of the bar without changing the IntraBarOrderGeneration to false.
Entires are truly intrabar, but exists seem to be always at the end or close of the bar.
My code is something like this:
if (condition=true) then
begin
Sell ("Sell") this bar;
if LastbarOnchart() then
FileAppend("C:\temp\sell" + Numtostr(currenttime,0);
end
intrabarordergeneration behaviour
-
- Posts: 74
- Joined: 25 Aug 2007
- Been thanked: 6 times
Code: Select all
Entires are truly intrabar, but exists seem to be always at the end or close of the bar.
My code is something like this:
if (condition=true) then
begin
Sell ("Sell") next bar at Market;
if LastbarOnchart() then
FileAppend("C:\temp\sell" + Numtostr(currenttime,0);
end;[/code]