Four WMA Strategy with TP and SLBasically I read a research paper on how they used different moving averages for long entries and short entries, and it kind of dawned on me that I always used the same one for long entry or exit, or even swing trading. So I smashed this together to see what would happen.
The strategy combines the use of four different WMAs for identifying trade entry points, along with a predefined take profit (TP) and stop loss (SL) for risk management. Here's a detailed description of its features and how it operates:
Main Features
1. **WMAs as the Core Indicator**:
- The strategy uses four WMAs with different lengths. Two WMAs (`longM1` and `longM2`) are used for long entry signals, and the other two (`shortM1` and `shortM2`) for short entry signals.
- The lengths of these WMAs are adjustable through input parameters.
2. **Trade Entry Conditions**:
- A long entry is signaled when the shorter WMA crosses under the longer WMA .
- Conversely, a short entry is signaled when the shorter WMA crosses under the longer WMA.
3. **Take Profit and Stop Loss**:
- The strategy includes a take profit and stop loss mechanism.
- The TP and SL levels are set as a percentage of the entry price, with the percentage values being adjustable through input parameters.
4. **Visual Representation**:
- The WMAs are plotted on the chart for visual aid, each with a distinct color for easy identification.
How It Works
- The strategy continuously monitors the crossing of WMAs to detect potential entry points for long and short positions.
- Upon detecting a long or short condition, it automatically enters a trade and sets the corresponding TP and SL levels based on the current price and the specified percentages.
- The strategy then actively manages the trade, exiting the position when either the TP or SL level is reached.
Drawbacks
- **Overreliance on WMAs**: The strategy heavily relies on WMAs for trade signals. While WMAs are useful for identifying trends, they might not always provide timely entry and exit signals.
- **Market Conditions**: It may not perform well in highly volatile or sideways markets where WMA crossovers could lead to false signals.
- **Risk Management**: The fixed percentage for TP and SL might not be suitable for all market conditions. Traders might need to adjust these values frequently based on market volatility and their risk tolerance.
Apparently I need to emphasize to use brains when using indicators and setting them up to achieve the results you can or want. Also risk of 12% is considered very high so I lowered the numbers to 5%, which tanked the profits, try adjusting them on your own. Check the properties settings for more info on comission and slippage.
Conclusion
The "Four WMA Strategy with TP and SL" is suitable for traders who prefer a moving average-based approach to trading, combined with a straightforward mechanism for risk management through take profit and stop loss. However, like all strategies, it should be used with an understanding of its limitations and ideally tested thoroughly in various market conditions before applying it to live trading.
Weighted Moving Average (WMA)
FTR, WMA, OBV & RSI StrategyThis Pine Script code is a trading strategy that uses several indicators such as Fisher Transform (FTR), On-Balance Volume (OBV), Relative Strength Index (RSI), and a Weighted Moving Average (WMA). The strategy generates buy and sell signals based on the conditions of these indicators.
The Fisher Transform function is a technical indicator that uses past prices to determine whether the current market is bullish or bearish. The Fisher Transform function takes in four multipliers and a length parameter. The four multipliers are used to calculate four Fisher Transform values, and these values are used in combination to determine if the market is bullish or bearish.
The Weighted Moving Average (WMA) is a technical indicator that smooths out the price data by giving more weight to the most recent prices.
The Relative Strength Index (RSI) is a momentum indicator that measures the strength of a security's price action. The RSI ranges from 0 to 100 and is typically used to identify overbought or oversold conditions in the market.
The On-Balance Volume (OBV) is a technical indicator that uses volume to predict changes in the stock price. OBV values are calculated by adding volume on up days and subtracting volume on down days.
The strategy uses the Fisher Transform values to generate buy and sell signals when all four Fisher Transform values change color. It also uses the WMA to determine if the trend is bullish or bearish, the OBV to confirm the trend, and the RSI to filter out false signals.
The red and green triangular arrows attempt to indicate that the trend is bullish or bearish and should not be traded against in the opposite direction. This helps with my FOMO :)
All comments welcome!
The script should not be relied upon alone, there are no stop loss or take profit filters. The best results have been back-tested using Tradingview on the 45m - 3 hour timeframes.
[MACLEN] TRUE RANGEThis is a true range (TR) based strategy with weighted moving average (WMA) smoothing to remove noise.
In addition, it includes a risk management strategy using 4 "safes" in the same operation to always seek to make a profit.
This is for evaluation only, and it is not recommended to use with real money.
It is a work in progress. I read your comments.
Kahlman HullMA / WT Cross StrategyA strategy created using Hull Moving Average and WT Cross .
Hull Moving Average turns green and WT Cross crossover this is a long. Otherwise short.
Stop Loss and Take Profit settings are available. You can set it to the level you want or turn it off.
According to my measurements, it shows the best performance in the 4-hour period. But you can find the best settings that are correct from the Strategy settings.
DayTradingFutures Cross-StrategyOVERVIEW
This indicator was designed to help beginners use a cross over strategy that can be used for entries, exits and to for trend direction.
█ COMPONENTS
Here is a brief overview of the indicator:
Weighted Moving Averages
I find that by using a weighted moving average ( WMA ) to show a crossover, is very close to using a MACD signal line cross or using a RSI signal crossing over the 50/Mid Line. In my main strategy, I use the 5period (fast) and with the crossing of the 20period (slow) WMA for entries and the 50period WMA to show the short term trend. Please note, that I use the 50 period for day trading, if you are using a swing trade or plan on holding positions long term, a higher period may be preferred . All of the moving averages are customizable by color, length, and timeframe. **I feel comfortable trading this strategy at the 5min,10min, and 15min charts.
1 — 5 WMA- this is the white moving average closest to price and is the first part of our small cloud.
2 — 20 WMA - this is the yellow moving average and is the second part of or small cloud.
3 — 50 WMA - this is the directional trend.
Moving Average Clouds
The cloud (which is optional) appears when the trader should be looking to go Long or Sell Short. The dividing line is when both the 5 and 20 periods are over the 50 period.
Trade Management
This is a tool to help with setting your stop loss, break even, and target levels. Currently you can set these based on the current ATR ( Average True Range ).
The “Buy” and “Sell” signals are the ATR indicator based on your risk tolerance (fully customizable). Different ticker symbols will require different ATR values, please back test! When applying your stop loss, drag the stop line to small arrow of the signal callout.
Trading Session
The indicator was designed for beginners to trade during the New York Session (08:30 – 16:00 CST). However, the indicator will ONLY show signals AFTER opening and BEFORE close (09:00 – 14:30 CST). The reason for this is that there is greater volatility during the open and I do not recommend to be in a trade at the end of the session.
Buy and Sell Alerts
Alerts can also be set, when an entry can be made. This prevents a person from having to watch the charts for an extended period of time.
Faults of this strategy:
Time of RANGES/CONSOLIDATION periods and EXTREME VOLITITY KILLs this strategy!! Do not trade this strategy during these periods!!
Disclaimer:
NO strategy is 100% effective! I am not responsible for any loss trades or malfunctions of this code. I recommend to paper trade any new strategy before trading with real money! I am not a financial advisor, trading can be very risky!
Configurable Multi MA Crossover Voting SystemThis strategy goes long when all fast moving averages that you have defined are above their counterpart slow moving averages.
Long position is closed when profit or loss target is hit and at least one of the fast moving averages is below its counterpart slow moving average.
The format of the config is simple. The format is : FASTxSLOW,FASTxSLOW,...
Example : If you want 2 moving averages fast=9,slow=14 and fast=20,slow=50 you define it like this : 9x14,20x50
Another example : 5x10,10x15,15x20 => means 3 moving average setups : first wih fast=5/slow=10, second with fast=10/slow=15, last with fast=15/slow=20
You can chose the type of moving average : SMA, WMA, VWMA (i got issues with EMA/RMA so i removed them)
You can chose the source of the moving average : high, close, hl2 etc.
You can chose the period on which ATR is calculated and ATR profit/loss factors.
Profit is calculated like : buy_price + atr_factor*atr
Loss is calculated like : buy_price - atr_factor*atr
Performance in backtest is variable depending on the timeframe, the options and the market.
Performance in backtest suggests it works better for higher timeframes like 1d, 4h etc.
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 don’t provide any financial advice.
Correlation StrategyThis is a basic strategy that shows how to trigger short/long/close signals on chart's symbol based on calculations made on another symbol which we consider correlated to it.
With default parameters, ETH/USDT as base symbol, the strategy shows good results in backtest for several symbols : DENT/USDT, BTT/USDT, FTT/USDT, DOT/USDT etc.
This is not surprising giving the importance of ETH in the crypto market so it makes sense many crypto currencies will follow ETH big movements.
Note : the strategy with default parameters is supposed to be applied on 4h timeframe. On other timeframes, try another support length.
How the strategy works :
A wma is calculated on the base symbol, with 200 length by default.
When wma is rising, we go long. When wma is falling we go short.
Take profit for Long/Short and Stop Loss for Long/Short are calculated percentages so 0.05 = 5% etc.
Also, Take profit / Stop loss are calculated on the base symbol not the chart's symbol.
The script uses the Monthly Returns table slightly modified to include buy & hold returns. Credits to @QuantNomad
Arch1tect's New Toy (Strategy Tester Version)Description:
The version of Arch1tect's New Toy indicator with Strategy Tester added.
This indicator tries to predict market trends by simply utilising 2 moving averages crossovers.
How it works:
Buy signals are triggered when the faster MA crosses over the slower MA from the downside to the upside.
Sell signals are triggered when the faster MA crosses under the slower MA from the upside to the downside.
How to use:
Take buys when buy signal is triggered AND close existing sell position
Take sells when sell signal is triggered AND close existing buy position
Note:
Settings are optimised for XAUUSD on the M1 chart.
Extra:
Alerts are included.
You can toggle between EMA, WMA and SMA to your liking.
Indicator version:
Stochastic RSI + WMA + SMA strat// "...an entry signal it's a cross down or up on
// the stochastics. if you're in a downtrend
// on the hourly time frame you
// must also be in a downtrend on the five
// minute so the five period has to be below the 144
// as long as the five period is still trading below
// the 144 period on both the hourly and the five minutes
// we are looking for these short signals crosses down
// in the overbought region of the stochastic. Viceversa for longs"
// Works well with a wide stop with 20 bars lookback
// for the SL level and a 2:1 reward ratio Take Profit .
// These parameters can be modified in the Inputs section of the strategy panel.
4 MA Strategy + Position Management// This is a simple crossover Moving Average strategy, good for long term crypto trades.
// It buys when the MA "X" crosses up the MA "Y", viceversa for shorts.
// Both MAs are selectable from the Inputs section in the front panel.
// There is also a Position Management option thats
// sizes positions to have the same USD risk (using leverage) on each trade,
// based on the percentage distance to the stop loss level.
// If you turn this option on you will see how the profit
// grows exponentially while the drawdown percentage almost remains the same.
5MA_X_LThis is a 5 day moving average crossing long strategy in 10 min. chart, used in short term momentum trading strategy.
Momentum trading Strategy: When S&P 500 index is at up trend (or above 60 sma ), buy 10+ stocks in top 20% stock RS ranking at equal weight using this MA5X_L strategy. Change stocks when any stock exited by algorithm.
Back test start since 2020/7/1, each long entry for condition 1 is $30000, condition 2 is $20000, with max of 2 long positions.
Setup: 10 minutes chart
Buy condition 1) 3 wma cross up 195 wma (5day) 2) 3wma > 78wma > 195wma UP Trend Arrangement (UTA)
Exit condition 1) 3 wma cross under 195 wma 2) position profit > 20% and 3 wma cross under 6 ATRs line (green)
Yusram Mount MaV - Day MaV CrossOver Strgty
This indicator shows the comparison between the 7-day fast simple average and the monthly slow average of 5 bars. The red line indicates the monthly green and blue lines the daily average. If the Green-Blue line crosses the red upwards, it is a buy signal and the opposite is a sell signal. As soon as it turns green blue without waiting for the sell signal, a sell signal is created. If you are trading fast, you can consider turning green to blue as an opportunity. In the long run, the red intersection can be interpreted as a Stop point.
I hope it will be useful to everyone.
You can also find the strategy indicator with the same name.
I got the name of this indicator from my daughter's name. The meaning of the name Yüsra means "convenience". I hope this indicator will help you.Yüsram Mount HO - Day HO
MA Crossover Strategy with MA Turning Point Exits + ADX filterThis strategy is based upon @rthomson's MA Crossover Strategy with MA Turning Point Exits.
I just added an ability to filter out entries when ADX < 20. In fact you have a choice to set this ADX threshold value.
In a sideways market, the MA crossovers end up in yielding entry trades with losses. ADX value around 20 to 25 indicates a sideway market. By introducing ADX threshold, we are trying to prevent potential loss making entries.
MA Crossover Strategy with MA Turning Point Exits + ADX filterThis strategy uses @rthomson's "MA Crossover Strategy with MA Turning point Exits" and combines it with ADX.
This strategy filters out any entries where ADX < 20. In fact you can set the value for ADX threshold. (Generally value under 20 for ADX is considered as non trend zone)
Fancy Bollinger Bands Strategy [BigBitsIO]This script is for a Bollinger Band type indicator with built-in TradingView strategy including as many features as I can possibly fit into a Bollinger Band type indicator including a wide variety of options to create the most flexible Bollinger Bands strategy possible.
Features:
- A single custom moving average serving as the middle band.
- Standard MA inputs.
- MA type.
- MA period.
- MA price.
- MA resolution (time frame).
- Visibility toggle.
- MA Candle Type
- Fancy MA inputs.
- Toggle to show only candles included in the MA calculation ("Highlight inclusion") or display entire MA history.
- Toggle to show a ghost trail when Highlight inclusion is toggled on. Displays a shaded version of past MA history before the inclusion period (as seen on snapshot).
- Toggle to show forecast values for the MA.
- Other inputs related to forecasting:
- Forecast bias. (Neutral forecasts MA if the current price remains the same.)
- Forecast period.
- Forecast magnitude.
- Toggle showing details on the screen
- Toggle the visibility of the fill between the upper and lower bands.
- Toggle to use ATR instead of the standard deviation to calculate the location of the upper and lower bands.
- Custom input for the ATR period.
Strategy Features
-Strategy Window - only test during this window
-Take Profit and Stop Loss
-Open and Close conditions, including condition counts and any/all requirements
-Many conditions to choose from that can either be selected to open, close or open and close a position
-Conditions include:
-Price crossing above/below the Upper, Middle, or Lower bands
-Price being above/below the Upper, Middle, or Lower bands
-Bollinger Band width crossing or being above/below custom values
-Percent B crossing or being above/below custom values
This script may contain errors, or out of date code. Please be mindful of updates to the script.
*** DISCLAIMER: For educational and entertainment purposes only. Nothing in this content should be interpreted as financial advice or a recommendation to buy or sell any sort of security or investment including all types of crypto. DYOR, TYOB. ***
MavilimW Strategy MTF EMA with HA CandlesThis is a strategy adapted initially for Mavilim moving average indicator, based on WMA MA.
It seems to works amazingly on long term markets, like stocks, some futures, some comodities and so on.
In this strategy, I form initially the candle, using EMA values, so I take the EMA of last 50 closes, open, highs and lows and form the candle
After this I take interally HA and convert the EMA candle to HA.
Then using the moving averages on multiple timeframes, like in this example we have a chart on 4h, but I use 1h and 1d moving averages.
For long condition we have : close is above moving average timeframe1 and oving average timeframe2 and oving average timeframe3
Initially short would be close below ma timeframe1, ma timeframe2 and timeframe3 -> but here I also convert it into a long signal.
So we actually go only long .
And we have 2 different exits : for first long if we have a crossdown of 1h ma with 1 day ma, and for second long if we have a cross up of 1h ma with 1 day ma in this example.
Message me if you have any questions about this strategy.
WMA + MACD strategy with trailing stopHi!
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.
Scripting Tutorial A - TManyMA - StopsThis script is for a triple moving average strategy where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually.
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked to my profile.
- Ribbons added and on by default. Optional setting to disable the ribbons. 5 ribbons between MA1 and MA2 and another 5 between MA2 and MA3.
- Ribbons are alpha-color coded based on their relation to their default MAs.
- Ribbons are only visible between MAs if the MAs being compared share the same Type, Resolution, and Source because there is no way to consolidate those three in a simple manner.
- Ribbon values are calculated based on calculated MA Periods between the MAs.
- Converted the existing study into a strategy.
- Strategy only enters long positions with a market order when MA crossovers occur.
- Strategy exits positions when crossunders occur.
- Trades 100% of the equity with one order/position by default.
- Ability to disable trading certain crosses with input checks.
- Ability to exit trades with a take profit or stop loss.
- User input to allow quick changes to the take profit or stop loss percentages.
This script is meant as an educational script with well-formatted styling, and references for specific functions.
*** PLEASE NOTE - THIS STRATEGY IS MEANT FOR LEARNING PURPOSES. DEPENDING ON IT'S CONFIGURATION IT MAY OR MAY NOT BE USEFUL FOR ACTUAL TRADING. THE STRATEGY IS NOT FINANCIAL ADVICE ***
BB limitMarket maker strategy using Bollinger bands as entry, moving average as close and simple stop-loss with percentage of entry position. It was extremely profitable in june on xbtusd.
Kozlod - Yet Another Moving Average Cross Strategy (9 MA types)You can choose one of these MA types in params:
Simple Moving Average (SMA)
Exponential Moving Average (EMA)
Weighted Moving Average (WMA)
Arnaud Legoux Moving Average (ALMA)
Hull Moving Average (HMA)
Volume-weighted Moving Average (VWMA)
Least Square Moving Average (LSMA)
Smoothed Moving Average (SMMA)
Double Exponential Moving Average (DEMA)
Also you can select SL/PT % levels.
Rainbow StrategyThe strategy is based on the following idea:
www.youtube.com
Not a fan of this but no script was present to show this idea's performance.
Best suitable for the 1-minute chart. You can change the ema values as per your needs.
For Tips to continue :) -
BTC: 1BjswGcRR6c23pka7qh5t5k56j46cuyyy2
ETH: 0x64fed71c9d6c931639c7ba4671aeb6b05e6b3781
LTC: LKT2ykQ8QSzzfTDB6Tnsf12xwYPjgq95h4
WAMI Strategy Backtest The WAMI-based trading lies in the application and iteration of the
optimization process until the indicated trades on past market data
give consistent, profitable results. It is rather difficult process
based on Fourier analysis.
You can to change Trigger parameter for to get best values of strategy.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.