INSTRUCTIONS FOR MT5 SCRIPT "INTRADAY PRICE LEGS" Platform: MT5 Account: Live and Demo Markets/Instruments/Products: All. Please take into an account different decimalizations, contract sizing and product specifications (forex, CFDs, futures, stocks...) Time frames: Intraday + Daily Brokers: All (futures and fx/cfd and stocks) Settings input: whenever I use a sign * below, it means that that setting must have a modifyable input in the Script settings. Whatever is written in these instructions are default settings only. Technical indicators used: all indicators are already built in MT5 by default. We will use: • 'Main' EMA: 20* • Average true range ATR 20* • MACD 3-10-16* histogram only • Fractals When calculating the Script take 'all indicator values' that we need from the value they show one bar back. That bar is already closed and we know the indicator values for sure. The purpose of the Script is to meassure the price swings. We have a leg up from swing low to swing high. We have a leg down from swing high to swing low. A swing is meassured by Fractals. We will meassure the lenght of these Legs in terms of price and time distance, as an ATR value, number off occurences etc. More explanation is in the attached pictures. All the results must be exported into csv ready file for Excel in the manner as shown in the attached picture. We will also record a special condition which is: if the leg (start of it) occured in 20* bars after INITIAL, please record a special comment in the output csv file as shown in the attached picture. INITIAL buy and sell conditions are described below. "INITIAL BUY CONDITIONS": 1. Price makes a highest high in the last 30 bars 2. Price trades at or above (Main EMA20 value + ATR X 2.5*) 3. MACD HISTOGRAM makes highest high in the last 30 bars All these 3 conditions must be met ALL AT ONCE - at the same bar. We call this "INITIAL BUY CONDITIONS". "INITIAL SELL CONDITIONS": 1. Price makes a lowest low in the last 30 bars 2. Price trades at or below (Main EMA20 value - ATR X 2.5*) 3. MACD HISTOGRAM makes a lowest low in the last 30 bars All these 3 conditions must be met ALL AT ONCE - at the same bar. We call this "INITIAL SELL CONDITIONS". ---------------------------------------------------- OTHER IMPORTANT NOTES: We agreed to add a graphic output to the script that draws legs and INITIAL conditions on the chart to check the script's logic easier. We will also record DAILY time frames ATR (Average true range 14*) as described in the attached picture. There will also be a Time filter used intraday as described in the attached pic. If time filter is used price is obviously already moving from before that time. But let's start meassuring the Leg beginning at session start time and let's finish the last Leg at session end time. EA must be simply coded and be able to be backtested in MT5 Strategy tester without MT5 software freezing up even if tested on a 1 min time frame for the past 10 years of market data. I need a clean, simple and robust code that will work with no bugs. Please test it before sending me to test it. If MT5 platform has an upgrade, I would ask you to upgrade the EA free of charge after it, so that I can keep using it. One year free of charge bug fixing is included even after the job is paid on MQL5 and initial testing didn't show and bugs. Any questions, please let me know. Thank you.