Coding help - page 200

 
alpha24:
Yes sir but I can not code it please do it for me. Thanks in advance

alpha24

Posted it here (used default parameters from that afl formula) : https://www.mql5.com/en/forum/173404/page5

 

mladen, i have some request to make if it possible

i always scalp trade with 20-30 pips profit( 5 digit broker ), but since im using 1min chart sometimes 20-30 pips tp fools me because of the small range, so if you can make simple indicator to show current pip range of the chart, i post image below to show you what i mean, thanks again

edit: there's some mistake about the value of the pip range, it suppose to be 170 pips

Files:
untitled.jpg  109 kb
 

hi all.

actually i already posted about this on other thread but then i found this thread which seems more appropriate place for me to ask for help. anyone can help me to add currency name when this indicator's window alert appeared? since i open many pairs so its hard to know which one this indicator referred to. it just tell buy/sell signal at time it happen. so i have to check every pairs to know which one this alert from.

thanks.

 
forex_love:
hi all.

actually i already posted about this on other thread but then i found this thread which seems more appropriate place for me to ask for help. anyone can help me to add currency name when this indicator's window alert appeared? since i open many pairs so its hard to know which one this indicator referred to. it just tell buy/sell signal at time it happen. so i have to check every pairs to know which one this alert from.

thanks.

Forex_love added the currency pair to the alert at your first post.

 
mrtools:
Forex_love added the currency pair to the alert at your first post.

it's working.. thanks once again mrtools.. if i'm right, this is the first bbstops indicator with alert on current bar true/false option and currency name.. i search for it,they only have either currency name without alert on current true/false option or like the one i attached have alert on current set to true/false but without currency name.. now u make it both in this indicator! hope u can understand my broken english.lol.. now i can experimenting easily with this indicator.. thanks..

for those who want to try the indicator, what mrtools saying by my first post is not my above post but my post on other thread.. to help you find the indicator easily i will post the improved version by mrtools here(bbstop with currency name)..

 

Mladen, can you help me to correct this indicator? dont plot the line...

thanks

#property indicator_separate_window

#property indicator_buffers 3

#property indicator_color1 Red

extern int ROC_Period=24;

extern int RSI_Period=3;

extern int bars_to_calculate = 250;

extern bool flip_line_up_side_down = false;

extern double USD = 1.0, // weights

JPY = 1.0,

GBP = 1.0,

CHF = 1.0,

CAD = 1.0,

AUD = 1.0,

NZD = 1.0;

double BIAS = 0; // starting value for the first bar

//---- indicator buffers

double Index[];

double ROC[];

double RSIonROC[];

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

string name = "";

//---- indicator line

IndicatorShortName(name);

IndicatorBuffers(3);

SetIndexStyle(0,DRAW_LINE,EMPTY,EMPTY);

SetIndexBuffer(0,RSIonROC);

SetIndexLabel(0,NULL);

//----

return(0);

}

//+------------------------------------------------------------------+

//| Calculates the relative change of symbol between bar i and i+1 |

//+------------------------------------------------------------------+

double Sentinal(string symbol, int i = 0)

{

double a = iMA(symbol,0,1,0,0,4,i),

b = iMA(symbol,0,1,0,0,4,(i+1)),

move = a-b;

if(a==0||b==0)

{

if(i==0)

Print("Warning: No "+symbol+" data loaded.");

return(0);

}

double moveInPercent = 100*move/b;

return(moveInPercent);

}

//+------------------------------------------------------------------+

int start()

{

// int iMax = Bars - 1 - IndicatorCounted();

int iMax = Bars -1 ;

if(iMax >= bars_to_calculate)

{

iMax = bars_to_calculate;

}

Index = BIAS;

//----

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

{

double x = 0;

x += USD * Sentinal("EURUSD",i);

x += JPY * Sentinal("EURJPY",i);

x += GBP * Sentinal("EURGBP",i);

x += CHF * Sentinal("EURCHF",i);

x += CAD * Sentinal("EURCAD",i);

x += AUD * Sentinal("EURAUD",i);

x += NZD * Sentinal("EURNZD",i);

if (flip_line_up_side_down)

x *= -1;

Index = Index+x;

ROC=iClose(Index,0,i)-iClose(Index,0,i+ROC_Period);

RSIonROC=iRSIOnArray(ROC,Bars,RSI_Period,i);

}

return(0);

}

 
k3rn3l:
Mladen, can you help me to correct this indicator? dont plot the line...

