EA Indicator Values on Data Window Not Matching

 

Hi everyone,

I have written my first EA, and when I used it on a different indicator I had the MQ4 file for, it worked perfectly.  However, I did not like that indicator very much, so I implemented one I found that is more accurate and sends fewer signals.

The problem I am having is that I cannot seem to get the right indicator buffer values when using the iCustom value.  I have attached my code, and a screen shot of the issue I am seeing.  Basically the buy sell logic is this:


Buy - if buy arrow indicator buffer != EMPTY_VALUE and sell indicator value == EMPTY_VALUE

Sell - if buy arrow indicator buffer == EMPTY_VALUE and sell indicator value != EMPTY_VALUE


In the photo you can see that the sell triggers two prior to the arrow actually appearing, and nothing is showing up in the indicator values on the data window.  When you put the cursor on the arrows it does show up, and I have tried calling values 0-7 on the iCustom function, and the only values that appear are 0 and 1, with either the crazy long 214 number indicating EMPTY_VALUE or an actual price value.  Calling any other buffer # on iCustom just results in 0.0 (I have back tested over 100 times on multiple pairs).  I have also confirmed that these arrows do not repaint themselves, as I thought that might be the issue as well.


I have been reading up and studying books and following these blogs but this one has me stumped.  I am still fine tuning the actual logic, I just really need to find out the buffer values.  I have also attached the indicator (renamed for saving purposes but not my own).  Really appreciate any help I can get!  The signal works great on live trading but wanting to build the EA as this is not my full time job.

Files:
 
cgermanjr12:

Hi everyone,

I have written my first EA, and when I used it on a different indicator I had the MQ4 file for, it worked perfectly.  However, I did not like that indicator very much, so I implemented one I found that is more accurate and sends fewer signals.

The problem I am having is that I cannot seem to get the right indicator buffer values when using the iCustom value.  I have attached my code, and a screen shot of the issue I am seeing.  Basically the buy sell logic is this:


Buy - if buy arrow indicator buffer != EMPTY_VALUE and sell indicator value == EMPTY_VALUE

Sell - if buy arrow indicator buffer == EMPTY_VALUE and sell indicator value != EMPTY_VALUE


In the photo you can see that the sell triggers two prior to the arrow actually appearing, and nothing is showing up in the indicator values on the data window.  When you put the cursor on the arrows it does show up, and I have tried calling values 0-7 on the iCustom function, and the only values that appear are 0 and 1, with either the crazy long 214 number indicating EMPTY_VALUE or an actual price value.  Calling any other buffer # on iCustom just results in 0.0 (I have back tested over 100 times on multiple pairs).  I have also confirmed that these arrows do not repaint themselves, as I thought that might be the issue as well.


I have been reading up and studying books and following these blogs but this one has me stumped.  I am still fine tuning the actual logic, I just really need to find out the buffer values.  I have also attached the indicator (renamed for saving purposes but not my own).  Really appreciate any help I can get!  The signal works great on live trading but wanting to build the EA as this is not my full time job.

That is a renamed super signals indicator and it repaints. Testing only the first closed bar with it will produce results like that since the "signals" can be changed beyond that bar

Btw: attached is the original (not renamed) source of that indicator

 
Mladen Rakic:
That is a renamed super signals indicator and it repaints. Testing only the first closed bar with it will produce results like that since the "signals" can be changed beyond that bar

Btw: attached is the original (not renamed) source of that indicator


Hey Mladen,


Appreciate that!  I did not notice that it repaints as when I watch historicals I was not noticing the arrows moving around.  Is there any suggestions you would have to have them test more candles to see if it is valid, as in maybe check out two three candles in a row to call it valid?

Thanks!

Reason: