TWO different charts on one window.

 

Hi all.

I'm new here and I have a question.

Is it possible to draw two different currency pairs on one window in mql4?

I can make my own indicator, and re-draw current currency chart. But what if i want to draw from a CI a chart of another currency pair (not the one in which program is hosted on).


For example I would like to have a EUR/USD and a USD/JPY on ONE chart (rebased - shift in time). Is it possible in MQL4? How I can achieve that?

I know the market info function that gives me the CURRENT price, but i would like to have price from the past.

Thanks in advance.

Regards

SmallCap

from http://smallcapital.blogspot.com/

 
SmallCap:

Hi all.

I'm new here and I have a question.

Is it possible to draw two different currency pairs on one window in mql4?

I can make my own indicator, and re-draw current currency chart. But what if i want to draw from a CI a chart of another currency pair (not the one in which program is hosted on).


For example I would like to have a EUR/USD and a USD/JPY on ONE chart (rebased - shift in time). Is it possible in MQL4? How I can achieve that?

I know the market info function that gives me the CURRENT price, but i would like to have price from the past.

Thanks in advance.

Regards

SmallCap

from http://smallcapital.blogspot.com/


I don't know of a way of putting two price charts in one window. I doubt it's possible. I just use different windows and keep them that way with profiles.

It should be possible to write an indicator that displays the 'other' currency prices. The functions iOpen(), iHigh(), iLow() & iClose will give you previous prices on other currency pairs and timeframes. You may need to use iBarShift() in conjunction with them. If you want to draw bar or candles it will be a challenge. I think you would have to construct them with objects, which means lots of objects to manage.

Hope this helps.

Jellybean

 

Jellybean is right, here's what I did long ago:

http://screencast.com/t/NGY2ZmQ2ZmI

loosely based on the heiken-ashi code example

Reason: