Quoting HendrickDislikedHey Salty!
(Sorry I wasn't there in the weekend at MSN. Will try next weekend).
I think this piece of code:
lot=NormalizeDouble(AccountFreeMargin()*MaximumRisk/1000.0,digits);
takes your free margin in account to increase or decrease your lot size.Ignored
Check out the attachment in this post, you'll see what I mean in terms of the low margin buffer that i was describing.
This is for a demo account so in reality it doesn't count as brokers don't care about it, but if this was live, then I'd be worried.
I'm just thinking that maybe in your calculations we could reduce the AccountFreeMargin() by half that way increasing it's significance. For example change it to:
lot=NormalizeDouble((AccountFreeMargin()/2)*MaximumRisk/1000.0,1);
What do you think?
Don't worry about last weekend, we can catch up this weekend if you wish.
Attached File(s)
margin.zip
19 KB
|
184 downloads
Just my 2 pips worth