I'm writing an indicator that uses OrdersHistoryTotal() in the calculation. I'd like to test it in strategy tester but it's not working. I've attached the indicator to the chart window I am running the test on and the Print statement in the code below returns zero every time.
The function works fine on a live chart. But in strategy tester I just get zeros. Should this work? Am I misunderstanding how indicators work in the strategy tester?
This is my first time writing an indicator...
Thanks in advance for any help!