Empty Results in Strategy Tester - page 2

 

It would make things easier if you attached the 2 code files that way we could read them with preserved format. These listings put me off.

 
Ruptor:

It would make things easier if you attached the 2 code files that way we could read them with preserved format. These listings put me off.

I second that.


Tenners: Long code should be attached as a file, short code should be pasted in code blocks:


 
gordon:

I second that.


Tenners: Long code should be attached as a file, short code should be pasted in code blocks:


Sorry about that Ruptor and gordon...here is my custom indicator

Files:
 
gordon:

I second that.


Tenners: Long code should be attached as a file, short code should be pasted in code blocks:


And here is the expert...

Files:
 
Your indicator doesn't give correct values from the looks of it. ie. there is [i-1] so if i =0 the subscript is illegal. I suggest you make things easier by using another buffer to return a buy and sell signal set as 1,-1 or 0 for no trade then in the EA you can just check for those values rather than try and decifer the empty values of the 2 arrow buffers also it would only require one call and speed things up. Put a comment in the indicator that puts the value of the new buffer to the chart screen then check it works.
 
Ruptor:
Your indicator doesn't give correct values from the looks of it. ie. there is [i-1] so if i =0 the subscript is illegal. I suggest you make things easier by using another buffer to return a buy and sell signal set as 1,-1 or 0 for no trade then in the EA you can just check for those values rather than try and decifer the empty values of the 2 arrow buffers also it would only require one call and speed things up. Put a comment in the indicator that puts the value of the new buffer to the chart screen then check it works.

Hi Ruptor,

Sorry it has taken me this long to get back to you but I had to go away for a bit.

Thank you for your attention and I understand what you're saying. I will try to do this...I have gotten a working version of the indicator/EA combined...but it's still a work in progress.

This is my 1st attempt at building a system. I will keep you posted on my progress....

 
Ruptor:
Your indicator doesn't give correct values from the looks of it. ie. there is [i-1] so if i =0 the subscript is illegal. I suggest you make things easier by using another buffer to return a buy and sell signal set as 1,-1 or 0 for no trade then in the EA you can just check for those values rather than try and decifer the empty values of the 2 arrow buffers also it would only require one call and speed things up. Put a comment in the indicator that puts the value of the new buffer to the chart screen then check it works.

Oh...one more thing. Have you ever encountered a scenario where your indicator "arrows" or whatever you use...appear in the right places, but disappear for some reason?

I have a sneaky suspicion it may be because of the moving average changing, but this happens even when the indicator arrow has been on the chart 3 candles ago (sometimes).

I can't figure out what is causing it.


It comes on the chart....EA takes the trade...then *POOF*...on another tick later on the arrow is gone!

What gives?

 
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
 
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 see. Ok, I will address the problem and let you know the result again.

 
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

Hey Ruptor,

I believe I have solved the "vanishing arrow" act. I also created a new buffer to hold the Trade Signal values like you suggested. But it appears I have run into something far more sinister. I looked through the forums to see if anyone had ever had a similar issue and it seems as though YOU have...so maybe you found a solution.


When I use my custom indicator on a chart, everything is fine, but when I run the corresponding EA (which I modified a little)....it causes the meta trader to use all my machine's virtual memory! And only when I stop the expert or kill Meta Trader will my computer start acting normal again.


Do you know what could be causing this?

Reason: