Customised MACD strategy with dynamic stop losses based on ATR.

Signals are generated when the delta value becomes positive or negative (when it crosses the zero line)

Stop losses are printed on the chart in yellow and orange. They are based on recent average True Range to allow for volatility .

  • Green background = long
  • Red background = short
  • Yellow dotted line = stop loss placement for long
  • Orange dotted line = stop loss placement for short
  • White background = you have been stopped out, wait patiently for the next signal
Remove from Favorite Scripts Add to Favorite Scripts
Could you add an option to send alerts on entries/exits? I'm trading manually on my brokers platform and this would be great!
bennef Chrizzzzzz
@Chrizzzzzz, For that, we need a Study rather than a Strategy. Here you go:
Nice work, thanks for sharing this. One question: the vertical lines plotted with "Background color" (2nd set with same name in your settings window) are the trigger bars and the arrows with the entries mark the bar that would have been bought on OPEN of the cadle (not on close), right?
bennef Chrizzzzzz
@Chrizzzzzz, The background is painted Bright Green or Bright Red behind the candle at which a buy or sell condition is satisfied. For that to happen, the candle has to have completed time-wise. The strategy enters at the next candle open but the signal conditions are based on the last candle close. This makes sense as we only want a signal based on the close of a candle and we can only enter after this point in time -> the next candle open.
@bennef, Cool, so it is as I thought, thanks!
+1 Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar Shows How It Works Chart Features Pricing House Rules Moderators Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Help Center Refer a friend Feature Request Blog & News Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out