Difference between two currencies

 

Hello

Can someone help me to find or to build an indicator that calculates the difference between two currencies?

And then, can someone help me to modify Bressert double stochastic or Robby DSS Bressert Coloured so that, instead of the price, they use the value of another indicator?

Thanks

LUCMAT

 

Of price difference between two symbols - you can do it this way :

#property indicator_separate_window

#property indicator_buffers 1

#property indicator_color1 Red

//

//

//

//

//

extern string Symbol1 = "";

extern string Symbol2 = "";

extern int Price = PRICE_CLOSE;

double diff[];

//------------------------------------------------------------------

//

//------------------------------------------------------------------

int init()

{

SetIndexBuffer(0,diff);

if (Symbol1=="") Symbol1=Symbol();

if (Symbol2=="") Symbol2=Symbol();

IndicatorShortName(Symbol1+" to "+Symbol2+" difference");

return(0);

}

int deinit() { return(0); }

int start()

{

int counted_bars=IndicatorCounted();

if(counted_bars<0) return(-1);

if(counted_bars>0) counted_bars--;

int limit = MathMin(Bars-counted_bars,Bars-1);

for(int i=limit; i>=0; i--)

{

int y = iBarShift(Symbol1,0,Time); double price1 = iMA(Symbol1,0,1,0,MODE_SMA,Price,y);

y = iBarShift(Symbol2,0,Time); double price2 = iMA(Symbol2,0,1,0,MODE_SMA,Price,y);

diff = price1-price2;

}

return(0);

}
lucmat:
Hello

Can someone help me to find or to build an indicator that calculates the difference between two currencies?

And then, can someone help me to modify Bressert double stochastic or Robby DSS Bressert Coloured so that, instead of the price, they use the value of another indicator?

Thanks

LUCMAT
 

DSS of any value ...

And this part is about DSS Bressert : these two indicators are using a function to calculate DSS value. First one (the "any" is calculating a regular DSS value and is posted here to show how can it be used to calculate regular value using normal prices. The second one is that same thing but already using RSI instead of prices. See the comparison of the 2 " upper is the regular, lower is the DSS of RSI

I think that using these two as a "template" you can easily make it calculate DSS of any value you wish

lucmat:
Hello

Can someone help me to find or to build an indicator that calculates the difference between two currencies?

And then, can someone help me to modify Bressert double stochastic or Robby DSS Bressert Coloured so that, instead of the price, they use the value of another indicator?

Thanks

LUCMAT
 
mladen:
And this part is about DSS Bressert : these two indicators are using a function to calculate DSS value. First one (the "any" is calculating a regular DSS value and is posted here to show how can it be used to calculate regular value using normal prices. The second one is that same thing but already using RSI instead of prices. See the comparison of the 2 " upper is the regular, lower is the DSS of RSI
I think that using these two as a "template" you can easily make it calculate DSS of any value you wish

Mladen,

Is there a MTF version of the DSS Bressert - rsi.mq4 somewhere ?

Thank you .

 
airquest:
Mladen,

Is there a MTF version of the DSS Bressert - rsi.mq4 somewhere ?

Thank you .

Posted it here : https://www.mql5.com/en/forum/173574/page309

 
mladen:
Of price difference between two symbols - you can do it this way :
#property indicator_separate_window

#property indicator_buffers 1

#property indicator_color1 Red

//

//

//

//

//

extern string Symbol1 = "";

extern string Symbol2 = "";

extern int Price = PRICE_CLOSE;

double diff[];

//------------------------------------------------------------------

//

//------------------------------------------------------------------

int init()

{

SetIndexBuffer(0,diff);

if (Symbol1=="") Symbol1=Symbol();

if (Symbol2=="") Symbol2=Symbol();

IndicatorShortName(Symbol1+" to "+Symbol2+" difference");

return(0);

}

int deinit() { return(0); }

int start()

{

int counted_bars=IndicatorCounted();

if(counted_bars<0) return(-1);

if(counted_bars>0) counted_bars--;

int limit = MathMin(Bars-counted_bars,Bars-1);

for(int i=limit; i>=0; i--)

{

int y = iBarShift(Symbol1,0,Time); double price1 = iMA(Symbol1,0,1,0,MODE_SMA,Price,y);

y = iBarShift(Symbol2,0,Time); double price2 = iMA(Symbol2,0,1,0,MODE_SMA,Price,y);

diff = price1-price2;

}

return(0);

}

hi

please created for mt5 (Difference between two currencies)

thank you

 
soil82:

hi

please created for mt5 (Difference between two currencies)

thank you

What would be the usage?
 
sebastianK:
What would be the usage?
It can not be used (try JPY crosses against non-JPY crosses : different range of values)
 
sebastianK:
What would be the usage?

please creat mq5 version

 

thanks 

 
The Forex Trading is about the dealing of two currencies and it is the best way to make some good money online.
 
Afro-head:
The Forex Trading is about the dealing of two currencies and it is the best way to make some good money online.
What does that have in common with the indicator?