INVITE-ONLY SCRIPT

LETF Leveraged Edge Strategy v1.5

Overview
The strategy is based on Stochastics to detect trends and then makes Buys and Sell based on custom entry and exit criteria as described below in the Execution Logic Rules section. It will NOT work with standard Stochastics.
This is not a standard Stochastics implementation. It has been customized and modified, and does not match any widely known Stochastics variations (like Fast, Slow, or Full Stochastics) in its smoothing and iterative calculation process with:
• A unique smoothing mechanism.
• Iterative calculations.
• Additional conditional logic for strategy execution.
This strategy is designed to focus on volatile, liquid leveraged ETFs to capture gains equal to or better than Buy and Hold, and mitigate the risk of trading with a goal of reducing drawdown to a lot less than Buy and Hold. It has had successful backtest performance to varying degrees with TQQQ, SOXL, FNGU, TECL, FAS, UPRO, NAIL and SPXL. Results have not been good on other LETFs that have been backtested.

Performance
In this backtest the Net Profit shows to be $4,561 or 45.61%. Considering the initial order size was $1,000 I have to wonder if the Strategy Tester is calculating this correctly. The Strategy Tester Performance Summary shows the Buy and Hold Return at $61,165 or 611.7%. Based on calculating the price of the last shares sold, less the price paid, times the number of initial shares purchased, my math shows the Buy and Hold Gain at $4,572 or about equal with the strategy performance in this case. The Performance Summary also states the strategy had a Max DD of 3.46% which I believe is incorrect. Based on other backtests I’ve done, I believe the strategy drawdown here was closer to 28.4% and the Buy and Hold Drawdown at 82.7%. I manually calculated the Buy and Hold drawdown.

How it Works
The author provides training and support resource materials for this at his website. The strategy execution logic is driven by these rules:

Execution Logic Rules

Buy the LETF When:
BR #1a) The Daily Fast Line (FL) crosses above the Daily Slow Line (SL) and the FL is between the Low (L*) and High (H*) Range set (often referred to as Oversold and Overbought Lines). This can execute (Buy) any trading day of the week.
BR #1b) Re-Buy the next day after any Stop or Take Profit Sell if the Buy Rule condition is true (FL is above SL), if not, remain in cash and wait for the next Buy Signal.

Sell the LETF When:
SR #1a) The Daily Fast Line (FL) crosses below Daily Slow Line (SL) within the Low (L*) and High (H*) Range (often referred to as Oversold and Overbought Lines). “Crossunder Range Exit” This can execute (Sell) any trading day of the week.
SR #1b) If the (FL) crosses Below the SL above the Exit Level*, wait. Only Sell if the FL drops down below the Exit Level* “Crossunder Level Exit” This can execute (Sell) any trading day of the week.
SR #2a) Sell at the open any day the gap-down price is at or below the 1-Day Stop%*, based on previous day’s closing price (Execute on the day it happens.)
SR #2b) Sell intraday any day the price is at or below the 1-Day Stop %*, based on previous day’s closing price (Execute on the day it happens.)
SR #3a) Sell at the open any day the price is at or below the Trailing Stop %*, based on highest intraday price since Buy date (Execute on the day it happens.)
SR #3b) Sell intraday any day the price is at or below the Trailing Stop%*, based on highest intraday price since Buy date (Execute on the day it happens.)
SR #4) Sell any day when the opening price exceeds, or intraday price meets the Profit Target % price* (Execute on the day it happens.)
SR #5) After each Sell go to Rule BR #1b to determine if a Re-Buy should occur the next day, or stay in cash until next Buy Signal

Settings:
Properties Tab – Initial Capital has been set to $10,000 and order size 10% of Equity, 0.1% commission and 3 Ticks for slippage. Net order size is $1,000

Input Tab:
Stochastic
Timeframe is selected to Daily or Weekly based on preference. Daily has more trades, but on average higher profitability.
Type: Proprietary (best selection for most LETFs, but a few will work better with the Full selection
%k Length 20, %K Smoothing 14, %D Smoothing (many LETFs work better with a specific Stoch setting, often each different) A List of these is provided for your starting point.

Trade Settings
Direction: Longs (This strategy only works on the Long side)
Stop Type: Trailing is recommended, but Fixed is an option.
Stop % (based on user risk tolerance)
PD Stop % (Suggest start at 5%. Based on volatility of LETF and is a stop percentage from prior day’s close. Designed to protect against sudden market volatility. Will need to balance between strategy performance and user risk tolerance)
Profit Target: User preference. (I can help with suggestions based on historical performance)

Entry/Exit Conditions
Enter on Tie: Default Checked – if a Fast line crosses a Slow line for a Buy signal, but doesn’t do so in the range set, this will trigger if it crosses at a tie.
Renter – Default Checked – If stopped out of a position, this tells the strategy to re-buy the position the next day if the conditions are still positive.
Exit Level: This is a exit level for a Fast cross below a Slow line that takes place above the Sell Range, but only happens if the Fast continues down to the level set. These usually don’t happen often, but can have a significant impact on performance. Unfortunately, it’s a trial and error process starting with 90 and working down to see if there’s any positive impact.

Trade Range
Buy Range: Start at typical 20 to 80. Expand the low end down first to check on performance impact. Normally a wide buying range is better for performance.
Sell Range: Start at 20 to 80 and tighten gradually to see performance impact. In some cases a very tight sell range does better. I have worked on our primary LETFs for many months to determine ranges for each that typically produce better results.

External Indicator: Some additional indicators have a positive impact on the strategy performance by increasing P/l, reducing drawdown and reducing the number of trades. This is not always the case and each LETF and time period for the LETF will have a bearing on whether the secondary indicator will help or not. Two that have helped are the MACD Histogram, and the Sloe-Velocity Indicator by Kamleshkumar43. Sometimes a couple of different indicators will have a positive impact, then it’s a personal preference which you pick to use with the strategy.
Since this strategy is focused on a very narrow selection of liquid LETFs, I have a lot of experience experimenting with the settings for the primary ones and can suggest things that will help. Additional training on the rules, working with the settings, and mitigating some of the negative trades during choppy markets is available at the website.

Chart
The strategy can be selected to use either a Daily or Weekly version of stochastic. This is important because the characteristics are different while still generating very good gains and minimal drawdowns. Generally, the daily stochastic will have a greater number of, and certainly more frequent, trades than the weekly stochastic. However, on average the daily version of the stochastic will generates greater profitability.
The Settings tabs have tooltip icons that will assist in inputting values that correspond to the written rules for the strategy, and some include specific rule detail.

Buying
The strategy generates Buy signals with the Fast line crossing over the Slow line within a “Buy Range” which is adjusted based on volatility of the leveraged ETF. This is unique in that a default is set for these entries to occur if the values are tied and doesn’t need to be within the high and low range if that occurs. The trader can select in the strategy for this to occur the same day, if he’s selected a Daily Stochastic timeframe, or at the end of the trading week if he’s selected a Weekly stochastic timeframe. The volatility of a leveraged ETF will sometimes cause a shake-out exit, a trailing stop can be hit, or there can be an exit based on taking a profit. A big part of the timing challenge was how to handle these. The strategy normally (set as a default) will immediately re-buy the next day only if the original buy conditions are still true. This helps capture gains when conditions are still favorable but keeps the trader out when they’re not.

Selling
Exits are handled in several ways. The strategy will exit if there is a fast line cross below a slow line within the “range”. The range is adjusted based on volatility of the leveraged ETF. The exit occurs at the close of the day if the trader has selected to use a Daily stochastic setting. The exit will occur at the end of the trading week if the trader has chosen a weekly stochastic strategy. The trader will set a level based on the instrument and volatility for another exit type. The level will sometimes coincide with the range exit high level but does not need to. If a fast line crosses down through a slow line above the level set, and then comes down to that level, the strategy will exit the position.
Another unique aspect of the strategy is the PD Stop setting. This is short for “Prior Day”, Rather than a normal stop based on the price paid for a position, the PD Stop is based on a percentage drop from the previous day’s closing price. This helps account for the volatility of the leveraged ETF and will cause an exit quickly if there’s a market, or index moving event. This helps capture gains and reduce risk should there be continued pullback.
Exits will also occur based on setting a trailing stop level and profit taking level. These are adjusted based on the leveraged ETFs volatility and historical performance.

Limitations
Choppy, or sideways markets are the most prone to poor performance and potential for being stopped out multiple times. If stopped out two consecutive times, make sure you’re monitoring market health and there are clear signs of a new uptrend such as a 10D and 21D MA in proper alignment and moving up. If you get a Buy signal from the strategy and you’re not confident yet about market and price direction then it’s fine to wait a day, or several days, to enter after the Buy signal when you have greater confidence about market direction. The author can help with a short list of tactical rules developed for these sideways or choppy markets.
This strategy has proven successful backtest results with a very limited set of LETFs as discussed earlier. The author does not know if it will prove successful with any others, or other types of ETFs such as 2X or plain ETFs. A lot more testing needs to be done.
The strategy buys and sells , excluding stops or take profit, at the market close. It can be very challenging to enter an order at market close.

Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting. This post and the script do not provide any financial advice and are for educational and entertainment purposes only.
educationaletfsetfs3xleverageleveragedetfsleveragetradingOscillatorsStochastic OscillatorTQQQ

Script sur invitation seulement

L'accès à ce script est limité aux utilisateurs autorisés par l'auteur et nécessite généralement un paiement. Vous pouvez l'ajouter à vos favoris, mais vous ne pourrez l'utiliser qu'après avoir demandé et obtenu l'autorisation de son auteur. Contactez PVTradr pour plus d'informations, ou suivez les instructions de l'auteur ci-dessous.

TradingView ne suggère pas de payer pour un script et de l'utiliser à moins que vous ne fassiez confiance à 100% à son auteur et que vous compreniez comment le script fonctionne. Dans de nombreux cas, vous pouvez trouver une bonne alternative open-source gratuite dans nos Scripts communautaires.

Instructions de l'auteur

You may also get access to this script by contacting the author directly or at: https//http://www.LeveragedEdge.com after 12/15/24

Vous voulez utiliser ce script sur un graphique ?

Avertissement: veuillez lire avant de demander l'accès.

Clause de non-responsabilité