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

Idea For Automation On Range Bar Charts Trading DAX

author EAcpu | 3 reads | 0 comments |
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).
Attached picture (click to enlarge)
Click to Enlarge

Name: GER30M40 16-06-2016_a.png
Size: 69 KB

appendix
[TPL] 1m offline range bar 40 Indices.tpl 8 KB | 850 downloads

appendix
[TPL] 1 Minute Range Bar 40&50 Index.tpl 19 KB | 834 downloads

appendix
[EX4] RangeBarChart_v103a.ex4 21 KB | 980 downloads


As a side note:

Here is a script that stops the current order and reverses it for easy manual trading and testing
appendix
[MQ4] Close and reverse_Slippage_Adjusted.mq4 2 KB | 790 downloads | Uploaded on June 21, 2016 10:37pm
GER30M40 16-06-2016_a.pngExample1.pngExample2.pngExample1.png
GER30M40 16-06-2016_a.pngExample1.pngExample2.pngExample1.png
GER30M40 16-06-2016_a.pngExample1.pngExample2.pngExample1.png
GER30M40 16-06-2016_a.pngExample1.pngExample2.pngExample1.png
GER30M40 16-06-2016_a.pngExample1.pngExample2.pngExample1.png
GER30M40 16-06-2016_a.pngExample1.pngExample2.pngExample1.png

Attachment to original post (4)

📦 Summary of post attachments (6)

Below are all the files (6) shared in the reply.

Verification code Refresh