Indicators with alerts/signal - page 617

William Snyder
9492
William Snyder  
rikiolivier:
mrtools or mladen,

Was wondering if one of you can please add text to the attached inidicator as in the (Nrp SuperTrend Histo_mtf+alerts 2.01 - Text) indicator. It would greatly be appreciated. Thank you very much in advance.

rikiolivier

Rikiolivier, added the text.

Michael Hand
173
Michael Hand  

mladen - I've set it up as you said but I only wanted alerts on crossing of green and yellow but I still get alerts on crossing of green and red as well, although I suppose an option to have both or either would be good.

Mladen Rakic
154659
Mladen Rakic  
handy148:
mladen - I've set it up as you said but I only wanted alerts on crossing of green and yellow but I still get alerts on crossing of green and red as well, although I suppose an option to have both or either would be good.

handy148

Tested it right now and it works as it should

Here are examples of green crossing yellow (and alerting) and green crossing red and there is no alert. It is made the way that one excludes the another so if alertsOnMiddleCross is set it is not checking the green crossing the red at all. It can alert on both only if you have two (or more) instances of the indicator and one is set to alert on middle crosses and the another is not

Files:
alerts_1.gif 51 kb
alerts_2.gif 45 kb
RIKI OLIVIER SR
256
RIKI OLIVIER SR  
mrtools:
Rikiolivier, added the text.

mrtools,

Perfect as always. Thank you.

Michael Hand
173
Michael Hand  

Don't know what I'm doing wrong then - here is a screenshot

http://i43.tinypic.com/10nz3bd.jpg

Mladen Rakic
154659
Mladen Rakic  
handy148:
Don't know what I'm doing wrong then - here is a screenshot http://i43.tinypic.com/10nz3bd.jpg

In that particular case you have a cross of green with red and yellow on the same bar

Files:
yellow_red.jpg 122 kb
Michael Hand
173
Michael Hand  

If you look at the right hand side of my screenshot there are two aqua arrows and one red arrow where red crosses green which are nowhere near the yellow line and the alert is set for middle cross.

Mladen Rakic
154659
Mladen Rakic  
handy148:
If you look at the right hand side of my screenshot there are two aqua arrows and one red arrow where red crosses green which are nowhere near the yellow line and the alert is set for middle cross.

I am looking at that exact picture of yours and the green is crossing the yellow line at exactly the same bar as red. I will repeat again : it can not alert both things - it is simply excluding each other and is not possible to happen. Here is the code that does that and you can see that there is no way how both crosses can be triggered from the indicator

if (alertsOnMiddleCross)

{

if (rsiPriceLine > bandMiddle) trend = 1;

if (rsiPriceLine < bandMiddle) trend = -1;

}

else

{

if (rsiPriceLine > rsiSignalLine) trend = 1;

if (rsiPriceLine < rsiSignalLine) trend = -1;

}

As you can see if alertsOnMiddleCross is set to true it does not check a signal line (red line) cross at all and it is impossible to alert on a signal (red) line cross. Check data window for confirmation and you will see that it is what is happening

Arrows are treated separately in that indicator with separate conditions

Attached your picture in the previous post of mine so that everybody can check when are lines crossing each other. Also attaching same symbol, same period same settings on my terminal and as you can see, the cross happens on the exactly same bar

Files:
cross.gif 35 kb
Michael Hand
173
Michael Hand  

mladen - well I don't think I'm going crazy but anything is possible I suppose. Here is another screenshot where I have highlighted with white vertical lines clearly showing arrow alert when green crosses red, not green crossing yellow and there is also a green vertical line showing green crossing yellow with no arrow alert.

http://i42.tinypic.com/286y878.jpg

Mladen Rakic
154659
Mladen Rakic  
handy148:
mladen - well I don't think I'm going crazy but anything is possible I suppose. Here is another screenshot where I have highlighted with white vertical lines clearly showing arrow alert when green crosses red, not green crossing yellow and there is also a green vertical line showing green crossing yellow with no arrow alert. http://i42.tinypic.com/286y878.jpg

Are you looking for alertsor arrows?

Your original request was to have alertswhen the green line crosses the yellow line not the arrowswhen the green line crosses the yellow line. As I said already in one post, the way that indicator is written, arrows are treated separately and all the time I am talking about alerts not arrows