Setting Up an Alert for an Indicator

[Deleted]  
Let's say I want to setup an alert based on whether an indicator (like RSI), rises above a certain level? Can I do that and if yes, how?
Simon Gniadkowski
17411
adevore:
Let's say I want to setup an alert based on whether an indicator (like RSI), rises above a certain level? Can I do that and if yes, how?

Yes, . . .

double A_Variable;

if(iRSI() > A_Variable)  Alert();
[Deleted]  
RaptorUK:

Yes, . . .


Sounds good. Can you just be a little more specific? Where do I insert the 25, and where do I place all that code? I want to be alerted when RSI hits 25 or dips below.
Simon Gniadkowski
17411
adevore:

Sounds good. Can you just be a little more specific? Where do I insert the 25, and where do I place all that code? I want to be alerted when RSI hits 25 or dips below.
I can but I won't . . I'm not going to write your code for you, I don't have time, sorry.
Tjipke de Vries
6876
Tjipke de Vries  
adevore:

Sounds good. Can you just be a little more specific? Where do I insert the 25, and where do I place all that code? I want to be alerted when RSI hits 25 or dips below.

extern int PeriodRSI = 14;
extern double A_Variable = 25;



Start();

if(iRSI(NULL,0,PeriodRSI,PRICE_CLOSE,0) <= A_Variable)Alert();

Return(0);

.. A little bit more specific

. This will alert when RSI hits 25 or dips below.