Empty Results in Strategy Tester - page 3

 
Ruptor:
This is commonly called repainting and is due to the indicator not working properly quite often predicting the future. The i-1 icondition I described in my last post could be the cause. The indicator can only show the results of real data within the buffers so if it access undefined areas the results are random and keep changing

I finally think I've fixed the issue. The memory thing was being caused by my calls to iCustom...there was a missing parameter in the call. I forgot I added an extern parameter to the Custom Indicator.

 

Well you will probably remember that fault for next time. Usually an error is generated when the EA is executed and it complains there are not enough parameters. The error & type checking is a bit hit and miss in relation to call parameters in my experience. Good luck.

 
Ruptor:

Well you will probably remember that fault for next time. Usually an error is generated when the EA is executed and it complains there are not enough parameters. The error & type checking is a bit hit and miss in relation to call parameters in my experience. Good luck.


Thanks for your help Ruptor and everyone else who contributed. Here is the final EA and I will attach the Custom Indicator to the following post.
I have one last item on the table here...also feel free to make any suggestions.

My issue is the following.....


I have a parameter in the EA named "maxOpenDirectionalTradesLimit" that I am using to limit the number of trades in any given direction.

That is....My objective is to only trigger the trade upon the instance the "Buy scenario" occurs...if the condition occurs later on while I'm already in a buy...I will take that subsequent buy position ONLY IF my maxOpenDirectionalTradesLimit has NOT been reached already.


It seems however, that if the EA observes a "Buy trigger" for example, that the first tick will trigger the trade as expected...but the next immediate tick will ALSO trigger a trade and immediately fill my maxOpenDirectionalTradesLimit. I believe it's because the relative positions of my buy/ask prices and the Moving Average are evaluated at every tick...and the "buy" condition will obviously be met at every tick after the first one until the candles move back onto the other side of the Moving Average. Any ideas on how I could control this?


Thanks again.

 
Ruptor:

Well you will probably remember that fault for next time. Usually an error is generated when the EA is executed and it complains there are not enough parameters. The error & type checking is a bit hit and miss in relation to call parameters in my experience. Good luck.


This is the new version of my EA...

Files:
 
Ruptor:

Well you will probably remember that fault for next time. Usually an error is generated when the EA is executed and it complains there are not enough parameters. The error & type checking is a bit hit and miss in relation to call parameters in my experience. Good luck.


This is the new version of my Custom Indicator....

Files:
 
Tenners:" condition will obviously be met at every tick after the first one until the candles move back onto the other side of the Moving Average. Any ideas on how I could control this?



start() {   static datetime Time0;
   bool newBar = (Time[0] > Time0);  	if (newBar) {	Time0 = Time[0];
      // Icustom and open trades only at the start of a new bar.
 
You could limit trades to one per bar as WHR suggests but I think your trade signal needs fixing. If it is a cross condition then once the cross has happened another cross can't occur until it has crossed back and taken an opposite trade. This requires extra logic to get what you really want.
 
Ruptor:
You could limit trades to one per bar as WHR suggests but I think your trade signal needs fixing. If it is a cross condition then once the cross has happened another cross can't occur until it has crossed back and taken an opposite trade. This requires extra logic to get what you really want.

Thanks again for your input WHRoeder and Ruptor...it is greatly appreciated. I will continue tinkering and keep you posted.

Reason: