How to generate alert condition (for past N bars)?
Author: algoapi
Creation Date: 4/21/2009 9:47 AM
profile picture

algoapi

#1
Can anyone advice how to generat alert conditions for past N bars? for example, "RSI CrossAbove 30 during past 5 bars, and EMA(10) CrossAbove EMA(20) during past 3 bars".
If possible, I would prefer a simple one sentence script to express this, since I need to have several such alert conditions before initiating a trade action.
Any help is appreciated!
profile picture

Eugene

#2
See CrossOverBar, CrossUnderBar in Community.Indicators - they're designed for this sort of work.

For tasks where you can't express the condition with a cross above/below of one series with another, i.e. a more generic approach --
Tutorial: Setups, Triggers, Delays, and Timeouts
profile picture

algoapi

#3
Thanks Cone. That's helpful.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).