TradingView
wbburgin
28 มิถุนา 2023 เวลา 3 นาฬิกา 15 นาที

Powertrend - Volume Range Filter Strategy [wbburgin] 

Tesla, Inc.NASDAQ

คำอธิบาย

The Powertrend is a range filter that is based off of volume, instead of price. This helps the range filter capture trends more accurately than a price-based range filter, because the range filter will update itself from changes in volume instead of changes in price. In certain scenarios this means that the Powertrend will be more profitable than a normal range filter.

Essentials of the Strategy
This is a breakout strategy which works best on trending assets with high volume and liquidity. It should be used on middle to higher timeframes and can be used on all assets that have volume provided by the data source (stocks, crypto, forex). It is long-only as of now. It can work on lower timeframes if you optimize the strategy filters to make less trades or if your exchange/broker is low/no fees, provided that your exchange/broker has high liquidity and volume.

The strategy enters a long position if the range filter is trending upwards and the price crosses over the upper range band, which signifies a price-volume breakout. The strategy closes the long position if the range filter is trending downwards and the price crosses under the lower range band, which signifies a breakdown. Both these conditions can be altered by the three filter options in the settings. The default trend filter is not alterable because it helps prevent false entries and exits that are against the trend.

Settings
The Length setting is the lookback period for the range smoothing.

The ADX Filter setting enables you to turn on an ADX filter, which will halt entries and exits unless the ADX of your customizable length is above a ADX VWMA of that length.

The Range Supertrend setting creates a supertrend from the top and bottom ranges, which can be used to filter entries and exits. The length is customizable. The filter can show you whether the range is making higher highs and lower lows. Below is an example of the Range Supertrend being used as a filter and plotted on-chart:


The VWMA setting halts entries if they are below a customizable length VWMA.

Both the Range Supertrend and the VWMA can also be plotted separately without actually filtering the strategy, so that you can use them independently if you wish. You can turn off the bar color, the highlighting, and the labels if you wish in the settings. A note about the bar color: if the color changes but the strategy does not signal an exit or entry this means that the crossover was against the trend. In these circumstances it may be indicative of a pullback to enter or exit or to add onto your position.

About the Strategy Results Below
A range filter is normally composed of two components - the range filter itself and a smoothing function. In the development of this script I tested both normal and volume-based varieties of the range filter and the smoothing function:

Tests Performed
Volume-based Range x VWMA smoothing
Price-based Range x VWMA smoothing
Price-based Range x EMA smoothing
Volume-based Range x EMA smoothing (final result)

The highest-performing was a volume-based range filter and a normal EMA-based smoothing function, but that does not mean that this strategy will be profitable - exits are based off of signal reversion so I strongly encourage you to develop your own take profits/stop losses for the strategy if you think it may be a good fit for you. The results below are with a commission value of 0.05% (because I built the strategy first for equities), slippage of 3, so if your exchange/broker has a higher fee schedule, I recommend adding filters and/or moving to higher timeframes for the strategy. Additionally, I used 10% of equity in each trade, while using the Range Supertrend filter (the previous upload was unrealistic because it used 100% of equity - missed a 0, apologies, and added in slippage).

เอกสารเผยแพร่

Added alerts.
ความคิดเห็น
hch3565
I hope there's an alarm
rgnilson
Is it available for MT4?
machadoteam
very interesting, thanks for sharing your knowledge

The following conditions can be added:
+ operate only in new york time
+ trade only the USDJPY pair
+ each open position of 20 lots
+ stop loss 15 pips
jd145
hi @wbburgin
this strategy is only for long side. is there any same strategy for both long and short entry?
wbburgin
@jd145, I can add the short side in the coming days, I’ll make an update and let you know when it’s out!
jagdev_sagoo
@wbburgin,

Good afternoon, hope you are well.

I am just wondering if you have had a chance to add the short side strategy for this please?

Many thanks,
Borodulin
@wbburgin, Hi! Thanks for the indicator, it's very good. How soon will this update be available so that we can work in long and short?
simonSD
Thanks for sharing!

Are there any possibilities to create alarms? Like "send an alarm if there is a new buy or sell for a specific stock"?
wbburgin
@simonSD, Hey Simon,

I just added strategy alerts for both buys and sells. If you have an older version of the script you may have to re-favorite it.

Here's how to implement strategy alerts if you didn't know already: tradingview.com/support/solutions/43000481368-strategy-alerts/

I can make the message customizable for each buy and sell alert in the settings for a future update, if that would be helpful. Also, I have alert conditions commented out at the bottom of the script because I know strategy alerts can be a little complicated to implement. To use the alert conditions all you would need to do is to 1. create a copy of the script, 2. remove the "//" from in front of the alertcondition() lines, 3. change the script from a strategy() to an indicator(), and 4. remove the strategy.entry() and strategy.close() lines and their if statements.

Hope this helps! Feel free to ping me with any questions.
simonSD
@wbburgin, Hey,
thank you for taking the time to answer my question in such detail. Also the already commented alert conditions are helpful.

I will try to implement the described changes and will check if I will be informed about a new signal.

Thank you for your willingness to help.
Have a nice week! ;-)
เพิ่มเติม