Hi,
Thanks a lot all, its working fine now.
Now, I´m having a problem in the performance, in most cases the algo is having a much better result in long trades than in the short ones, with a positive Sharp in the first and much worse negative in the second.
I can´t find anythig else in the code, and I don´t know if its only due to market prices, i.e., due to the strategy itself.
Could you give a clue on this, please?
tks! best.
PS: Bars.Symbol = "PETR3.SA"
CODE:
Please log in to see this code.
Wealth-Lab Score	5,53	57,67 -64,00  -17,56
Sharpe Ratio		0,30	0,54	 -0,40   0,03
Profit Factor		1,05	1,86 	 0,63	   0,00
Recovery Factor	0,70	1,97	 0,00	   0,00
Payoff Ratio		1,00	1,58	 0,68	   0,00
Profit / Total Bars	R$ 2,86	R$ 16,43	-R$ 13,56	-R$ 92,34