- How to Calculate Swap Per Micro Lot of One Night in MT4?
- A Simple Back-testing Problem
- Problem Getting Lot size
Well, MarketInfo(Pair,MODE_LOTSIZE) gives the value in base currency. Is there any way to get the value in deposit currency?
Well, MarketInfo(Pair,MODE_LOTSIZE) gives the value in base currency. Is there any way to get the value in deposit currency?
MarketInfo's MODE_LOTSIZE is telling how much unit 1 lot is. If it return 100,000 then the account is using 1 standard lot. If it 10,000, then the account is mini account.
If you're looking for how much it cost you to open 1 lot size in deposit currency then you should use MarketInfo's MODE_MARGINREQUIRED.
See also standard constant for MarketInfo https://docs.mql4.com/constants/marketinfo
- 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/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
-
Do NOT use TickValue by itself - DeltaPerLot
and verify that MODE_TICKVALUE is returning a value in your deposit
currency, as promised by the documentation, or whether it is returning a value
in the instrument's base currency (EUR, in this case).
MODE_TICKVALUE is not reliable on non-fx instruments with many brokers. - You must normalize lots properly and check against min and max.
- You must also check FreeMargin to avoid stop out
You guys are aware you a replying to a 5 year old post from a 2012 zombie thread (resurrected by deleted SPAM), do you not?
You guys are aware you a replying to a 5 year old post from a 2012 zombie thread (resurrected by deleted SPAM), do you not?
Yes, I do, but it is solar powered and it does not work at night!
You're not going to find it. You have to get it from your specific broker. Could be fixed, or $/lot
You misunderstood... My broker (and other brokers) charge a fixed amount per 100,000 of the deposit currency, which requires conversion of units. For example here is the description of how my broker charges:
How Commissions Are Calculated?
Total commission (Round-Turn) = (No. of Lots * Contract Size * Commission per $100k) * Conversion Price to Base Currency
#include <multi_symbol_timeframe.mqh> double CommissionCalc(string symbol, double lots, double money_per_100k_units) { double res = (double)UnitsDepositCurrency(symbol)/100000.0*money_per_100k_units*lots; return MathCeil(res*100)/100; } int UnitsDepositCurrency(const string symbol) { string currency_account = AccountInfoString(ACCOUNT_CURRENCY); string currency_base = StringSubstr(symbol,0,3); string currency_counter = StringSubstr(symbol,3,3); int contract_units = (int)MarketInfo(symbol,MODE_LOTSIZE); if(contract_units <= 0) return -1; if(currency_account==currency_base) return contract_units; if(currency_account==currency_counter) { double bid = iBid(symbol); if(bid <= 0.) { Print(__FUNCTION__," ",ErrorDescription(GetLastError())); return -1; } return int((double)contract_units*bid); } int total = SymbolsTotal(false); for(int i=0;i<total;i++) { string mw_symbol = SymbolName(i,false); if(StringFind(mw_symbol,currency_account)>=0 && StringFind(mw_symbol,currency_base)>=0) { double bid = iBid(mw_symbol); if(bid <= 0.) { Print(__FUNCTION__," ",ErrorDescription(GetLastError())); return -1; } string mw_base = StringSubstr(mw_symbol,0,3); string mw_counter = StringSubstr(mw_symbol,3,3); if(mw_base==currency_base) return int(double(contract_units)*bid); if(mw_counter==currency_base) { int mw_units = (int)MarketInfo(mw_symbol,MODE_LOTSIZE); int counter_units = int((double)mw_units*bid); if(counter_units <= 0) return -1; return int(((double)contract_units * (double)mw_units) / (double)counter_units); } break; } } return -1; }
How Commissions Are Calculated?
Total commission (Round-Turn) = (No. of Lots * Contract Size * Commission per $100k) * Conversion Price to Base Currency
When you asked, I thought it was just a joke and answered accordingly! Sorry about that!
So, what exactly are you asking for then?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use