Download MetaTrader 5
To add comments, please log in or register
Hundreds of articles will help you to create a trading robot. Come and read them!
Simon Gniadkowski
Moderator
17975
Simon Gniadkowski 2012.12.13 09:54  
ReaDOnlY:

I think my point is still misunderstood. I am trying to understand what code MT4 uses to place two different scaled items on one graph visually.  
It will auto scale the Y axis based on the range of values it wants to plot . . .  using the crossing of two lines drawn on auto scaled Y axis is about as logical as trying to calculate angles between price and time. 
Rashid Umarov
Admin
11571
Rashid Umarov 2012.12.13 10:43  

You have only one proper way - to write your own indicator where you get values of both these indicators RSI and MACD (for example) and you have to invent the way to check condition which you need.

When this condition is triggered you need to draw a raw to buy or to sell.  Also, you can obtain such triggerings as values in another indicator or EA.

phi nuts
2184
phi nuts 2012.12.14 03:14  
ReaDOnlY:

I think my point is still misunderstood. I am trying to understand what code MT4 uses to place two different scaled items on one graph visually.  
Win API
ReaDOnlY
42
ReaDOnlY 2012.12.17 01:24  

Is there a way using Win API to determine what the top and bottom value of the window are (i.e. the scale).  Or could you provide some insight on which api is implemented and how? 

 

Thank you

Simon Gniadkowski
Moderator
17975
Simon Gniadkowski 2012.12.17 09:01  
ReaDOnlY:

Is there a way using Win API to determine what the top and bottom value of the window are (i.e. the scale).  Or could you provide some insight on which api is implemented and how? 

Why not use a mql4 Function ?  WindowPriceMin() & WindowPriceMax()  a word of caution though,  these functions don't report the correct information when MT4 is minimised.
ReaDOnlY
42
ReaDOnlY 2012.12.17 13:50  
RaptorUK:
Why not use a mql4 Function ?  WindowPriceMin() & WindowPriceMax()  a word of caution though,  these functions don't report the correct information when MT4 is minimised.


I tried using this, but the MA do not appear to scale accurately if I try to scale two MA together.
Simon Gniadkowski
Moderator
17975
Simon Gniadkowski 2012.12.17 14:08  
ReaDOnlY:

I tried using this, but the MA do not appear to scale accurately if I try to scale two MA together.
2 MAs of the same pair should be using the same Y axis so there should be no need to scale the values you are putting into the buffers . . . if you are using MAs from 2 different pairs then you have an almost impossible task . . .  you would need to adjust all the values as the chart is moved left and right.
Roel
485
Roel 2015.01.07 23:53  
I know it is an old topic, but have an idea for ppl that may come accross this thread and are looking for an answer; why not normalize all values to -1 to 1 or 0 to 1 range? One challenge may be that the min/max values are sometimes not known.
Carl Schreiber
6165
Carl Schreiber 2015.01.08 10:08  

Even if you place 2 ATR with different Periods in the same sub-window the crossing that you see might correspond to a crossing in the data or not - that's mt4 :(

The only thing you can do is write you own indicator..

ffoorr
996
ffoorr 2015.01.08 11:30  

It do not seem difficult to turn a MACD into a percent MACD, but one's have to determine what will match with the 0% and the 100% .

Either someone on a forum was saying that overlaying an RSI with an ATR would give good crossing point, but what would be the 0% and the 100% for the ATR ?

/ /12
To add comments, please log in or register