Create entry signal only when state changes to the opposite

Post Reply
TradingHeroes
Posts: 79
Joined: Wed May 04, 2022 9:45 pm

Create entry signal only when state changes to the opposite

Post by TradingHeroes »

Hi,

It would be great if there was a way to have a 1-time alert that only goes off when the state of an indicator, or price relative to an indicator, changes to the opposite.

For example, if I tested a 50/200 MA crossover, I would only want to pause the chart or take a trade on the first candle when the 50 MA closes above or below the 200 MA. Right now, when I try to create a Rule like this, the chart pauses every time the 50 is above/below the 200...which is on every candle.

Another example would be a RSI strategy that uses the 50% level to take signals. Go long on the first close above the 50% line and go short on the first close below the 50% line. Again, I could not automate this process because there would be a signal on every single candle.

Thanks.
NakedMarkets
Posts: 251
Joined: Tue Feb 22, 2022 11:06 am

Re: Create entry signal only when state changes to the opposite

Post by NakedMarkets »

Hi,

If we understood properly, it's possible to do it by using another condition to your current one.

If we take your example to set your condition when a 50 MA crosses above a 200 MA. Right now, we imagine that you create a condition like that :
[Indicator Value SMA 50 (position 0)] > [Indicator Value SMA 200 (position 0)]

If so, yes, the condition will be triggered any time the MA50 is higher than MA200 (even if it already crossed above).
But if we add another condition related to the previous candle (position 1), like that :
[Indicator Value SMA 50 (position 0)] > [Indicator Value SMA 200 (position 0)] AND [Indicator Value SMA 50 (position 1)] < [Indicator Value SMA 200 (position 1)]

You can see this example here : viewtopic.php?p=288

In this case, the condition will be triggered only when a recent cross will occur because we checked that the previous candle was the opposite condition. This can be done with the RSI as well, by adding another opposite condition on the previous candle.
Let us know if it's what you wanted.

Another option would be to add some kind of checkbox for a rule in order to trigger the condition only on the first occurence
TradingHeroes
Posts: 79
Joined: Wed May 04, 2022 9:45 pm

Re: Create entry signal only when state changes to the opposite

Post by TradingHeroes »

Ah OK, yeah should work. Thanks for the help.

A checkbox for first occurrence would be super helpful though, especially with other indicators.
Post Reply