Edit Your Comment
set lot size
तबसे मेंबर है Sep 04, 2014
25 पोस्टों
Mar 04, 2015 at 08:04
तबसे मेंबर है Sep 04, 2014
25 पोस्टों
Hello, Sorry for my english. I have an Ea that I would like to set lot size as folowing : (account balance * 0.00001). Could someone help me?
luclevesque17@
तबसे मेंबर है Sep 20, 2014
342 पोस्टों
Mar 06, 2015 at 03:53
(एडिट हो रहा है Mar 06, 2015 at 03:56)
तबसे मेंबर है Sep 20, 2014
342 पोस्टों
Lotsize = AccountBalance()*0.00001;
And I very strongly suggest using AccountEquity() instead...
And I very strongly suggest using AccountEquity() instead...
तबसे मेंबर है Sep 04, 2014
25 पोस्टों
Mar 08, 2015 at 07:37
तबसे मेंबर है Sep 04, 2014
25 पोस्टों
Thank you very much. It works, but it doesn't update when equity changes. Where do I have to put it to update on every trades?
luclevesque17@
तबसे मेंबर है Sep 20, 2014
342 पोस्टों
Mar 09, 2015 at 02:15
(एडिट हो रहा है Mar 09, 2015 at 02:37)
तबसे मेंबर है Sep 20, 2014
342 पोस्टों
That be in the structure of the code, you'll have to move where you do the calculation. And of course without seeing the source I'd have no idea why it's not updating every tick.
Try this line in a few places till you get the desired result, look for the values to print in the experts tab:
Print ("Ordersize: ", AccountBalance()*0.00001);
If you put that just after you initiate the code it should print constant value changes, then move it around to few places where you think it should be. I don't know where your lotsize declaration is, if it's global you can just put your calculation where it prints ok, if it's not global then you'll have to change your logic to update more often.
Try this line in a few places till you get the desired result, look for the values to print in the experts tab:
Print ("Ordersize: ", AccountBalance()*0.00001);
If you put that just after you initiate the code it should print constant value changes, then move it around to few places where you think it should be. I don't know where your lotsize declaration is, if it's global you can just put your calculation where it prints ok, if it's not global then you'll have to change your logic to update more often.
तबसे मेंबर है Sep 20, 2014
342 पोस्टों
Mar 09, 2015 at 02:18
(एडिट हो रहा है Mar 09, 2015 at 02:25)
तबसे मेंबर है Sep 20, 2014
342 पोस्टों
And of course I just used lotsize, what is your parameters name in the OrderSend ?
Look for an OrderSend function in your code, get the name of the third parameter, then go look where you work out that parameter and put that calculation in there.
Look for an OrderSend function in your code, get the name of the third parameter, then go look where you work out that parameter and put that calculation in there.

forex_trader_211931
तबसे मेंबर है Oct 14, 2014
11 पोस्टों
Mar 09, 2015 at 11:04
तबसे मेंबर है Oct 14, 2014
11 पोस्टों
Print ('Ordersize: ', AccountEquity()*0.00001);
would be better to see constant updated Lot Size.
Or if you want it straight on your chart:
string Text="Lot Size: "+DoubleToStr(AccountEquity()*0.00001,2);
Comment(Text);
would be better to see constant updated Lot Size.
Or if you want it straight on your chart:
string Text="Lot Size: "+DoubleToStr(AccountEquity()*0.00001,2);
Comment(Text);

forex_trader_211931
तबसे मेंबर है Oct 14, 2014
11 पोस्टों
Mar 09, 2015 at 11:04
तबसे मेंबर है Oct 14, 2014
11 पोस्टों
Oops, use " instead of ' in the Text definition obviously :)

forex_trader_211931
तबसे मेंबर है Oct 14, 2014
11 पोस्टों
Mar 09, 2015 at 11:04
तबसे मेंबर है Oct 14, 2014
11 पोस्टों
Grr... so use double quotes instead of single quotes... Dunnow why Fxbook converts them here..
तबसे मेंबर है Sep 04, 2014
25 पोस्टों
Mar 09, 2015 at 17:48
तबसे मेंबर है Sep 04, 2014
25 पोस्टों
Thank you the hand and Renko,
It works now!
I'm a rooky in programing and english is not easy for me. I work hard to debug. Your tips are well appreciate!
It works now!
I'm a rooky in programing and english is not easy for me. I work hard to debug. Your tips are well appreciate!
luclevesque17@
तबसे मेंबर है Sep 20, 2014
342 पोस्टों
Mar 09, 2015 at 23:31
तबसे मेंबर है Sep 20, 2014
342 पोस्टों
I couldn't code as well, put myself on a course. Only took me the 8 hours the course was long to learn how to code. Worth it if you're going to do fx.

*व्यवसायिक इस्तेमाल और स्पैम को ब्रदाश नहीं किया जाएगा, और इसका परिणाम खाता को बन्द करना भी हो सकता है.
टिप: किसी चित्र या यूट्यूब या URL को पोस्ट करने से वे अपने आप आपके पोस्ट में आजाएगा!
टिप: @ चिन्ह को टाइप करें उपभोगता के नाम को अपने आप करने के लिए जो इस चर्चा में भाग ले रहा है.