Thread: How to code?
View Single Post
  #1045 (permalink)  
Old 06-26-2008, 10:59 PM
nondisclosure007's Avatar
nondisclosure007 nondisclosure007 is offline
Senior Member
 
Join Date: Apr 2007
Posts: 116
nondisclosure007 is on a distinguished road
Code:
varlot=NormalizeDouble((AccountFreeMargin()*(varRiskPerc/100))*AccountLeverage()/MarketInfo(Symbol(),MODE_LOTSIZE),2);
where varRiskPerc is the % you want to put on your trade. ie 2%, then varRiskPerc would be 2. varRiskPerc MUST be a double or the formula will always return 0.

Quote:
Originally Posted by DooMGuarD View Post
hi all...

how to calculate the maximum volume for open a order whit my money...

sample

i have USD$1000 and 100:1 and nolimit for volume in open order...

i need to know

1) maximum lots for open order in EURUSD with this money
2) maximum lots for open order in USDCHF with this money
2) maximum lots for open order in GBPCAD with this money

if you have a code, itīs better...

thanks for your help
Reply With Quote