GordonR

Help needed with strategy - Entry is off by 2 candles

Hi,

I'm new to TradingView, and would greatly appreciate some help with figuring out where I'm going wrong with this script.

This is a overly simplified version of what I'm actually trying to do, but hopefully it's easier to see the problem.

Here I'd like to create a Buy signal when the fast moving average crosses over the slow moving average, and Sell when the reverse happens.


If I draw arrows when the condition is met then they are one candle later than expected (probably because I'm using the closing values ??).
That not great, but workable.

My real problem comes when I try turning this into a strategy.
Now the signal only triggers 2 candles after the crossover.

What am I doing wrong here?

Thanks,
Gordon
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?