Going Crazy: OrdersTotal in backtest indicator Not work?

 

Hello all, 

I am trying to write a very short indicator that I can run in back test that will show me how deep a draw down goes during a set of tests. I am looking at Martingales type of trading systems in some EA's. If the draw downs are not too deep they will close out as profitable in the MQL4 record, but the question is how deep did they go before they came back and gave a net profit? I started to write an indicator that just reports the total number of trades in an indicator. I started an EA on the back tester and then added the indicator. It would only report then number of trade in the live part of the MT4. So, I have to conclude that the function OrdersTotal() only looks at the live portion of the tester when built into an indicator.

 So, is this true? and can I over come this?

 I would put this into an EA, but I am testing different EAs that I didn't write and don't have access to the source code.

 Does anyone know how to overcome this issue?

Thanks.  

Files:
 
jimsabast:

Hello all, 

I am trying to write a very short indicator that I can run in back test that will show me how deep a draw down goes during a set of tests. I am looking at Martingales type of trading systems in some EA's. If the draw downs are not too deep they will close out as profitable in the MQL4 record, but the question is how deep did they go before they came back and gave a net profit? I started to write an indicator that just reports the total number of trades in an indicator. I started an EA on the back tester and then added the indicator. It would only report then number of trade in the live part of the MT4. So, I have to conclude that the function OrdersTotal() only looks at the live portion of the tester when built into an indicator.

 So, is this true? and can I over come this?

 I would put this into an EA, but I am testing different EAs that I didn't write and don't have access to the source code.

 Does anyone know how to overcome this issue?

Thanks.  

Live chart and strategy tester are totally independant. There is not such things as "the live portion of the tester".

More, you can't rely on OrderTotal() as is, this function count all opened orders for all pairs from all EAs and eventual manual trade.

 
jimsabast:

Hello all, 

I am trying to write a very short indicator that I can run in back test that will show me how deep a draw down goes during a set of tests. I am looking at Martingales type of trading systems in some EA's. If the draw downs are not too deep they will close out as profitable in the MQL4 record, but the question is how deep did they go before they came back and gave a net profit? I started to write an indicator that just reports the total number of trades in an indicator. I started an EA on the back tester and then added the indicator. It would only report then number of trade in the live part of the MT4. So, I have to conclude that the function OrdersTotal() only looks at the live portion of the tester when built into an indicator.

The clue to the problem lies in the name of the Strategy Tester,  it is designed to test Strategies not Indicators,  some will work some won't.  Try calling your Indicator from the EA using iCustom() it might just work.
 

yea, that's what I thought the answer maybe, but I was hoping that someone would know a way of getting around this. 

 

Since I only the .exe to the ea's is there away that I could wrap the .exe around an other EA? I am thinking to build the an EA that would use the indicator and then call the .exe EA. That way it should perform the way I would like.

 

Thanks

Jim 

 
jimsabast:

yea, that's what I thought the answer maybe, but I was hoping that someone would know a way of getting around this. 

 

Since I only the .exe to the ea's is there away that I could wrap the .exe around an other EA? I am thinking to build the an EA that would use the indicator and then call the .exe EA. That way it should perform the way I would like.

 

Thanks

Jim 


make a template with on it your indicator and your  (testing martingale) EA

name it same name as your martingale EA

now you can do the strategytest with your indicator 

Reason: