Idea For Automation On Range Bar Charts Trading DAX
Hi
The following topics will be dedicated to the automation of the ideas mentioned below. All comments and suggestions are welcome, but please do so in a civil manner.
System entry and exit criteria are as follows:
Long entry criteria
If a bar crosses from below the MA to above the MA,
Then this bar should be considered as a possible signal bar.
Next,
If a possible signal bar closes and a new bar is formed,
Then the highest point of the previous bar (now the confirmation signal bar) should be stored as "x"
Next,
If the price rises 2 points or more from "x" then a buy market order should be executed. // There is no take-profit or stop-loss for this purchase.
Only 1 long trade is open at any time.
The order will remain open until the short entry criteria are met and the trade direction is reversed by closing the buy and opening the sell based on the following criteria:
So,
Shorts entry standards
If a bar crosses from above the MA to below the MA,
Then this bar should be considered as a possible signal bar.
Next,
If a possible signal bar closes and a new bar is formed,
Then the lowest price of the previous bar (now the confirmed signal bar) should be stored as "x"
Next,
If the price drops 2 points or more from "x" then a sell market order should be executed. // There is no take-profit or stop-loss for this sale.
Only 1 short trade is open at any time.
The order will remain open until the long entry criteria are met and the trading direction reverses.
The indicators are as follows
For the range bar, I use Range Bar Chart v1.03a (attached). This goes to the file - Open Data Folder - MQL4 - Indicators
The template used is 1 minute range bar 40/50 index & 1m offline range bar 40 index (attached). These go into files - open data folder - MQL - Templates
Start with the GER30 (DAX) 1 minute chart and use the template 1 minute range bar 40/50 index.
Then open the offline chart (in FILE); it should read GER30 M40 (M50 should also be available for 5-point bars); apply the template 1m Offline Range Bar 40 Index .
This should produce a graph identical to the one below. (I use FXCM so it may be slightly different from other sources).
As a side note:
Here is a script that stops the current order and reverses it for easy manual trading and testing
The following topics will be dedicated to the automation of the ideas mentioned below. All comments and suggestions are welcome, but please do so in a civil manner.
System entry and exit criteria are as follows:
Long entry criteria
If a bar crosses from below the MA to above the MA,
Then this bar should be considered as a possible signal bar.
Next,
If a possible signal bar closes and a new bar is formed,
Then the highest point of the previous bar (now the confirmation signal bar) should be stored as "x"
Next,
If the price rises 2 points or more from "x" then a buy market order should be executed. // There is no take-profit or stop-loss for this purchase.
Only 1 long trade is open at any time.
The order will remain open until the short entry criteria are met and the trade direction is reversed by closing the buy and opening the sell based on the following criteria:
So,
Shorts entry standards
If a bar crosses from above the MA to below the MA,
Then this bar should be considered as a possible signal bar.
Next,
If a possible signal bar closes and a new bar is formed,
Then the lowest price of the previous bar (now the confirmed signal bar) should be stored as "x"
Next,
If the price drops 2 points or more from "x" then a sell market order should be executed. // There is no take-profit or stop-loss for this sale.
Only 1 short trade is open at any time.
The order will remain open until the long entry criteria are met and the trading direction reverses.
The indicators are as follows
For the range bar, I use Range Bar Chart v1.03a (attached). This goes to the file - Open Data Folder - MQL4 - Indicators
The template used is 1 minute range bar 40/50 index & 1m offline range bar 40 index (attached). These go into files - open data folder - MQL - Templates
Start with the GER30 (DAX) 1 minute chart and use the template 1 minute range bar 40/50 index.
Then open the offline chart (in FILE); it should read GER30 M40 (M50 should also be available for 5-point bars); apply the template 1m Offline Range Bar 40 Index .
This should produce a graph identical to the one below. (I use FXCM so it may be slightly different from other sources).
As a side note:
Here is a script that stops the current order and reverses it for easy manual trading and testing
























Attachment to original post (4)
📦 Summary of post attachments (6)
Below are all the files (6) shared in the reply.
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •