Want to automate order entry for AntiMartingale order strategy

MQL5 Design

Spécifications

Greetings,

I am looking for help to program an automated order entry using an AntiMartingale strategy. I will identify (manually) a channel high and channel low and these are the initial entry to points to the long and short side respectively. I anticipate a breakout above or below these levels. I wish to place multiple trades layered above and below these entry points. 

For example if the EUR-USD is in a trading range between 1.2237 and 1.2214 I wish to enter orders as follows:

Buy stop 1.2237, stop loss 1.2217, take profit 1.2262 (25 pip take profit and 20 pip stop loss)

Buy stop 1.2237, trailing stop 20 pips

Then another pair 2 pips above that...

Buy stop 1.2239, stop loss 1.2219, take profit 1.2264 (25 pip take profit and 20 pip stop loss)

Buy stop 1.2239, trailing stop 20 pips

And so on adding another pair every 2 pips until I get to 

Buy stop 1.2265, stop loss 1.2245, take profit 1.2290 (25 pip take profit and 20 pip stop loss)

Buy stop 1.2265, trailing stop 20 pips

And then I want to enter mirroring trades on the short side

Sell stop 1.2214, stop loss 1.2234, take profit 1.2189 (25 pip take profit and 20 pip stop loss)

Sell stop 1.2214, trailing stop 20 pips

Then another pair 2 pips below that...

Sell stop 1.2212, stop loss 1.2232, take profit 1.2187 (25 pip take profit and 20 pip stop loss)

Sell stop 1.2212, trailing stop 20 pips

And so on adding another pair every 2 pips until I get to 

Sell stop 1.2186, stop loss 1.2206, take profit 1.2161 (25 pip take profit and 20 pip stop loss)

Sell stop 1.2186, trailing stop 20 pips

I would like each order on the buy side to be OCO with the matching order on the sell side, to reduce the effect of whipsaws. 

The variables that would have to be entered manually would be 

Instrument - for example, EUR-USD

Lot size

Channel High - this is the price level for the first two buy stop orders

Channel Low - this is the price level for the first two sell stop orders

This is not going to be used on autotrade or as a trading robot because I need the subjective element to judge the channel high and low. 

I would like these orders uploaded directly to the platform as MT5 pending orders. 

Preferably I would like to have a time setting so that if the trade isn't entered within a certain amount of time, the orders are all cancelled. 

I hope this is clear. Please let me know if further information can be provided for additional clarification. 

Répondu

1
Développeur 1
Évaluation
(320)
Projets
466
42%
Arbitrage
78
12% / 63%
En retard
75
16%
Travail
2
Développeur 2
Évaluation
(258)
Projets
395
28%
Arbitrage
69
19% / 49%
En retard
120
30%
Gratuit
3
Développeur 3
Évaluation
(42)
Projets
70
43%
Arbitrage
6
33% / 50%
En retard
19
27%
Gratuit
4
Développeur 4
Évaluation
(46)
Projets
73
16%
Arbitrage
13
8% / 92%
En retard
37
51%
Gratuit
5
Développeur 5
Évaluation
(28)
Projets
47
23%
Arbitrage
13
31% / 15%
En retard
12
26%
Gratuit
6
Développeur 6
Évaluation
(219)
Projets
370
42%
Arbitrage
145
17% / 41%
En retard
124
34%
Gratuit
7
Développeur 7
Évaluation
(586)
Projets
1045
49%
Arbitrage
39
28% / 41%
En retard
49
5%
Travail
8
Développeur 8
Évaluation
(1)
Projets
1
0%
Arbitrage
1
0% / 100%
En retard
0
Gratuit
9
Développeur 9
Évaluation
(14)
Projets
22
59%
Arbitrage
2
0% / 50%
En retard
2
9%
Gratuit
Commandes similaires
I'm creating Orders Alerts via tradingview, that are send to my Metatrader broker AMP, but i want them to copy themselves to my Tradovate account, i need help to create a bridge between those two using the API, so that every trade taken on Metatrader is also taken on my Tradovate account, Thanks

Informations sur le projet

Budget
50 - 100 USD
Pour le développeur
45 - 90 USD