Download MetaTrader 5
To add comments, please log in or register
Do you have Mac OS? Find out how to install MetaTrader on it!
captain_igloo
5
captain_igloo 2016.04.01 13:44 
Hi 
In my EA,  I'd like to change this code:
 

 int lvl=MathLog(maxlots/lot)/MathLog(2)+1;
 if (lvl<0) lvl=0;   

 lot2= lot*MathPow(2,lvl); 



lvl is a level which is depending of maxlots , lot is the initial lot and lot2 is the result lot level after level.

In this case with Matpow the result is a martingale 1 , 2 , 4 , 8 , 16 etc etc ...
I'd like a progression lot 1 , 2 , 3 , 4 , 5 ... or a fibonacci 1 , 2 , 3 , 5 , 8 ....


Many thanks for help.
 

whroeder1
13593
whroeder1 2016.04.01 19:37  
captain_igloo I'd like to change this code
  1. You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
  2. If you can figure out how MathPow(2, lvl) gives you "1, 2, 4, 8 , 16 etc" then you will know how to get "1 , 2 , 3 , 4 , 5 ..."
/
To add comments, please log in or register