Maybe someone can translate the short example into a code for better understanding.
Its part of a tiny and simple 90% winning strategy i attached below. Though the trigger doesnt occure very often on a daily bar chart, you can use smaller time frames to trade. It works on any timeframe!
Would be great if someone could translate that into a code and post it or send it to me via email: [email protected]
Thanks in advance!
Example:
If RSI (4) was >=70 during the last (-1)-(-20) bars and cross below 30 on bar 0
then enter short.
In the condition builder, if i use the "bars ago" feature it only compares the current value with the value of exact # of bar ago. There is no possibility to campare current value to a value during a timeframe.
------------------------------------------------------------
Here is the complete strategy!
If RSI 4 was below 30 during last 20 bars
If RSI 9 was above 70 during last 5 bars
If RSI 4 was above 70 during last 5 bars
-----------
If RSI cross below 30 during last 5 bars
enter short
-------------
if RSI 9 <= 30 (or cross below 30)
exit short.
This can be mirrored for a long position
Comment