Download MetaTrader 5

Martin Gale system for BO

To add comments, please log in or register
g97iulio
270
g97iulio  

i created an ea that use a bridge to open trade on binary.com .

I want to implement a martin gale system or a system based on events . 

so i wrote this

if(isWon==1 || contractFound==0){investment=capital*(3/100);}

   else if(isWon==0 && isExpired==1)
     {
      for(int i=0;i<4;i++)
        {
         investment=capital*(100/3)*MathPow(factor,i);
        }
where isWon is a function to see if last trade is Won or not and is expired to see if the last trade is expired or not . The problem is that if it is lost it gave me the last value for i<4 
diectily and it bypass i=2 ; 
how i can fix it ? 
whroeder1
17122
whroeder1  
g97iulio: implement a martin gale system
   investment=capital*(100/3)*MathPow(factor,i);
}
where isWon is a function to ...
  1. Don't add text inside quoted text, put it outside. MQL4 Forum editor problem - MQL4 forum
  2. One word not two.
  3. Martingale, guaranteed to blow you account eventually. https://www.mql5.com/en/search#!keyword=martingale&module=mql5_module_forum
  4. You have to remember how many losses in a row you have, not a for loop.
g97iulio
270
g97iulio  
whroeder1:
  1. Don't add text inside quoted text, put it outside. MQL4 Forum editor problem - MQL4 forum
  2. One word not two.
  3. Martingale, guaranteed to blow you account eventually. https://www.mql5.com/en/search#!keyword=martingale&module=mql5_module_forum
  4. You have to remember how many losses in a row you have, not a for loop.
Ok thank you , how can i remember loss in a row ? Excuse me , i am a newbie in mql4
To add comments, please log in or register