Hello, can someone help me create a filter :
– which starts when a condition appears
– which ends when another condition occurs.
This filter will be included in a robot and will be used to take sales on a lower TF.
The filter starts when :
– the SMA7 > SMA20 AND the SMA7 turns down,
The filter disappears when :
– the SMA7 turns upwards
I tried to create a code to accept trades only between these conditions but it doesn’t seem to work the way I want it to.
Using graph it only shows the first condition and I can’t create an indicator that could color the background (with backgroundcolor) so I don’t realize where the error comes from.
Maybe you should use a While loop but I haven’t found the solution.
Here is the code:
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue