Aurix Exchange

Require Display alert

checkmail

Member
Hello friends this is checkmail and have tested two mtf indicators for some time and its good to work with but sometimes its not easy to detect trend due to its
indi movements so an Text signal in form of LONG/SHORT along with an arrow would be useful to understand signals even in messy times.

Both Indicators are mtf indicators, one is based on macd, and another is based on bbands.

Is anyone interested in this coding, post reply. :)
 
Hello friends this is checkmail and have tested two mtf indicators for some time and its good to work with but sometimes its not easy to detect trend due to its
indi movements so an Text signal in form of LONG/SHORT along with an arrow would be useful to understand signals even in messy times.

Both Indicators are mtf indicators, one is based on macd, and another is based on bbands.

Is anyone interested in this coding, post reply. :)

look at this:

Add arrow signals

Here is an explanation about how to add arrow signals to your indicator. As you will see, it's more complicated than adding a sound alert. You have to know the base of coding, although you don't need to be an expert.

In the header of your indicator, add this :

Code:

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red

Then after the main extern parameters, add this :

Code:

extern bool ArrowsSignal = true;

int limit=1;int counter;
double CrossUp[];
double CrossDown[];
double prevtime;
double Range, AvgRange;

Your init iteration should look like this :

Code:

int init()
{
SetIndexStyle(0, DRAW_ARROW, EMPTY, 2);
SetIndexArrow(0, 233);
SetIndexBuffer(0, CrossUp);
SetIndexStyle(1, DRAW_ARROW, EMPTY, 2);
SetIndexArrow(1, 234);
SetIndexBuffer(1, CrossDown);

return(0);
}

int deinit()
{
return(0);
}

In your code you have to create the conditions or to identify them if they already exist. Like : if(EMA5>EM15){ alert(...

After that you will be able to build the code that will say where the arrows have to be drawn :

Here is an example :

Code:

for(int i=1;i<=limit;i++){

counter=i;
Range=0;
AvgRange=0;

for (counter=i ;counter<=i+9;counter++)
{
AvgRange=AvgRange+MathAbs(High[counter]-Low[counter]);
}

Range=AvgRange/10;

if(EMA5>EMA15){if(ArrowsSignal == true)CrossUp = Low - Range*0.5;}

if(EMA5<EMA15){if(ArrowsSignal == true)CrossDown = High + Range*0.5;}

if ((CrossUp[0] > 2000) && (CrossDown[0] > 2000)) { prevtime = 0; }
if ((CrossUp[0] == Low[0] - Range*0.5) && (prevtime != Time[0]))
{
prevtime = Time[0];
}
if ((CrossDown[0] == High[0] + Range*0.5) && (prevtime != Time[0]))
{
prevtime = Time[0];
}
}
 

checkmail

Member
Mtf indicators to be modified

Mtf indicators to be modified

Hello friends this is checkmail and am uploading the mtf indicators in this post which are required to be modified.

The Modification :

1) The indicators should display an Text signal on charts that is adjustable within four corners.

2)Also should draw an arrow and an vertical straight line on cross or trend change, this must be given as extern inputs, means to use it or not.

Below are the indicators that require to be modified.
_______________________________________________
Also thanks for the arrow code will code some.:)
 

Attachments

  • averages - mtf & alerts.mq4
    15.4 KB · Views: 3
  • MTF_MACD_inColor.mq4
    4.7 KB · Views: 3
  • MTF_BBands_Stopv1.mq4
    4.5 KB · Views: 3

Aurix Exchange
Top