When you create a strategy script in Trading View the strategy accounts for a single entry in your strategy (unless you specify otherwise). And when you transform your strategy script into the study your entry conditions could be met several times during the same trade. A similar scenario can happen to your exit signals. Therefore, TradingView alert will constantly send you similar signals in the same direction, which may lead to incorrect execution.
In order to sort this problem you will have to specify the piece of code in the pine script to tell TradingView not to repeat the signal if the previous one was the same.
isEntry_Long = falseisEntry_Long := nz(isEntry_Long, false)isExit_Long = falseisExit_Long := nz(isExit_Long, false)entry_long = not isEntry_Long and *** INSERT YOUR ENTRY CONDITIONS ***exit_long = not isExit_Long and *** INSER YOUR EXIT CONDITIONS ***if (entry_long)isEntry_Long := trueisExit_Long := falseif (exit_long)isEntry_Long := falseisExit_Long := true
Introducing these additional criteria in your study script would monitor that there will be a single entry and exit point for your strategy and secondary exit will not occur before the exit signal.
You need a TradingView Pro subscription to be able to receive Webhook notifications on Wunderbit. Sign up to TradingView now.