Specifiche
EA based on New York Previous Day High/Low, suitable for backtesting:
- To work on any timeframe. Will probably be used between 5-15 minutes.
- Firstly it must get server time, and convert to New York time, and take into account Daylight Savings Time. Do not use Local computer time to do the conversion, as I want to be able to backtest this, so you must do the conversion based off of server time. I suggest you use this:
https://www.mql5.com/en/articles/9926
https://www.mql5.com/en/articles/9929
- Look at the previous day New York Session between 9.30am and 4pm. I might want to change these times in future, so these should be configuarable. Find the Max/Min High Low of the candles and also a 20SMA and 200SMA from within this time period. Take the high lows of these 4 items (high low of candles, high low of 20 SMA, and high low of 200 SMA). From these Items create a high low box, and project/draw it onto the next day session.
- Once the Next Day session starts (opening candle at 9.30am), check if the open of the opening candle was above or below the high and the low.
- If it opened above the high take a long. If below the low take a short. You should enter above or below the high/low of the opening candle, and you should also add a small distance to the entry of say 1 tick. (this additional entry amount should be a variable input that we can customize).
- Also add an optional filter that only takes the trade if the opening candle was in the direction of the trade. So for exaaple, the opening candle opens above the high of the previous days data, so we want to go long at the high of the opening candle (+ 1 tick). Only take the trade if the opening candle is bullish. This directional confirmaiton filter we should be able to switch on and off.
- I want the Stop size to be configurable input by ticks...so for example 4 ticks
- Max percent risk should be configurable to. For example 1% of equity
- Risk to reward should be configurable, for example 3 RR, and the TP target price calculated based off of that.
- Slippage should be configurable - for example 3 ticks.
- For risk management I want the option to move the Stop to a given RR, omce reahcing a give RR. So for example, once we reach 0 RR move Stop loss to -0.5 RR.
- No pyramiding. Only 1 position at a time.
- Configurable starting equity balance (e.g $1000)
- I want to backtest this with Tick Data, so please take this into account when building the EA, so that this is possible.
- I would like this to visually plot on the chart the High Low of the previous range, and then also an visible indicaiton of trades taken, with entry, stop and TP levels on the chart.