Overlay Chart

M

mjackson

Guest
For those who want to find correlation between markets this indicator might help...
 

Attachments

  • OverLayChart.mq4
    8.7 KB · Views: 114
  • 👍
Reactions: Loneblade and drqq
M

mjackson

Guest
Enivid, can you replace candlesticks with bars in this indicator or add it as a choice, please?...then convert it to MT5?

This indicator gives directly visual correlation between instruments ...absolutely no need for correlation tables.

Thank you.
 
M

mjackson

Guest
Feel free to try it.

By the way, how do you use it? Seems rather pointless.

It is easier to see visually correlation between markets on chart instead to look in table.
In stock market usually stock is compared to SP500 (index) and in forex currency pairs to USD(index), crosses to main pair.

Since currencies are not isolated in market there is correlation with stocks, bonds, yields...and market makers decide when and what to be correlation between different markets...

Market makers have any toll and information they need ,they make decision about price and timing...On retail traders is to figure out what is market makers intention but tools are limited. This is one of useful tools...

In MT4 provided by some brokers trader can find SP500, USDIX...some popular stocks...other indexes (AUS200, FRA40, Bund, GER30...), metals etc. So traders based on interest can make different analysis by overlaying charts...

For MT5 there is no such opportunities because MT5 is not so widely used as MT4...

For above reasons please make bar charts in MT4 version as well...I personally don't need candles but if you want make it as a choice in both versions MT4 and MT5.

Also can you add more bars in overlay chart: custom or default, please?

Thank you again.

P.S. There is a need for Second Chart but that is for another post or thread...
 

Attachments

  • Corelation Table.png
    Corelation Table.png
    644.7 KB · Views: 128
  • USDCHFM30-Overlay.jpg
    USDCHFM30-Overlay.jpg
    123.3 KB · Views: 138
  • SP500-M30-Overlay-Second Chart.jpg
    SP500-M30-Overlay-Second Chart.jpg
    96.7 KB · Views: 120
  • 👍
Reactions: drqq

Enivid

Administrator
Staff member
Nov 30, 2008
18,534
1,355
144
Odesa
www.earnforex.com
Why not just switch between two charts? The overlay is quite misguiding as it scales the added chart to be visible instead of to be comparable with the main chart.

I don't think it is possible to make bar chart indicator in MT4. Bar chart plot were introduced in MT5.

What do you mean by "more bars"?
 
M

mjackson

Guest
Why not just switch between two charts? The overlay is quite misguiding as it scales the added chart to be visible instead of to be comparable with the main chart.

I don't think it is possible to make bar chart indicator in MT4. Bar chart plot were introduced in MT5.

What do you mean by "more bars"?

Everyone is not the same ...For me is much easier to see correlation of markets on this way with Overlay chart instead to imagine in different time frames. Bars are matching in each time frame and have each scale...I do not see any misguiding. Indicator serve for what is intended...Knowing correlation trader cane time trading...

It helps and thank you for converting it to MT5. I am sorry that is impossible to convert it to bars on MT4 version

More bars means to add more bars on overlay chart to the left...to have 500 at least or to be customisable...

As you can see on pictures on M version there is scale for Overlayed chart ( in this case EURUSD) on MT5 version there is no any scale. Can you put scale on overlayed and main charts please? Are you going to add option to have candles or bars for Overlayed chart, because in that case initial version stay intact?

Thank you.
 

Attachments

  • SPX500M30-EURUSD.jpg
    SPX500M30-EURUSD.jpg
    81.5 KB · Views: 71
  • EURUSD-NZDUSD.jpg
    EURUSD-NZDUSD.jpg
    58 KB · Views: 62

Enivid

Administrator
Staff member
Nov 30, 2008
18,534
1,355
144
Odesa
www.earnforex.com
Everyone is not the same ...For me is much easier to see correlation of markets on this way with Overlay chart instead to imagine in different time frames. Bars are matching in each time frame and have each scale...I do not see any misguiding. Indicator serve for what is intended...Knowing correlation trader cane time trading...

Yes, each chart has its own scale, but placing them on the same screen makes them appear comparable when in fact they are not.

More bars means to add more bars on overlay chart to the left...to have 500 at least or to be customisable...

No bars beyond the visible screen for this indicator. It would be a hell to code the scaling algorithm for that.

As you can see on pictures on M version there is scale for Overlayed chart ( in this case EURUSD) on MT5 version there is no any scale. Can you put scale on overlayed and main charts please?

Done.

Are you going to add option to have candles or bars for Overlayed chart, because in that case initial version stay intact?

Done.
 

Attachments

  • OverlayChart.mq5
    8.2 KB · Views: 100
M

mjackson

Guest
Yes, each chart has its own scale, but placing them on the same screen makes them appear comparable when in fact they are not.



No bars beyond the visible screen for this indicator. It would be a hell to code the scaling algorithm for that.



Done.



Done.


