Change code

Back to topics list To post a new topic, please log in or register
avatar
1
captain_igloo 2016.04.01 15: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.
 

 

avatar
13009
WHRoeder 2016.04.01 21: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 ..."
Back to topics list  

To add comments, please log in or register