Specification
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.