Position Sizin
-
I have a problem with the position size calculation, specifically the lot size. It works fine everywhere; however, with one broker the indices have 10 contracts instead of 1 contract.
I know it’s an anomaly, but when I open a position risking €50, it actually opens a position with a €500 risk (50x10)
I also tried writing a custom MQL script, but I’m experiencing the same behavior.
spread = SymbolInfoInteger(_Symbol, SYMBOL_SPREAD);
double CurrentPoint = SymbolInfoDouble(_Symbol, SYMBOL_POINT);// determino il rischio
double RiskAmount = rischio_currency;
// calcolo la differenza in punti tra i prezzi
double Point_SL = MathAbs(prezzo1-prezzo2)/CurrentPoint;double Trade_Lot = RiskAmount /((Point_SL+spread)*tick_value);
// in caso sia su un indice funded next
if (contract_size == 10) Trade_Lot =Trade_Lot /10;
lot_size =NormalizeDouble(Trade_Lot,2);if(lot_size<=min_lot) lot_size=min_lot;
There is way to fix this ?
I'm thinking to make some custom mql and divide for 10 my risk on this exception.
thank's
-
For now, I’ve solved it by using OnCalcProfit, and everything is working very well.
It might be useful for FXDreema’s position size calculation functions to use this method instead of the classic one.
Thank's -
I agree.
