- Real and Generated Ticks - Algorithmic Trading, Trading Robots
- Market Execution - Opening and Closing Positions - Trade - MetaTrader 5 for Android
- Exchange Execution - Opening and Closing Positions - Trade - MetaTrader 5 for Android
Never risk more than a small percentage of your trading funds, certainly less than 2% per trade, 6% account total.
-
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. Then you compute your lot size.
-
AccountBalance * 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.
MODE_TICKVALUE is not reliable on non-fx instruments with many brokers - MQL4 programming forum (2017)
Is there an universal solution for Tick value? - Currency Pairs - General - MQL5 programming forum (2018)
Lot value calculation off by a factor of 100 - MQL5 programming forum (2019) -
You must normalize lots properly and check against min and max.
-
You must also check Free Margin to avoid stop out
-
For MT5, see 'Money Fixed Risk' - MQL5 Code Base (2017)
Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP SL is $5/$10/5 or 0.1 Lots maximum.
Hi i am an absolute beginner i create a small routine that provide once you press sell or buy to put one order and assign a Stop loss automaticatelly at 70 pips distante and a Tp on 140 pips according to 1:2 RR.
This custom trading panel will get you that far. You will, however, need to find a breakeven utility for your 2nd step.
Allan Munene Mutiiria, 2024.10.22 15:56
In this article, we focus on transforming our static MQL5 dashboard panel into an interactive tool by enabling button responsiveness. We explore how to automate the functionality of the GUI components, ensuring they react appropriately to user clicks. By the end of the article, we establish a dynamic interface that enhances user engagement and trading experience.Never risk more than a small percentage of your trading funds, certainly less than 2% per trade, 6% account total.
-
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. Then you compute your lot size.
-
AccountBalance * 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.
MODE_TICKVALUE is not reliable on non-fx instruments with many brokers - MQL4 programming forum (2017)
Is there an universal solution for Tick value? - Currency Pairs - General - MQL5 programming forum (2018)
Lot value calculation off by a factor of 100 - MQL5 programming forum (2019) -
You must normalize lots properly and check against min and max.
-
You must also check Free Margin to avoid stop out
-
For MT5, see 'Money Fixed Risk' - MQL5 Code Base (2017)
Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP SL is $5/$10/5 or 0.1 Lots maximum.
forgive my English but what I did is consider for example a capital of 100 dollars to risk with a stop loss not too close and I chose a risk of 7 dollars per operation i.e. 7% of the capital the take profit instead is set at 14 dollars but at 7 dollars i.e. at breakeven it moves the stop loss to BE so if it goes well I am 1:2 if I go to BE I have a profit 1:1. working actually always on 0.01 lots and i work on the risky XAUUSD
Thanks for help
thanks for your reccomandations do you know why my EA doesnt work on the strategy tester?
Thanks.
You can't open a position using PositionModify--you can only use it to modify a preexisting position. Have a look at PositionOpen, or Buy and Sell:
- www.mql5.com
Thanks.
You can't open a position using PositionModify--you can only use it to modify a preexisting position. Have a look at PositionOpen, or Buy and Sell:
there is 0 code in that to open a trade. So it cannot work in either live trading or strategy tester.
Add code to open a trade and then it will work. Strategy tester is not meant to be used they way you describe. Once upon a time you could open manual trades in strategy tester, but i have not see any that work recently. I suggest that you search codebase and marketplace.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use