i am a new user, and need some help with setting an alert on the crossing of 2 stochastic (FAST & SLOW ONE) in adv chart. i am currently using stoch setting of (10(3),3) . SO FAR I HAVE MADE A MISTAKE. can u help me with the programming of such an alert
Announcement
Collapse
No announcement yet.
stochastic alert
Collapse
X
-
mack
I believe the attached modification will do what you asked and that is trigger only one alert on the same bar.
However it will not prevent false signals ie an intrabar crossover that ends up not to be true at the end of the bar.
Not knowing whether you prefer to have an early signal (even if false) or not I have set the efs up for both solutions.
If you want it to compute only at the end of a bar - thereby avoiding false signals - open the efs with the Editor and uncomment (ie remove the // in front of) Line 23 and comment out (ie type // at the beginning of those lines) Lines 59, 64, 70 and 74. They should be easily identifiable anyhow as there are some comments in the efs indicating them.
AlexAttached Files
Comment
-
stochastic crossover
Hi Mack,
You can edit this efs formula to the setting you like...but, IMO, 10,3,3 is designed more for support/resistance reversals at the 20/80 . I have noticed something like a 6,8,10 gives crossing signals instead of support/resistance crosses....you can tune your setting against something like RSI crossing 50, you may like a 10,6,8? Play around with stochastics until your comfortable. I use a 10, 2, 3 stochastic I like how it goes sideways in a trend.
'arrows sample"
Comment
-
opstock
Not sure this is the most appropriate way but I think the attached variation of the efs does what you asked.
AlexAttached Files
Comment
-
Alexis,
Thanks so much, it works great. I'll have to take a look at what you did. I've put together a couple of alert formulas using the wizard, but I can't get them to trigger only on the close without stopping the indicator plot lines from doing the same.
Do you know if there is a way to get a alert to signal with the crossing of an indicator line through a certain level, for example, a stochastic crossing the 20 and 80, or an RSI crossing the 30 and 70 etc.?
Thanks again,
opstock
Comment
-
opstock
Just apply the same logic that is in the stochastic alert efs ie
if(getBarState()==BARSTATE_NEWBAR){
your alert conditions here
}
This way your alerts are computed and triggered only when a new bar comes in while the studies plot on every tick.
Alex
Comment
-
Alexis,
I'm catching on slowly. I understand where to put the alert conditions, I just can't figure out how to write the conditions, lol. I know how to set up an alert for one signal-line crossing another, such as, a Fast Stoch crossing a Slow Stoch, or an MACD signal-line crossing, but how do you write a condition for an alert when an indicator plot line crosses a "certain level", for example, an RSI crossing above/below the 70/30 levels in the indicator pane? Do you know of an EFS with a similar alert condition coded in?
thanks,
opstock
Comment
-
opstock
For your purpose you could use the efs in the Builtin folder or you can click here and download any of the basic<studyname>.efs that are the same as the ones in the Builtin folder but with editable parameters (and have some comments too that may help).
For this example I used basicRSI.efs and as with the prior basicStochastic(alerts).efs I created first the condition for the new bar and then nested in it the conditions for the RSI lesser or greater than 30 and 70 respectively.
The attached is fully commented and should give you an idea as to how to construct your own.
AlexAttached Files
Comment
-
Received via PM
alex,
very happy with your efs.
could you help me make a small adjustment so that there is only an sound & message alert end of bar end when the fast stoch cross the 20 and 80 overbought/sold line
would it possible to also sent an e-mail when this happens
thank you so much
The attached efs should do what was requested. It is yet another variation of the same stochastic efs that has been posted in various versions in this same thread.
AlexAttached Files
Comment
-
Vincent
I believe the attached should do what you asked
AlexAttached Files
Comment
Comment