Alert on touch or cross upper or lower BB

To add comments, please log in or register
Knortzsch
55
Knortzsch  

Hi,

I am looking for an indicator which gives an alert when the price is touching or crossing the upper or lower BB line (using 50 BB with 1 devi). 

I dont know if its possible but it would be good to only show alerts when the price was outside the BB and then touches/crosses the upper or lower BB. When price was inside the BB and moving outside there shouldnt be an alert. 

Alert can be arrow or the zone where it touches/crosses can be colored background.

Appreciate any tip or help, thank you

Vladimir Karputov
Moderator
192915
Vladimir Karputov  
Knortzsch :


Please draw your question as a picture.

Knortzsch
55
Knortzsch  
Vladimir Karputov:

Please draw your question as a picture.

See attached.


Price is inside BB, then moves out, once the candle closed and is not within the BB we look for the moment the price touches/crossing upper or lower BB



if this is too complicated then any touch or cross of price with the lower/upper band would be enough which includes that if price was outside and comes back inside BB that it would cause a touch/cross

Vladimir Karputov
Moderator
192915
Vladimir Karputov  

What do you mean by "Alert"?

  • sound reproduction ( PlaySound )
  • message in a separate window ( Alert )
Or maybe you need to make a kind of indicator BB - besides the three lines show another additional buffer - the drawing style ( DRAW_ARROW )?
Documentation on MQL5: Common Functions / PlaySound
Documentation on MQL5: Common Functions / PlaySound
  • www.mql5.com
Common Functions / PlaySound - Reference on algorithmic/automated trading language for MetaTrader 5
Knortzsch
55
Knortzsch  
Vladimir Karputov:

What do you mean by "Alert"?

  • sound reproduction ( PlaySound )
  • message in a separate window ( Alert )
Or maybe you need to make a kind of indicator BB - besides the three lines show another additional buffer - the drawing style ( DRAW_ARROW )?

Alert can be simply an arrow/ any symbol or colored background area.

Vladimir Karputov
Moderator
192915
Vladimir Karputov  
Knortzsch :

See attached.


Price is inside BB, then moves out, once the candle closed and is not within the BB we look for the moment the price touches/crossing upper or lower BB



if this is too complicated then any touch or cross of price with the lower/upper band would be enough which includes that if price was outside and comes back inside BB that it would cause a touch/cross

Here is the first version: pay attention - I made a very strict condition in this version: the previous bar (both the price of 'high' and the price of 'low') should be outside.

If this is a very strict condition, I can mitigate it: instead of the prices 'high' and 'low' use the prices 'open' and 'close'.

Vladimir Karputov
Moderator
192915
Vladimir Karputov  

Bollinger Bands Cross Arrow (version "1.003")

You can set the intersection search mode: 'strict' or 'soft'.

Bollinger Bands Cross Arrow

Knortzsch
55
Knortzsch  
Vladimir Karputov:

Bollinger Bands Cross Arrow (version "1.003")

You can set the intersection search mode: 'strict' or 'soft'.

Wow, that looks amazing! 

This version is for MT5 right? I forgot to mention that I only got MT4, is it very difficult to compile it for MT4?


From screenshots it looks perfect. Will be happy to test around with strict and soft version.


Thank you.

Marco vd Heijden
Moderator
13012
Marco vd Heijden  

Ah yes the oops i forgot to mention that i only have MT4 thingy.

Is it very difficult for you to install MT5 ? 

Vladimir Karputov
Moderator
192915
Vladimir Karputov  
Knortzsch :

Wow, that looks amazing! 

This version is for MT5 right? I forgot to mention that I only got MT4, is it very difficult to compile it for MT4?


From screenshots it looks perfect. Will be happy to test around with strict and soft version.


Thank you.

You wrote on the MQL5 forum. You wrote in the main section. Of course I gave you the MQL5 code.

There is no code for the old terminal and it will not be - you yourself are to blame for the fact that you are still sitting on the old terminal.

Knortzsch
55
Knortzsch  
Vladimir Karputov:

You wrote on the MQL5 forum. You wrote in the main section. Of course I gave you the MQL5 code.

There is no code for the old terminal and it will not be - you yourself are to blame for the fact that you are still sitting on the old terminal.

Yes I agree, my fault.

Thanks a lot for your effort, this one is a good solution

12
To add comments, please log in or register