0 errors 19 warnings ? possible lost of data...implicit conversion from number to string...


Something like "look back" then add number of bars...? No? OK. Scale? Well how was done in MT4? It is very short program. More important was number of bars but ....OK.
 
Last edited by a moderator:

Enivid

Administrator
Staff member
Nov 30, 2008
18,534
1,355
144
Odesa
www.earnforex.com
0 errors 19 warnings ? possible lost of data...implicit conversion from number to string...

Don't mind those warnings.

Something like "look back" then add number of bars...? No? OK. Scale? Well how was done in MT4? It is very short program. More important was number of bars but ....OK.

The OverLayChart.mq4 that you've attached does not show bars beyond the first screen. Do you have the one that does? If so, I could have a look at it and perhaps convert that feature.
 
M

mjackson

Guest
Don't mind those warnings.



The OverLayChart.mq4 that you've attached does not show bars beyond the first screen. Do you have the one that does? If so, I could have a look at it and perhaps convert that feature.

Well, look the picture there is scale!!! Question is how to change color of it? It is not related to color of grids, I tried that ...In MT4 there is option to change color of that scale but it is related to color of Grid...In Mt45 that is not the case....So you will figure it out , Right?
No I don't have Mt4 version of indicator with more overlayed bars...Sorry for that..
And one more important thing to add: SubSymbol to have pull down menu like you did it for "DrawType" ...it will be all symbols from "Market Watch " list...It is easier to pick symbol from list then to type it....

Thank you
 

Attachments

  • OverLay-Scale.jpg
    OverLay-Scale.jpg
    260.3 KB · Views: 59
  • Overlay-Inputs-GridColor-MT4.png
    Overlay-Inputs-GridColor-MT4.png
    40.2 KB · Views: 50

Enivid

Administrator
Staff member
Nov 30, 2008
18,534
1,355
144
Odesa
www.earnforex.com
Well, look the picture there is scale!!! Question is how to change color of it? It is not related to color of grids, I tried that ...In MT4 there is option to change color of that scale but it is related to color of Grid...In Mt45 that is not the case....So you will figure it out , Right?

Just change "extern color GridColor" to "input color GridColor" in the source code. An input color will appear.

And one more important thing to add: SubSymbol to have pull down menu like you did it for "DrawType" ...it will be all symbols from "Market Watch " list...It is easier to pick symbol from list then to type it....

No idea how to do that.
 
M

mjackson

Guest
...No idea how to do that.

Actually no need to increase number of bars...as you said it covers the screen whatever is TF....so if I need to look back in history I will just change to Higher time frame...That is more then enough.

Thank you so much for creating this indicator.
 

johnnybegoode

Trader
Jul 19, 2016
56
0
22
47
I tried to use the OverlayChary indicator in an expert advisor, and got an error "zero divide".
How to mod the code to make it not have any zero divide?

Thank you!

I tried to use the OverlayChary indicator in an expert advisor, and got an error "zero divide".
How to mod the code to make it not have any zero divide?

Thank you!

"zero divide in 'OverlayChart.mq5' (155,65)"

I tried to use the OverlayChary indicator in an expert advisor, and got an error "zero divide".
How to mod the code to make it not have any zero divide?

Thank you!

_PipsRatio = (_CurRangeHigh - _CurRangeLow) / (_SubRangeHigh - _SubRangeLow);
 
Last edited by a moderator:

johnnybegoode

Trader
Jul 19, 2016
56
0
22
47
Thank you.
Is there anyway to make it run a lot more faster with strategy tester?
i.e. I only need the value of OverlayChart[0].
It was presently 4 hours for 1 month of tick data.

Unrelated question, how do I make use of Core 1 and Core 2 at the same time?
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,534
1,355
144
Odesa
www.earnforex.com
Is there anyway to make it run a lot more faster with strategy tester?
i.e. I only need the value of OverlayChart[0].
It was presently 4 hours for 1 month of tick data.

Do you need any drawing at all? If not, then why not just use the price of the asset you try overlay directly without this indicator?

Unrelated question, how do I make use of Core 1 and Core 2 at the same time?

Processor cores? You can use more than one when you are using parallel calculations. For example, EA optimization threads can be run simultaneously on more than one core, while a single test cannot be run on two cores at once.
 

johnnybegoode

Trader
Jul 19, 2016
56
0
22
47
Do you need any drawing at all? If not, then why not just use the price of the asset you try overlay directly without this indicator?

I need the drawing and is wondering if backtesting would be faster if the drawing is only on the "current bar"?

OverlayChart[0]

i.e. a tiny dash/line on the chart overlaying the current bar?
Would that help?
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,534
1,355
144
Odesa
www.earnforex.com
Are you backtesting in Visual mode? You can use the slider near to adjust the speed of visualization:

speed_slider_mt5.png

If you need to speed up normal backtesting (without Visualization), then I need more info on what you've got in your OverlayChart[0].