thanks

#property indicator_separate_window

#property indicator_buffers 3

#property indicator_color1 Red

extern int ROC_Period=24;

extern int RSI_Period=3;

extern int bars_to_calculate = 250;

extern bool flip_line_up_side_down = false;

extern double USD = 1.0, // weights

JPY = 1.0,

GBP = 1.0,

CHF = 1.0,

CAD = 1.0,

AUD = 1.0,

NZD = 1.0;

double BIAS = 0; // starting value for the first bar

//---- indicator buffers

double Index[];

double ROC[];

double RSIonROC[];

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

string name = "";

//---- indicator line

IndicatorShortName(name);

IndicatorBuffers(3);

SetIndexStyle(0,DRAW_LINE,EMPTY,EMPTY);

SetIndexBuffer(0,RSIonROC);

SetIndexLabel(0,NULL);

//----

return(0);

}

//+------------------------------------------------------------------+

//| Calculates the relative change of symbol between bar i and i+1 |

//+------------------------------------------------------------------+

double Sentinal(string symbol, int i = 0)

{

double a = iMA(symbol,0,1,0,0,4,i),

b = iMA(symbol,0,1,0,0,4,(i+1)),

move = a-b;

if(a==0||b==0)

{

if(i==0)

Print("Warning: No "+symbol+" data loaded.");

return(0);

}

double moveInPercent = 100*move/b;

return(moveInPercent);

}

//+------------------------------------------------------------------+

int start()

{

// int iMax = Bars - 1 - IndicatorCounted();

int iMax = Bars -1 ;

if(iMax >= bars_to_calculate)

{

iMax = bars_to_calculate;

}

Index = BIAS;

//----

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

{

double x = 0;

x += USD * Sentinal("EURUSD",i);

x += JPY * Sentinal("EURJPY",i);

x += GBP * Sentinal("EURGBP",i);

x += CHF * Sentinal("EURCHF",i);

x += CAD * Sentinal("EURCAD",i);

x += AUD * Sentinal("EURAUD",i);

x += NZD * Sentinal("EURNZD",i);

if (flip_line_up_side_down)

x *= -1;

Index = Index+x;

ROC=iClose(Index,0,i)-iClose(Index,0,i+ROC_Period);

RSIonROC=iRSIOnArray(ROC,Bars,RSI_Period,i);

}

return(0);

}

k3rn3l

Try out the test indicator attached. The problem that is not solved is what are you trying to achieve with index buffer? You can not use it in this form : iClose(Index,0,i) (index is declared as double and iClose is expecting string at that parameter). It draws values now, but you need to do some more cleaning in the code

Files:
_test.mq4  3 kb
 

Hi everyone! Can someone code the "Commodity Selection Index"?

Here the formula (http://www.indicatorsmt4.com/indicators-wiki/trend-indicators/commodity-selection-index-csi/?lang=it)

The indicator helps to identify volatility and range market.

 
Luca82:
Hi everyone! Can someone code the "Commodity Selection Index"?

Here the formula (http://www.indicatorsmt4.com/indicators-wiki/trend-indicators/commodity-selection-index-csi/?lang=it)

The indicator helps to identify volatility and range market.

Luca82

Metatrader does not have all the data needed to calculate that indicator

Even on that link, the example shown is not a metatrader example

 

Possible to get the Arrows up in the Chart (Fx MTN) ? Need Help

Hi, i want to ask, if it is possible to rewrite this Indicator, so that it only shows the arrows, and they should show up at the candlesticks ? Could somebody help me with this, or maby code it for me please ?

regards

Slow

fxmtn-test.mq4

Files: