Keltner Channel - page 7

 
Blaiserboy:
The logic in this one is not quite correct.

As you can see in the code...... it expects upper channel and lower channel to be crossed alternately. When there are two consecutive crosses of the upper or lower...... then the wrong alert is sent.

void doAlert(string doWhat)

{

static string previousAlert="nothing";

static datetime previousTime;

string message;

if (previousAlert != doWhat || previousTime != Time[0]) {

previousAlert = doWhat;

previousTime = Time[0];

//

//

//

//

//

message = StringConcatenate(Symbol()," at ",TimeToStr(TimeLocal(),TIME_SECONDS)," Keltner price penetrated ",doWhat," channel ");

if (alertsMessage) Alert(message);

if (alertsEmail) SendMail(StringConcatenate(Symbol()," Keltner channel "),message);

if (alertsSound) PlaySound(soundfile);

}

}

you can see that it changes based on the previous alert instead of the price action.

daveM

daveM

delete the "previousAlert != doWhat" part and it will not take into account the previous alert and it will alert each and every time the band is broken

 

mladen

Thanks for reply.

I made that fix buit it did not solve the problem, actually it causes more problems.

I will see if I can fix it, not sure I understand the code.

daveM

 
Blaiserboy:
mladen

Thanks for reply.

I made that fix buit it did not solve the problem, actually it causes more problems.

I will see if I can fix it, not sure I understand the code.

daveM

Try out this one : keltner_channel_alerts_2.mq4

Use the alertsOnEachBreakparameter (set it to true to get alerted each time the price breaks the bands)

 

Wow That was fast!

Thank you.

I will try it and let you know.

What attracted me to this indicator is that I saw someone using it and I played with it and started to make an ea using it. I think there is good potential.

Thanks again.

daveM

 

Dear Mladen

Keltner channel hasn't been updated for a while. If you find some free time, could you please update your Keltner channel/oscillator indicators? I'd appreciate if you also can make it a MTF version. 

Also, if you have made Starc bands indicators before, please share its links. Search doesn't have results...

Thank you sir. 

 
heispark:

Dear Mladen

Keltner channel hasn't been updated for a while. If you find some free time, could you please update your Keltner channel/oscillator indicators? I'd appreciate if you also can make it a MTF version. 

Also, if you have made Starc bands indicators before, please share its links. Search doesn't have results...

Thank you sir. 

Here is this version first


It is a metatrader 5 of STARC (Stoller Average Range Channels (STARC Bands)) with some deviations

By definition STARC bands are :

STARC (Stoller Average Range Channels) show three lines which create a channel around an ordinary moving average. These three lines are:

  • An n–period Simple Moving Average (SMA).
  • An upper band, which is the n-period SMA plus an m-period Average True Range (ATR) multiplied by a constant K.
  • A lower band, which is the n-period SMA minus an m-period ATR multiplied by a constant K.

STARC bands were developed by Manning Stoller.

This version :

  • has two bands (not just one) which are drawn as a channel
  • it allows usage of any of the basic 4 type of averages for calculating the basic value of STARC and for ATR calculation

It is a multi time frame version already


Files:
STARC bands.mq5  31 kb
 
mladen:

Here is this version first


It is a metatrader 5 of STARC (Stoller Average Range Channels (STARC Bands)) with some deviations

By definition STARC bands are :

This version :

  • has two bands (not just one) which are drawn as a channel
  • it allows usage of any of the basic 4 type of averages for calculating the basic value of STARC and for ATR calculation

It is a multi time frame version already


Thank you sir, 

If you make MT4 version in the future, please post here.

Regards, 

 
heispark:

Thank you sir, 

If you make MT4 version in the future, please post here.

Regards, 

Here is the mt4 version too (just a bit different visual appearance)


Files:
STARC bands.mq4  13 kb
 
mladen:

Here is the mt4 version too (just a bit different visual appearance)


Thank you again, sir!  :-)
 

Mladen Rakic:

Here is the mt4 version too (just a bit different visual appearance)



Hi

I need the keltner channels which the centerline is sma(period) and the upper and lower channels lines are offset up and down by the following amount: (offset multiplier x SMA ( H-L, period)

for meta trader 4

thank you

Reason: