Volume vs. Lot Size

 

I want to trade by a percentage of my account balance but the OrderSend command seems to expect Lot Size. What do I need to do to trade with a percentage of my Account Balance?

Thanks, Jim Stow

 

You need to calculate the unit count (volume) from your balance, then convert the unit count to proper lot size.

For example, if the volume is 1250 units, the lot size is (double)1250 / 100000 = 0.01 lot.

 
  • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
  • Account Balance * percent = RISK = |OrderOpenPrice - OrderStopLoss| * OrderLots * DeltaPerlot (Note OOP-OSL includes the SPREAD)
  • Do NOT use TickValue by itself - DeltaPerlot
  • You must normalize lots properly and check against min and max.
  • You must also check FreeMargin to avoid stop out
 
I guess now all I need is a green bucket, yellow bucket and red bucket to place a trade in Forex!!! Geeeeze, why not provide a built in conversion calculator!!!!
 
@Sonny Robinson #I guess now all I need is a green bucket, yellow bucket and red bucket to place a trade in Forex!!! Geeeeze, why not provide a built in conversion calculator!!!!

Because there are many different methods for defining your position size and your money management. That is why there is MQL programming, so that you can implement your own tools for calculating the required values for your trades.