So, if I understand this correctly, BuyAtMarket(2) means the below record is used for the EntryPrice:
4/22/2008 F (Jan 09) 23.92 23.92 23.92 23.92 23.7 22.7 2 0 2
But, WL looks back at a previous bar, in this case being:
4/21/2008 F (Jan 09) 0 0 0 0 1 1 0 0 0
to determine a portfolio-based number of shares to send if it were a real market order?
Correct me if I am wrong.. the issue is that WL needs to guesstimate how many shares to purchase as part of the market order, something I take for granted when I do my own market orders I suppose. :-)
So, to work around this, I need to munge the original data series, find two consecutive days in which Open/Close/High/Low values non-zero, or write a modified BuyAtMarket function?
Is there a way I can set a preference for WL's behavior to peek at the current bar only to perform the basis calculation?
Or is there a way to specify a filter in the data series importer to ignore/drop bars that match a criteria such as zero pricing information?
In the meantime, I rewrote the WL4.5 BuyAtMarket2 in C# to use a BuyAtLimit(bar, Open[bar], signalName) as a workaround. Good enough for backtesting purposes.
CODE:
Please log in to see this code.