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

Assistant for checking historical data strategies - MetaTrader 4 script | Trading script download - MT4/MT5 resources

author EAcpu | 5 reads | 0 comments |

Assistant for checking strategies on historical data - indicator for MetaTrader 4

Assistant for checking strategies on historical data - indicator for MetaTrader 4

Assistant for checking strategies on historical data - indicator for MetaTrader 4

Versions 600 and higher include control functionality, but only in indicators. This still helps.

"TPEHEP" (Trainer) was developed to help analyze interesting strategies and to practice and gain experience in analyzing historical data signals in selected strategies. Maximize the approach to market rules https://book.mql4.com/en/trading/orders gives novices the opportunity to understand the logic behind order triggering and strategy signal formation, and find suitable strategies.

Initially, an assistant is needed to highlight the decision-making position. Buy lines (blue, key "B") or sell lines (pink, key "S") and close lines are best suited for this task. The keys were chosen for convenience—right hand moves history, left hand executes commands.

Basic operating rules:

Opening and closing orders are only allowed when the candle closes (Close[Bar0]) within the vertical colored area Bar0 (purple), and the order itself is opened or closed when a new candle opens (Open[Bar-1]). Once the Stop Loss or Take Profit level is reached, the position is closed based on the price of the order in the active zone. Stop Loss or Take Profit can be tracked with the mouse, controlling minimum distance and freezing.

In the early stages of learning, you can use the "<" and ">" keys to move the active area gradually closer to the right. The offset of the history is stepped through by pressing the "F12" key or hotkey, and the active area (purple) remains at the selected position.

Select a hotkey instead of "F12": Press the desired button - an alert with the message "The wrong button ХХХ was pressed" will appear, write ХХХ in the settings of the line "Key for moving the chart by 1 step". By default the "Del" key on the numeric keypad is used.

The installation of the indicator is standard: to open the chart of a currency pair, you need to select history, set the analysis strategy according to the template and attach the TPEHEP indicator. Press the "Р" key to save the settings ( right echo) added to the template (EURUSD.60.tpl). Everything is ready. If the active area is not visible, press the left mouse button.

After plotting the chart will look like this:

Assistant for checking strategies on historical data - indicator for MetaTrader 4

Further improvements of the Assistant lie in the maintenance of open positions, various trader error controls, as well as the output of final data, Excel tables and the drawing of profit charts in Excel.

Assistant for checking strategies on historical data - indicator for MetaTrader 4

The strategy results are displayed in the BALANCE table and once the check is over, pressing the "Р" ( right echo) key writes the file "EURUSD.60 2015.07.06-2015.07.06.xls" with the test start and end dates at \MQL4\Files\ folder.

Assistant for checking strategies on historical data - indicator for MetaTrader 4

Then consider different strategies…

Triple shielding strategy analysis

To draw on another timeframe, disable order processing (Trading=false). Only vertical lines remain as signal moments. By pressing the "Р" ( right record) key. Use this plotting template on different timeframes and perform a final profitability test with order processing enabled (Trading=true) by changing the indicator set and plotting using the template.

After testing the strategy, save the recorded file in the backup folder with the name: Test EURUSD Every Stochastic 5 3 3 Moving Average EMA55 and so on. This allows choosing the best options for policy settings. During the next test, if the template names or results match, the file will be overwritten and the previous results will be lost. So be sure to back up!


Attachment download

📎tpehep.mq4 (21.84 KB)

Source: MQL5 #14675

Verification code Refresh