Hi guys,
I'm looking for someone to point me in the right direction for developing a grid system as I cannot seem to find the info I am looking for...
Basically I want the system to open a buy and sell position every 1R (X pips), with 0 stop loss and 1R Take Profit.
I have managed to write the code to enter the trades every X pips:
But when I try and include the take profit the ea stops regularly opening positions every 1R when TPs have been hit:
How can I get around this problem?
Thanks in advance
I would suggest to use STOP / LIMIT orders for your grid.
Whenever any position is closed, you can place new one replacing it.
Just an idea, YMMV.
-
if(Ask==NextBuy){
Doubles are rarely equal. Understand the links in:
The == operand. - MQL4 programming forum #2 2013.06.07Ask does not move only by a point.
-
Hedging, grid trading, same as Martingale.
Martingale, Hedging and Grid : MHG - General - MQL5 programming forum 2016.12.20Martingale, guaranteed to blow your account eventually. If it's not profitable without, it is definitely not profitable with.
Martingale vs. Non Martingale (Simplified RoR vs Profit and the Illusions) - MQL5 programming forum 2015.02.11Why it won't work:
Calculate Loss from Lot Pips - MQL5 programming forum 2017.07.11
THIS Trading Strategy is a LIE... I took 100,000 TRADES with the Martingale Strategy - YouTube
-
Doubles are rarely equal. Understand the links in:
The == operand. - MQL4 programming forum #2 2013.06.07Ask does not move only by a point.
-
Hedging, grid trading, same as Martingale.
Martingale, Hedging and Grid : MHG - General - MQL5 programming forum 2016.12.20Martingale, guaranteed to blow your account eventually. If it's not profitable without, it is definitely not profitable with.
Martingale vs. Non Martingale (Simplified RoR vs Profit and the Illusions) - MQL5 programming forum 2015.02.11Why it won't work:
Calculate Loss from Lot Pips - MQL5 programming forum 2017.07.11
THIS Trading Strategy is a LIE... I took 100,000 TRADES with the Martingale Strategy - YouTube
Thanks, changing the doubles approached seemed to help!
Re. MHG methods, I plan to grid with a trailing stop and proper risk management; not at all like a martingale system!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys,
I'm looking for someone to point me in the right direction for developing a grid system as I cannot seem to find the info I am looking for...
Basically I want the system to open a buy and sell position every 1R (X pips), with 0 stop loss and 1R Take Profit.
I have managed to write the code to enter the trades every X pips:
But when I try and include the take profit the ea stops regularly opening positions every 1R when TPs have been hit:
How can I get around this problem?
Thanks in advance