if the the tick value for your instrument is converted to your account currency (it should be for FX pairs) and you want the nominal value in your account currency, I think this will work:
tick value / tick size * current asset price * lot size
if buying, use SymbolInfoDouble(symbol,SYMBOL_TRADE_TICK_VALUE_LOSS) for your tick size and SymbolInfoDouble(symbol,SYMBOL_BID) for the asset price
if selling, use SymbolInfoDouble(symbol,SYMBOL_TRADE_TICK_VALUE_PROFIT) and SymbolInfoDouble(symbol,SYMBOL_ASK)
I think that's what you're looking for, test it and see, you can already see the nominal value in MT5 when you are placing an order
That is not directly possible. You can only know your position's probable risk, considering both it's volume and it's stop-loss.
Risk (in account currency) = Volume (lots) × Stop-loss (in units of tick-size) × Tick-value (in account currency)
That is not directly possible. You can only know your position's probable risk, considering both it's volume and it's stop-loss.
Risk (in account currency) = Volume (lots) × Stop-loss (in units of tick-size) × Tick-value (in account currency)
lots = (MM_Percent*(1.0/100)*(AccountBalance))/(SL/ticksize * tickvalue)
That is not directly possible. You can only know your position's probable risk, considering both it's volume and it's stop-loss.
Risk (in account currency) = Volume (lots) × Stop-loss (in units of tick-size) × Tick-value (in account currency)
Actually if you consider the stop loss as the asset going to zero, this should give you the nominal value which is why in the formula I posted above instead of your stop loss in units of tick size you just multiply by the current price.
if the the tick value for your instrument is converted to your account currency (it should be for FX pairs) and you want the nominal value in your account currency, I think this will work:
tick value / tick size * current asset price * lot size
if buying, use SymbolInfoDouble(symbol,SYMBOL_TRADE_TICK_VALUE_LOSS) for your tick size and SymbolInfoDouble(symbol,SYMBOL_BID) for the asset price
if selling, use SymbolInfoDouble(symbol,SYMBOL_TRADE_TICK_VALUE_PROFIT) and SymbolInfoDouble(symbol,SYMBOL_ASK)
I think that's what you're looking for, test it and see, you can already see the nominal value in MT5 when you are placing an order
Im using this calculation for lots.
lots = (MM_Percent*(1.0/100)*(AccountBalance))/(SL/ticksize * tickvalue)
So I know how much I would be losing at worse case.
// assumes you already defined symbol, order_type and lots if (order_type == ORDER_TYPE_BUY) { nominal_value = SymbolInfoDouble(symbol,SYMBOL_TRADE_TICK_VALUE_LOSS) / SymbolInfoDouble(symbol,SYMBOL_TRADE_TICK_SIZE) * SymbolInfoDouble(symbol,SYMBOL_BID) * lots; } else if (order_type == ORDER_TYPE_SELL) { nominal_value = SymbolInfoDouble(symbol,SYMBOL_TRADE_TICK_VALUE_PROFIT) / SymbolInfoDouble(symbol,SYMBOL_TRADE_TICK_SIZE) * SymbolInfoDouble(symbol,SYMBOL_ASK) * lots; }
I'm not sure if you're really looking for the nominal value though because that's something people only use to do advanced money management optimization that I think most people won't ever need to do.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use