Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Daily Range - MetaTrader 5 Expert | MT5 EA Download - MetaTrader 5 Resources

author EAcpu | 2 reads | 0 comments |

Daily range - expert for MetaTrader 5

Idea comes from: screenwriter

mq5 code: Barabashkakon

EA searches daily range. It uses objects OBJ_HLINE and OBJ_VLINE.

The sliding window size days in the daily range (the current bar #0 is not involved in the calculation) can be calculated as High - Low, or the average value via the module Close #i - Close #i+1. Calculation mode is set to daily range .

The daily range is then used to calculate stop loss and take profit levels:

SL = daily range * stop loss coefficient

TP = daily range * take profit coefficient

The daily range is calculated once a day (time start time :: start minute ) and when the EA is first launched.

Ask price >= highest daily range + daily range * offset coefficient

Bid <= Minimum Daily Range - Daily Range * Offset Factor

The number of positions opened on the day is limited by parameters and the maximum position size .

Visualize the search for the daily range using two vertical lines (limiting the search range) and two horizontal lines (showing signal lines for opening positions):

Daily range - expert for MetaTrader 5


Attachment download

📎 daily_range.mq5 (73.89 KB)

Source: MQL5 #23334

Verification code Refresh