Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629
|
alexbellinzona,
the code you posted should work fine in backtesting and live trading. Based on that the problem might be related to something else, which is hard to tell without knowing your full code and the exact steps you did to produce this situation.
For example barssinceentry will not rememeber the hístory when you assign a broker position to your signal when you enable the automation. This could lead to something appearing to be off, but without knowing what you did, this is just meant to be an example of what can go wrong and not as explanation.
Regards,
ABCTG
|