tweakerID

Modulo Logic + EMA Strat

To understand this strategy first we need to look into the Modulo (%) operator. The modulo returns the remainder numerator
of a division's quotient (the result). If we do 5 / 3, we get 1 and 2/3 as a result, where the remainder is 2 (two thirds, in this case). This can be
used for many things, for example to determine when a number divides evenly into another number. If we divide 3/3, our result is 1,
with no remainder numerator, hence our modulo result is 0. In this strategy, we compare a given number (divisor, user defined) with the
the closing price of every candle (dividend, user defined) to determine if the result between their division is an even number.
If the answer is true, we have an entry signal. If this signal occurs below the EMA (length is defined by the user) we go short and
viceversa for longs. This logic can be reversed. In this case, the modulo works as a random-like filter for a moving average strategy
that usually struggles when the market is ranging and crosses are too often.
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?