Hi dear coders!
I have an idea to create an momentum following EA which will trade based on the speed of bid or ask price, and also candlestick movement.
Data that need to be used is Average Daily Range, Average Spread, Average Speed and Volume
As for a start, I need the EA to open position when a sudden movement (bid/ask price or candlestick), exceed certain parameters.
There will be 2 clear variables which is :
EA need to monitor a few conditions before opening any position such as the current spread when the event happen or is there any spike in volume or not.
Execution
EA will execute orders when
- it has moves certain %/pips of that instrument ADR (have option to follow or mirror the direction)
- the movement duration equals or below the parameters that we set
- the spread not exceeding preferred setting
- the volume need to be a certain multiplication from previous volume
E.g :
If the ADR for EURUSD is 100pips,
And there's a movement (bid price/candlestick) moves upward more than 20% ADR value in less than 20 second,
And the spread is not more than 20% off the Average spread value,
And volume of the 20 seconds movement exceeding 5x of the previous 20 seconds (or previous candlestick; if we choose bar)
We will open buy orders.
Strategy
Stop Loss
When a buy order opens, the default SL will be on the first bid price (if uses tick) when that movement occur, or at the Low Price of a candlestick (if uses bar)
Custom value can be set as well. Sometimes broker will have their own stop levels for each instrument. If the price that the EA should put the SL is below the Stop Level value, it will add up to the numbers.
E.g : EURUSD Stop Level is 5 pips, but EA not able to place the SL because the price (when opening the order) is 3 pips, which is less than 5 pips to its default SL. So EA will add 3+5 pips.
Take Profit
Default TP will be a trailing stop which is based on common trailing stop setting, or user can choose to set the TP level based on bar, risk over reward ratio, or a specific price/time.
Please offer your best price. Thank you!