Of price difference between two symbols - you can do it this way :
#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);
}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
LUCMATDSS 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
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
LUCMATAnd 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 .
Posted it here : https://www.mql5.com/en/forum/173574/page309
Of price difference between two symbols - you can do it this way :
#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
hi
please created for mt5 (Difference between two currencies)
thank you
What would be the usage?
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.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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