I am in the process of writing a simple trading system to backtest and looking for some assistance.
1. When I enter my buy condition e.g. Buy = MA(C,15) > MA(C,40) what price does it use? The Close price?
2. What price (i.e. O, C, H, L) does SetTradeDelays(1,1,1,1) use? Or does it? I am assuming it is the Open price (of the following day)?
3. Also, if I am looking to determine my position size based on the entry price, how do I do this? Does the following hold up?
PositionSize = (Risk/TrailStopAmount)*BuyPrice;
Where risk = 2% of my capital, TrailStopAmout = 2 * ATR(10) and BuyPrice = ??? (Open of the following or current day?)
As you can see I am not clear what prices are used in each of these conditions.
Thanks in advance