This is the ALERT script to compliment the strategy script.
When you set the alerts, make sure you use "On Bar Close" as the option, otherwise you will get repeated alerts. You can use this ALERT script with Autoview for automated algorithmic trading.
I had a hard time finding a strategy that would work in different time-frames and multiple different currency pairs. This is what I ended up with after countless hours of research and testing. I designed this strategy for auto-algorithmic trading and it uses three different indicators for Long/Short positions and a 4th indicator for exiting positions.
1) A green-light indicator that tells you whether or not you can go long/short.
2) A confirmation indicator that executes the long/short positions.
3) A chop indicator that measures the distance between the two MA's. When they're too close a trade will not be executed, as this usually indicates a chop zone.
4) A third MA is used as an exit indicator.
5) Finally, a loop function is designed to prevent repeat signals. Once a signal is produced on bar close it cannot happen again until that trade is closed or a new position is opened.
Be advised, you need to adjust the settings for each currency pair and time-frame. Once you do that, back-test it and count the last 100 trades to determine accurately your wins/losses. Long entries are the top of the previous bar, shorts are the bottom of the previous bar. This is a more accurate way of counting wins/losses. Tradingview back-test's are not accurate because of where they estimate your long/short entries are, it's very misleading.
Right now I have it setup for 2hr USDCAD with a back-test of 58% win rate on the last 100 trades.
The chop indicator is set to 0.04, I suggest starting there. 0.03 is the lowest I would go. You can go all the way up to 0.1 and higher if needed. You'll start missing big trades though.
The EMA for green-light signal is set to 10, a lower number will give you more entries but less accurate results, bigger number will give less entries with more accuracy but with missed opportunities. 10 is a good starting point.
This strategy is also designed so you can use tight stop losses to prevent large losses. This is because the strategy typically catches trends on the way up/down, minimizing risk for reversal.
I use Heikin Ashi candles for a smoother chart to work with. I have not tested this strategy with normal candles.
DEMO this strategy before using it live and make sure you back-test and tune it before you start. This is written in PINE V3 SO IT WILL NOT REPAINT.
Ten skrypt został opublikowany z zamkniętym kodem źródłowym i możesz z niego dowolnie korzystać. Możesz go dodać do ulubionych, żeby używać go na wykresie. Nie możesz przeglądać ani modyfikować jego kodu źródłowego.
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.