Experts: Currency Strength EA - page 2

 
Colin Mundia:


Okay, I did the below edit and it worked. Am sure its not the way it should be done, but it worked!


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

//|            CALCULATING PERCENTAGE Of SYMBOLS                                                      |

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

double perch(string sym)

  {

   double op = iOpen(sym,PERIOD_D1,0);

   double cl = iClose(sym,PERIOD_D1,0);


   double per;

   if(per = !0) per=(cl-op)/op*100;


   per=NormalizeDouble(per,2);

 

   if(op==0)

   {

      Alert(sym);

   }

   return(per);

  }


Hello, I get still the same error even after your changes. Could you please advise if I have to modify something else?


2017.07.14 09:58:37.500 Currency_Strength_v1.0 b-2 EURUSD,M15: zero divide in 'Currency_Strength_v1.0 b-2.mq4' (405,29)


 

Should insert below line

if(op==0) return 0;

just before

double per=(cl-op)/op*100;

to adoid ZD error.

 
jp_forex:

You need to put prefix value as "micro" without quotes to trade EURUSDmicro. You can see the diff_value parameter as 0.5, which means when two currencies strength difference reaches above 0.5 it willl take a trade in that respective pair. You can just apply the code on one pair only & it will trade all pairs. Strength for each currency you can see on Left side of the chart. If that is not loading, then it must be not getting ticks to calculate its formula. Better Open all the currency pair charts in other tabs. Once you see that strength values on left side of the chart, then it means it has started to work. Still if not updating, try restarting Metatrader once. It works normally once it gets the data no matter you close the terminal every day after that.


Happy & Safe Trading ;)


Thanks for the reply, i hope to experience some success with it...

I got it working in postfix...not pre
 
Jermaine Wedderburn:

Thanks for the reply, i hope to experience some success with it...

I got it working in postfix...not pre

Oh yes.... "postfix" it was.. hahahaa, Sorry, my mistake ;P

 
jp_forex:

Oh yes.... "postfix" it was.. hahahaa, Sorry, my mistake ;P

What abut news time do you stop the robot or do you let it run even when an active news is scheduled ahead ??

Do you suggest I use a stoploss risk to reward 1/1 ?

 

What is SL ?

 
manis12345:

What is SL ?

StopLoss
 

Hi,

 

Any one confirm after taking first trade particular currency pair, not taking further order.


Some few order not closing due to SL not given, its taking only profit- TP call.

 
Slowpoison:
StopLoss

yes

 

Hi,

      My view  with this EA good for manual trading. If you could add below is perfect ideal EA for automated trading.


  The Entry point is diff Value 0.5, Take profit value should be diff value 0.7 and Stop loss would be diff value 0.3