This is my code to place orders:
Code: Select all
if EntriesToday(Date) = 0 then begin
Buy ( "LE" ) vNumShares shares next bar at vLongEntryPrice Stop;
Sellshort ( "SE" ) vNumShares shares next bar at vShortEntryPrice Stop;
end;
As a side note, another problem is that when I try out IntrabarOrderGeneration, I end up with different trades. I think this is because my entry prices are based on the close of a certain time. But when I use IntrabarOrderGeneration it seems to not wait for that minute to close to get the close price, it instead treats each tick as the close price... does that make sense, and if so how can I single out the close price of a specific minute when using IntrabarOrderGeneration?
Thanks!