Forex-ID10T EA (Working but not trading!) - page 3

 
cosmicbeing wrote >>

Hi ForexID10T,

I'm just a novice coder myself, and I am impressed with your brainwork to put this together. I tested the EA and it does both Buy/Sell trades, but I have not yet tested the various settings to find the best.

In the meantime, I looked at your code and have a question on one section for the ZigZag Trend -

Both the Bull and Bear code have the same ">" sign. Is this correct? Or should the Bear code have "<"?

//+------------------------------------------------------------------+
//Check if ZIGZAG TREND and set final MARKET_TREND for trading signal
if (ZIGZAG_SCORE_0 > 15) BULL_SCORE_0 = (BULL_SCORE_0 - 15);
* if (ZIGZAG_SCORE_0 > 15) BEAR_SCORE_0 = (BEAR_SCORE_0 - 15);

? * Should this line be "Less Than <":

if (ZIGZAG_SCORE_0 < 15) BEAR_SCORE_0 = (BEAR_SCORE_0 - 15);

if ((BULL_SCORE_0 > TARGET_SCORE) && (BULL_SCORE_0 > BEAR_SCORE_0)) {MARKET_TREND = "BULL_TREND";}

* if ((BEAR_SCORE_0 > TARGET_SCORE) && (BEAR_SCORE_0 > BULL_SCORE_0)) {MARKET_TREND = "BEAR_TREND";}

? * Should this line be "Less Than <":

if ((BEAR_SCORE_0 < TARGET_SCORE) && (BEAR_SCORE_0 < BULL_SCORE_0)) {MARKET_TREND = "BEAR_TREND";}

if (ZIGZAG_SCORE_0 > 15) {MARKET_TREND = "ZIGZAG_TREND";}

//+------------------------------------------------------------------+

As I said, I'm just a novice coder as well, so I may not understand this section too well. Thanks for sharing your EA. Your efforts are appreciated and I've learned some more reading your code.

Take care,
Robert

Robert

The idea is the moment the market enters a ZigZag pattern, both Bull and Bear scores should be lowered - that is why both acquires the same penalty: If ZigZag score gets above 15, both Bull and Bear score are panalised with a minus 15, regardless of their values.

Let's say we will only trade if either the Bull or Bear score is above 90 and in the current moment in time Bull score is 95 - when ZigZag score reach 16 (Unstable market) Bull score will go down from 95 down to 80 meaning we should get out as we are now lower than the threshold of 90.!

Does this make sense to you?

Barry

 
ForexID10T wrote >>

Robert

The idea is the moment the market enters a ZigZag pattern, both Bull and Bear scores should be lowered - that is why both acquires the same penalty: If ZigZag score gets above 15, both Bull and Bear score are panalised with a minus 15, regardless of their values.

Let's say we will only trade if either the Bull or Bear score is above 90 and in the current moment in time Bull score is 95 - when ZigZag score reach 16 (Unstable market) Bull score will go down from 95 down to 80 meaning we should get out as we are now lower than the threshold of 90.!

Does this make sense to you?

Barry

Sorry - I only now see where your question was directed! Yip, you are 150% correct!

THANKS for spotting this mistake! Maybe that is why the EA is trading like an ID10t?

Barry :)

 
ForexID10T wrote >>

Sorry - I only now see where your question was directed! Yip, you are 150% correct!

THANKS for spotting this mistake! Maybe that is why the EA is trading like an ID10t?

Barry :)

I have checked the source code and this is the latest corrected version, just incase you downloaded the wrong version:

(You will also see a lot of comments with numbers //1, //2 etc inside the code - that is what I did to find the extra "{" .)

Files:
Reason: