Thanks so much, you're the best. Is the option "OldCalculation" what you mentioned with repainting from old version? If I turn it to true, it will go back to the old indicator's repaint method?
Can you put in an option to turn on/off the MA filter? Thanks!
I tested the MA filter but for example, when prices are below MA, there is still a buy alert.
Will try to answer both questions the old calculation was using atr the new calculation uses high and low plus and minus updown shift that changes depending on your timeframe. It has nothing to do with the repainting that was going on before,you can try any settings and it won't repaint after a closed bar.
I coded the alerts to go when price breaks the super trend, that was the way i understood your request, and I can add code to add or remove the ma, but want to make sure how you want the alerts.
You correctly coded the alerts when price breaks the super trend. The MA filter is just an option to turn on or off when prices are above/below the MA when alert is suppose to go off. So for example if the MA filter is turned on, a buy alert will only go off when price is above the MA, etc. If MA filter is turned off, all alerts will go off regardless of price in relations to MA. Thanks again.
Think this one got it.
Thanks again mrtools!
Sorry i can't attach it. I past the code here.
//| KI_signals_v1.mq4 |
//| Kalenzo |
//| firstname.lastname@example.org |
#property copyright "Kalenzo"
#property link "email@example.com"
#property indicator_buffers 8
#property indicator_color1 AliceBlue
#property indicator_color2 AliceBlue
#property indicator_color3 DarkViolet
#property indicator_color4 DarkViolet
#property indicator_level1 0
extern int Length1 = 3;
extern int Length2 = 10;
extern int Length3 = 18;
// 60[min] = PERIOD_H1
int period = 60;
//| Custom indicator initialization function |
//---- additional buffers are used for counting
// IndicatorShortName("KI signals v1");
int counted_bars;// = IndicatorCounted();
int tmp, i, j, m;
// this is fro M30 (we are on it), but we want for H1
counted_bars = IndicatorCounted();
// ----------- H1
// this is for H1, but counted_bars is for M30
limit = (Bars-counted_bars)/(period/Period()) + 1;
for (i = 0 ;i <= limit ;i++)Histoh1 = iMA(Symbol(),period,Length1,0,MODE_EMA,PRICE_CLOSE,i) - iMA(Symbol(),period,Length2,0,MODE_EMA,PRICE_CLOSE,i);
for (j = 0 ;j <= limit ;j++)MaHistoh1[j] = iMAOnArray(Histoh1,0,Length3,0,MODE_EMA,j);
for (m = 0 ;m <= limit ;m++)
tmp = iTime (Symbol(),period,m);
for (j = 0; j < Bars; j++)
if (iTime(Symbol(),0,j) == tmp)
uph1[j-period/Period()+1] = iOpen(Symbol(),period,m)-(20*Point);
if(MaHistoh1[m+1] >= 0 && MaHistoh1[m]<0)
dnh1[j-period/Period()+1] = iOpen(Symbol(),period,m)+(20*Point);
// ----------- M30
for (i = 0 ;i <= limit ;i++)Histo = iMA(Symbol(),0,Length1,0,MODE_EMA,PRICE_CLOSE,i) - iMA(Symbol(),0,Length2,0,MODE_EMA,PRICE_CLOSE,i);
for (j = 0 ;j <= limit ;j++)MaHisto[j] = iMAOnArray(Histo,0,Length3,0,MODE_EMA,j);
for (i = m+1; i < limit; i++)
if (uph1 != dnh1)
if (uph1 < dnh1)
up[m] = iOpen(Symbol(),0,m)-(20*Point);
if(MaHisto[m+1] >= 0 && MaHisto[m]<0)
if (uph1 > dnh1)
dn[m] = iOpen(Symbol(),0,m)+(20*Point);
Some help?? Thank you
please can someone add an sound and window alert when the line is changing the position? Maybe with e-mail-alert, too?
looks good, I have put 3 different deeps on 1 chart and it gives a better picture of the market structure. But it is difficult to show the 3 lines which are necessarily parly one above the other. It would be helpful if it were possible to change to other stylse of the lines f.i. dots etc!
Have a look at the screenshot.
It is possible to modify an indicator,if we have only the ex.4 file
but we don't have the mql.4?
No not possible to modify an ex.4 file.