I try to use these code to manage my money,but an problem is I don't know how to descirbe my initital money(priniciple) .my method is cotrol lot :use priniciple 's maximumrisk+3 times about of profit(or loss)'s maximunrisk as lot,it profit>0,it will enlarge,otherwise,the vise.
but the first order's position still be 0.01(the mini lot of my MM terminal), these follow will be normal,don't know why. And I know the d==e in my code,so e/d always=1, but I wanna use d stands principal,but how do?TKS!
And have another method of lotoptimize,if solve this,I will list that one here!:p
nobody care this?:(
Not sure if i understood this correctly.
extern double Balance.Start=10000; double calcLot(){ double Balance.Current=AccountBalance() double Profit=Balance.Current-Balance.Start; if(Profit>0){ }else{ } }
the better, solution is to loop trough all your history, and calculate your profit yourself. This works fine unless your broker is deleting some of the older history.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I try to use these code to manage my money,but an problem is I don't know how to descirbe my initital money(priniciple) .my method is cotrol lot :use priniciple 's maximumrisk+3 times about of profit(or loss)'s maximunrisk as lot,it profit>0,it will enlarge,otherwise,the vise.
but the first order's position still be 0.01(the mini lot of my MM terminal), these follow will be normal,don't know why. And I know the d==e in my code,so e/d always=1, but I wanna use d stands principal,but how do?TKS!
And have another method of lotoptimize,if solve this,I will list that one here!:p