I have a couple questions after practicing some programming.
I'm trying to understand how to get multiple timeframes for a strategy. I'm looking at this simple strategy using a day primary bar series and tried adding an additional bar series to get a quicker signal for trading. but when I add the bar series (a 30 minute series) and the BarsInProgress == 0, it does not work. If I remove the BarsSinceEntry or BarsSinceExit, then it works, but then that changes the logic. What is wrong here? I simply want to be able to get a signal the same day it is triggered instead of waiting for the next day because I don't have a shorter bar series.
Also, I have a general question regarding the cumulative profit calculation. Specifically, when this particular strategy enters two positions at the same time, I'm unable to follow the logic in the profit calculation. If for example, the first position produces 6.88% profit and the second position produces 4.91% profit, the total it calculates for the cumulative is 12.13%. Why is this,and more importantly, is this correct for this logic?? I understand how the cumulative profit is calculated, but I guess I don't believe that this is correct for this since they are parallel trades. I do not claim to be an expert, so I'm looking for some insight here. If these trades were entered at the same time, with the same quantity, why would the cumulative profit be 12.13% instead of 11.79% ?
Thanks for the help,
Regards,
Lee
Comment