Filter for downtrend

Forums ProRealTime English forum ProOrder support Filter for downtrend

Viewing 1 post (of 1 total)
  • #158882

    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:

Viewing 1 post (of 1 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login