How can I Make a Expert Advisor from this Indicator - page 2

 
Vitalii Ananev:

The code of the indicator shows that the zero buffer is the yellow arrow, and the first buffer is the lime arrow.

#property indicator_color1 Yellow

#property indicator_color2 Lime

A strong sale will be

Strong  buy

All this can be seen from the source code of the indicator.

Where b1 [] is the zero buffer b2 [] is the first buffer b3 [] is the second buffer and b4 [] is the third buffer.

I am testing my EA and at times trades are taken when only the "X" appears without the arrow. Also the entry conditions seem to be reentered multiple times. Not sure what's causing that too. Generally, my EA has the same condition for open buy/close sell and open sell close buy so that it enters a new trade when it exits one in the opposite direction. Please see my current EA attached.
Files:
SSEA.mq4  10 kb
 
Pipillioniare:
I am testing my EA and at times trades are taken when only the "X" appears without the arrow. Also the entry conditions seem to be reentered multiple times. Not sure what's causing that too. Generally, my EA has the same condition for open buy/close sell and open sell close buy so that it enters a new trade when it exits one in the opposite direction. Please see my current EA attached.

You have mistake. You are using a signal on the zero bar. The zero bar is the current bar, it is not yet fully formed. Therefore, there will be false signals. You need to use the bar with the number one. Look at the example I wrote to you earlier.

  double buf0 = iCustom(NULL, 0, "Super Signal v3d", 21, 14, true, false, false, false, false, 0, BAR_INDEX);

  double buf2 = iCustom(NULL, 0, "Super Signal v3d", 21, 14, true, false, false, false, false, 2, BAR_INDEX);

  double buf1 = iCustom(NULL, 0, "Super Signal v3d", 21, 14, true, false, false, false, false, 1, BAR_INDEX);

  double buf3 = iCustom(NULL, 0, "Super Signal v3d", 21, 14, true, false, false, false, false, 3, BAR_INDEX);

You have BAR_INDEX equal to zero, it means the current bar.


One more remark. It is not necessary to check the indicator values on each new tick. It is enough to do it once when there is a new bar.

 
This indicator is not suitable for trading. The last value of the indicator is redrawn. Good entry points, it only shows on history.
 
Vitalii Ananev:

You have mistake. You are using a signal on the zero bar. The zero bar is the current bar, it is not yet fully formed. Therefore, there will be false signals. You need to use the bar with the number one. Look at the example I wrote to you earlier.

You have BAR_INDEX equal to zero, it means the current bar.


One more remark. It is not necessary to check the indicator values on each new tick. It is enough to do it once when there is a new bar.

Thanks for your reply and sorry for not replying early. I didn’t have access to my trading PC for a while. I changed it to the first bar as you recommended. That helped a bit. How do I check the indicator value only once when there is a new bar?
 
Vitalii Ananev:
This indicator is not suitable for trading. The last value of the indicator is redrawn. Good entry points, it only shows on history.
Thanks once again for your help. I don’t understand “The last value of the indicator is redrawn. Good entry points, it only shows on history.” Do you mind explaining this further? I feel I can make some modifications to this indicator or combine it with some other indicators to improve it considerably. Also, there are times that it should take more than one trade (when there are two consecutive strong buy/sell signals without any corresponding reverse signal), but it only takes one without taking the other. How can I, for example, take one strong buy trade (with the default lot size 0.01) and take a second consecutive strong buy trade (with an increased lot size to 0.02, third consecutive at 0.03 and so on) and exit all the strong buy trades when a strong sell trade comes between the consecutive strong buys? I know this is a mouth full, but I’m really not sure how to do this.
 
Pipillioniare:
Thanks once again for your help. I don’t understand “The last value of the indicator is redrawn. Good entry points, it only shows on history.” Do you mind explaining this further? I feel I can make some modifications to this indicator or combine it with some other indicators to improve it considerably. Also, there are times that it should take more than one trade (when there are two consecutive strong buy/sell signals without any corresponding reverse signal), but it only takes one without taking the other. How can I, for example, take one strong buy trade (with the default lot size 0.01) and take a second consecutive strong buy trade (with an increased lot size to 0.02, third consecutive at 0.03 and so on) and exit all the strong buy trades when a strong sell trade comes between the consecutive strong buys? I know this is a mouth full, but I’m really not sure how to do this.

Run this indicator in the strategy tester. Set the simulation value to " open prices ...". Put the tester on pause. (see figure)then follow the progress bar to display the data by pressing F12. You can see that the last values of the indicator on the already closed bar change. This is called redrawing. This indicator will give a lot of false signals.

Here are pictures with examples.

The signal appeared on the bar at 4 o'clock.

After the formation of the next bar, the signal disappeared, but appeared on the bar at 5 o'clock.

The next bar, the signal also disappears. This leads to the conclusion that this is a bad indicator. If you follow his signals, then you will lose your deposit.

 
Vitalii Ananev:

Run this indicator in the strategy tester. Set the simulation value to " open prices ...". Put the tester on pause. (see figure)then follow the progress bar to display the data by pressing F12. You can see that the last values of the indicator on the already closed bar change. This is called redrawing. This indicator will give a lot of false signals.

Here are pictures with examples.

The signal appeared on the bar at 4 o'clock.

After the formation of the next bar, the signal disappeared, but appeared on the bar at 5 o'clock.

The next bar, the signal also disappears. This leads to the conclusion that this is a bad indicator. If you follow his signals, then you will lose your deposit.

Thanks for drawing my attention to the lapses in this indicator. I will definitely not trade with it solely. I have experimented combining it with several other indicators, and the results seem encouraging. I still need to observe the performance and tune it. My main issue now is related to EA coding. That's why I asked about how to take several trades and exit them at once, it's all related to what I am working on with other indicators. I would really appreciate some help on that.
 
Pipillioniare:
Thanks for drawing my attention to the lapses in this indicator. I will definitely not trade with it solely. I have experimented combining it with several other indicators, and the results seem encouraging. I still need to observe the performance and tune it. My main issue now is related to EA coding. That's why I asked about how to take several trades and exit them at once, it's all related to what I am working on with other indicators. I would really appreciate some help on that.

You can try to use another indicator to confirm the signals of this "super indicator". But, in my opinion, a simple stochastic indicator in combination with some trend indicator will be much more effective than this indicator. If it is "redrawn", then it is no longer what additional indicators can not be corrected.

Reason: