TradingView
Wunderbit
9 Des 2020 pukul 15.04

MACD Strategy with trailing ATR stop 

Ethereum / TetherUSBinance

Deskripsi

This is a trend based strategy that uses EMA and SMA intersection for determining the direction of the trend and MACD for the entry signal. At the same time, the strategy uses ATR, which is working as a trailing stop.

The strategy entry will work when the Trend ribbon will turn green and MACD line will crossover the signal line. This strategy also takes into account the pyramiding and allows to enter the second time if the signal will repeat itself.

There are 3 exit points. The first 10% of the position will be closed when the price will increase by 1%. The second portion of 50% will be closed when the price reaches 5% Take profit target. The remaining 40 % of the position will wait for the exit signal which will occur when the price closes below the ATR line.

The strategy is using a fixed amount in dollars, each time the entry occurs the strategy will enter with 100$ in the order.

The strategy can be applied to other crypto assets. However, they will require input changes.

Best of luck with your trading.

Catatan Rilis

* Small code update for the script to work without errors.

Catatan Rilis

Upgrade to v5 Pine script
Komentar
AlleyCat2021
The tutorial and the script do not match. How to I hook the alerts with the BOT?
Thanks.
KUNEF3
this repainting ?
Wunderbit
@eaeaea111, No, the strategy does not use any functions that repaint or multiple timeframes.
raghu2030
@Wunderbit , When I try the strategy and create an alert I see the below messgae
MACD Strategy (39, 7, 23, close, 10, 15, 12, 80, 1, 20, 1.3, 2, 40, 2018, 1, 1, 2020, 12, 31): order {{strategy.order.action}} @ {{strategy.order.contracts}} filled on {{ticker}}. New strategy position is {{strategy.position_size}}

how is the value {{strategy.order.contracts}} calculated in the above code. Can we control the number of contracts ?
Also where is the action strategy determined {{strategy.order.action}. Please help
RompeCocos
How can I do if I want to close 100% on the first Take Profit? is it possible? Try to delete the TP2 or ATR, but it does not work the whole strategy is deleted.
greatwow
It does not work now ,no signal
cheerfulPlayer73983
wonderful, thanks
Roadman2022
don't have trailing stop function
therangerhood
how can connect with wundertrading bot ?
Lebih lanjut