To try and understand what the problem might be, I ran the SampleMACrossover strategy with 1 min/5 min just to generate a lot of orders. When the strategy starts, it thinks it is long (assuming of course 1MA > 5MA), but does not actually place an order to get there. Then, when the next crossover occurs, it does place an order to close the position, and then the additional short order. The strategy thinks it is 100S, while the account thinks it is 200S because the initial long order was never placed.
Is this a bug or am I misunderstanding something?
Thanks.
Pete
Comment