heniu_1

WMA + MACD strategy with trailing stop

Hi!

That's my first strategy. I already learn pine, so i will work on it more. Now i search how to make trailing stop working.

"WMA + MACD strategy with traiing stop" is very simple strategy which is designated for stocks market. It is created only to take long positions.

Buy signal is when WMA(120) is below price and macd(10,20,10) histogram is higher than 0.

Position should be automaticly closed when price hits stoploss level.

One transaction should be max 20% of our capital and stoploss is set 3% lower than last closing price.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?