Is there "Crosses" condition in Rule Manager?
-
- Posts: 73
- Joined: Sun Dec 18, 2022 8:09 pm
Is there "Crosses" condition in Rule Manager?
Is there an option in the Rule Manager to do an action when one EMA crossess another EMA (ideally differentiating cross "from top" and cross "from bottom")?
-
- Posts: 251
- Joined: Tue Feb 22, 2022 11:06 am
Re: Is there "Crosses" condition in Rule Manager?
At the moment, there is no rule dedicated to crosses conditions but it can be done by defining the following rule.
As an example, we'd like to set a condition to pause the backtest when the SMA 20 (below) crosses the SMA 50 (above).
Here is the related core rule :
[Indicator Value SMA 20 (position 0)] < [Indicator Value SMA 50 (position 0)] AND [Indicator Value SMA 20 (position 1)] > [Indicator Value SMA 50 (position 1)]
Since you compare the value between the last bar and the previous last bar positions, you can check if the SMA cross occurs.
And you can reverse the SMA indicator values, if you want to catch the conditions "from top" :
[Indicator Value SMA 50 (position 0)] < [Indicator Value SMA 20 (position 0)] AND [Indicator Value SMA 50 (position 1)] > [Indicator Value SMA 20 (position 1)]
As an example, we'd like to set a condition to pause the backtest when the SMA 20 (below) crosses the SMA 50 (above).
Here is the related core rule :
[Indicator Value SMA 20 (position 0)] < [Indicator Value SMA 50 (position 0)] AND [Indicator Value SMA 20 (position 1)] > [Indicator Value SMA 50 (position 1)]
Since you compare the value between the last bar and the previous last bar positions, you can check if the SMA cross occurs.
And you can reverse the SMA indicator values, if you want to catch the conditions "from top" :
[Indicator Value SMA 50 (position 0)] < [Indicator Value SMA 20 (position 0)] AND [Indicator Value SMA 50 (position 1)] > [Indicator Value SMA 20 (position 1)]
-
- Posts: 73
- Joined: Sun Dec 18, 2022 8:09 pm
Re: Is there "Crosses" condition in Rule Manager?
Thank you for the solution!
If in the future updates there could be condition of crossing it would make it even simplier, so I think it could be a nice addition.![Smile :)](./images/smilies/icon_e_smile.gif)
If in the future updates there could be condition of crossing it would make it even simplier, so I think it could be a nice addition.
![Smile :)](./images/smilies/icon_e_smile.gif)
Re: Is there "Crosses" condition in Rule Manager?
Thanks! I was just looking for something like this! Was about to ask if a "crossing rule" will be implemented or not. Cheers
-
- Posts: 1
- Joined: Mon Jul 03, 2023 3:39 am
Re: Is there "Crosses" condition in Rule Manager?
Since many want this rule, we will create it. It will be included in the next release since it's pretty easy to implement,
Thanks for your suggestions
Thanks for your suggestions
Re: Is there "Crosses" condition in Rule Manager?
Hi, I managed to program the crossover rule but I still have a problem.
When I backtest my short and long rule alone, everything is perfect, but when I add both rule in the same backtest, nothing follow my rule anymore.
Could someone help me ?
Thanks !
When I backtest my short and long rule alone, everything is perfect, but when I add both rule in the same backtest, nothing follow my rule anymore.
Could someone help me ?
Thanks !
-
- Posts: 251
- Joined: Tue Feb 22, 2022 11:06 am
Re: Is there "Crosses" condition in Rule Manager?
Hello,
Sure, we can help you. Could you share with us your rules to see how they are implemented ?
You can send them by email at support@naked-markets.com if you want,
Thanks
Sure, we can help you. Could you share with us your rules to see how they are implemented ?
You can send them by email at support@naked-markets.com if you want,
Thanks
-
- Posts: 73
- Joined: Sun Dec 18, 2022 8:09 pm
Re: Is there "Crosses" condition in Rule Manager?
Has the "crosses" condition been already implememented as mentioned above?
If so, where can it be found?
If so, where can it be found?
-
- Posts: 251
- Joined: Tue Feb 22, 2022 11:06 am
Re: Is there "Crosses" condition in Rule Manager?
The crosses condition has not yet been added in the rules since it's possible to do it by comparing previous value.
However, we have to add it in the close future because we said it, even if it's a bit trickier than expected.
However, we have to add it in the close future because we said it, even if it's a bit trickier than expected.