

If(MarketInfo(Symbol(),MODE_LOTSTEP)=0.1) - LotSize rounded regarding Broker LOTSTEP If (LotSize Largest_Lot) LotSize = Largest_Lot

Verbose("Err: division by zero: StopLoss:",slSize," TickValue:",TickValue," LotSize:",LotSize) ĭouble Smallest_Lot = MarketInfo(Symbol(), MODE_MINLOT) ĭouble Largest_Lot = MarketInfo(Symbol(), MODE_MAXLOT) LotSize = MarketInfo(Symbol(),MODE_TICKSIZE) * riskPerTrade / (slSize * TickValue * MarketInfo(Symbol(),MODE_POINT) ) I’m a MQL programmer so I tried to correct the EAW sqMMFixedRisk function replacing it with a my own function that I report here below in order to help you to solve the bug: //- sqMMFixedRisk fixed by Riccardoĭouble sqMMFixedRisk (int orderMagicNumber, int orderType)ĭouble slSize = sqMMGetOrderStopLossDistance(orderMagicNumber, orderType) * gPointPow ĭouble riskPerTrade=AccountBalance() *(_riskInPercent/100) The transaction closes with a 1241 pips loss (= 63 x 34).Īctually to respect a Risk per Trade of 1%, the trading system should have open that trade with 0.34 lots and not 3.40 lots. The operation goes to market with 3:40 lots, so each pip is 34 USD. The trade # 79 is a BUY operation with Entry price at 1.3703 and SL at 1.3640. It means I could lose about 217 USD if I get the SL. Try looking for example what happens in the trade # 79 which I highlight in the attached image.īefore the #79 trade in my account I have a balance of 21680 USD, and I set a Risk per Trade 1%. On the trading system that I’m planning I fixed a risk per trade of 1% I would notice you that in my opinion EAW has a bugs in the calculation of the Money Management Risk with Fixed% of account equity.
Mathmod mql4 how to#
How to remove Horizontal Grid Lines on Chart.Hello Mark I’â„¢m Riccardo from Sapienza Finanziaria

Mathmod mql4 download#
Mathmod mql4 install#
How to install Horizontal Grid Lines on Chart.mq4? Horizontal Grid Lines on Chart provides for an opportunity to detect various peculiarities and patterns in price dynamics which are invisible to the naked eye.īased on this information, traders can assume further price movement and adjust their strategy accordingly. Horizontal Grid Lines on Chart is a Metatrader 4 (MT4) indicator and the essence of the forex indicator is to transform the accumulated history data.
Mathmod mql4 code#
(See the code for details of this fix if you’re interested.)

(You can resize the chart by right-clicking in the margin to the right of the chart, and dragging the mouse up or down accordingly.)ģ – Correction to odd results caused by use of MathMod API function. This means that if the chart is resized, the grid will automatically resize with it at the next tick. I have updated this indicator with the following features:ġ – The optional ability to include intermediate grid lines every 10%, 20%, 25% or 50% of the major grid lines.Ģ – The resolution of the grid is now tied to the range of the chart (rather than the range of the data on the chart). GRID10 is an indicator which will draw a grid on a chart using grid lines separated at a convenient power of ten. – Version 2Thank you for reading this post, don't forget to subscribe!
