CODE:
Please log in to see this code.
I seem to be having problems with this piece of code:
CODE:
Please log in to see this code.
As an example, I ran the code above and collected trades with entries labelled "BuyLimit". Next, i commented out one line and uncommented another:
CODE:
Please log in to see this code.
with the above changes i look at "BuyLimit2" trades and notice that some of the "BuyLimit" trades are now missing. I am lost why it is happening. I was expecting "if" to work the same way in both scenarios for BuyAtLimit entries.
in the example below there are no 9/23 and 9/24 "BuyLimit2" trades:
Position Symbol Quantity Entry Date Entry Price Exit Date Exit Price Profit % Profit $ Bars Held Profit per Bar Entry Name Exit Name MAE % MFE %
Long AA 370 9/25/2009 13.36 Open Open -2.1 ($103.60) 1 ($103.60) BuyLimit -2.69 0
Long AA 370 9/25/2009 13.36 Open Open -2.1 ($103.60) 1 ($103.60) BuyLimit2 -2.69 0
Long AA 353 9/24/2009 14.14 Open Open -7.5 ($374.18) 2 ($187.09) BuyLimit -8.06 0
Long AA 350 9/23/2009 14.26 Open Open -8.27 ($413.00) 3 ($137.67) BuyLimit -8.84 0.21