Gap Rule Not Working

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

Gap Rule Not Working

Post by TradingHeroes »

Hi,

Thanks for adding the gap rule. Unfortunately, it does not detect gaps between the candles. I tried different settings and it's giving me a setup on almost every candle.
NakedMarkets
Posts: 248
Joined: Tue Feb 22, 2022 11:06 am

Re: Gap Rule Not Working

Post by NakedMarkets »

Hello,

We tested it on our side and it's working as expected. We assume that your using the "Pips" rule for the comparison, you can try to use the "Input" rule for the comparison (in pips) and it will work.
However, we understand that there is a confusion here, because we said the rule returns the value in Pips. So, in the next release, we will modify the rule to be compatible with the "Pips" rule and not the "Input" rule. We will clarify this in the documentation.

For information :
On one hand, the "Input" rule uses the value from the user without modification.
One the other hand, the "Pips" rule uses the value from the user and multiply it by the 1 pip value of the related Symbol (ex: 0.0001 for EURUSD).
[Edit] Additional information about the gap size rule : the rule compares the current open with the previous close of the candles, it substracts it. It does not rely on the high or low, only the open and close.
TradingHeroes
Posts: 77
Joined: Wed May 04, 2022 9:45 pm

Re: Gap Rule Not Working

Post by TradingHeroes »

Thanks for the quick reply and clarification.

The current definition of a gap in NM probably wouldn't be useful for backtesting.

A gap is when there is a space between the high/low or low/high of the current bar and previous bar.

https://www.investopedia.com/terms/g/gapping.asp

What I would like to test is the effectiveness of a gap fill strategy or a gap continuation strategy.

In a gap fill strategy, a trade is opened in the opposite direction of the gap and a take profit is typically set at a 50% retracement into the gap.

https://medium.com/the-investors-handbo ... 7cd0ba3b5c

I would also like to test how effective it would be to take a trade in the same direction as the gap...trading gap continuation.

It would be fantastic if you could change the definition of a gap in NM to match the definition above.

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

Re: Gap Rule Not Working

Post by NakedMarkets »

In fact, there are different definitions of gaps, some rely on the open/close and other on the high/low.

So, we changed the rule in order to fit your needs, in the latest version. Now, the Gap Size Rule returns the gap size between the high/low of the current candle and the previous one. The open/close values are no longer considered.
As implemented previously, this rule returns a positive value for upward gaps and a negative value for downward gaps.
It is compatible with the "Pips" rule to check the gap value, expressed in Pips.
So, for an upward gaps, the setup rule will be as an example :
"Gap Size Rule" > 30 Pips
And for an download gap, it will be :
"Gap Size Rule" < -30 Pips (notice the change of the operator and the negative value of the Pips rule)

Let us know the current state of this rule is good for you
TradingHeroes
Posts: 77
Joined: Wed May 04, 2022 9:45 pm

Re: Gap Rule Not Working

Post by TradingHeroes »

This is fantastic, it works perfectly. I've always wanted this.

Thank you so much.
Post Reply