Download MetaTrader 5

Experts: Currency Strength EA - page 2

To add comments, please log in or register
andrea valente
247
andrea valente  
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)


Eric WAI
14
Eric WAI  

Should insert below line

if(op==0) return 0;

just before

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

to adoid ZD error.

Jermaine Wedderburn
181
Jermaine Wedderburn  
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
jp_forex
525
jp_forex  
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

Slowpoison
99
Slowpoison  
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 ?

manis12345
34
manis12345  

What is SL ?

Slowpoison
99
Slowpoison  
manis12345:

What is SL ?

StopLoss
manis12345
34
manis12345  

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.

manis12345
34
manis12345  
Slowpoison:
StopLoss

yes

manis12345
34
manis12345  

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

123
To add comments, please log in or register