MACD Strategy- Script Example how to use % SL in your script ** Tired of Script showing a trade that you stopped out on but is still long on your script? Not any more**
I used Pine script to create realistic trading scenarios for SL users. Now your scripts will reflect what you see on the order book.
a=0.0
a := (*Insert buy condition*)? close: nz(a )
plot(0.98*a, color= green) //2%SL for BUY
b=0.0
b:= (*Insert Short condition*) ? close: nz(b )
plot(1.02*b, color= red) //2% SL for Short
Please check the script on how to implement this :)
متذبذبات
Percentage Volume Oscillator (PVO) Backtest The Percentage Volume Oscillator (PVO) is a momentum oscillator for volume.
PVO measures the difference between two volume-based moving averages as a
percentage of the larger moving average. As with MACD and the Percentage Price
Oscillator (PPO), it is shown with a signal line, a histogram and a centerline.
PVO is positive when the shorter volume EMA is above the longer volume EMA and
negative when the shorter volume EMA is below. This indicator can be used to define
the ups and downs for volume, which can then be use to confirm or refute other signals.
Typically, a breakout or support break is validated when PVO is rising or positive.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Overbought/Oversold Simple Overbought/Oversold indicator
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Bat MACDWorks on Bullish divergence indicators and is identical to MACD during an uptrend, works best on 2H or higher timeframes.
Incorporates a SL which can be changed at will. SL is also used as a buy signal on lower timeframe crossovers.
Uses 6H MACD to differentiate between up and downtrends.
Recommend to take profits at pivots, trendlines instead of strategy's position which is delayed.
Signals on downtrend best used when SL is flat.
WavefinderI made this script to incorporate Stochastic RSI with EMA crossovers and VMACD, it is only to buy and sell (Users can modify it create shorts)
I personally recommend only using this when a downtrend reversal is imminent as it finds the bottom well. Signals generated on a downward moving StochRSI must be ignored. Used best with StochRSI and VMACD indicators.
Thanks to VMACD indicator by Lazy bear.
Use at your own discretion.
The strategy has not been tested in realtime trading, feel free to provide feedback upon use or tracking signals.
Strategy is timeframe dependent (Best at 30min, 2H and 4H) and incorporates risk management.
Modify it according to your wish, I'm just floating an idea which others can improve on.
Current equity usage is 10k and number of contracts is a quotient of the equity and price (adjusted so that all cryptos can be equally compared)
P.S - Also publishing this to make up for the repainting let down on the previous strategies, tried my best on this one.
*version3 used no repaints
Cuathro EMA StrategyIt's a long term script based on multiples EMA, crossover and crossunder.
Based on two good scripts CM Sling and OCC.
Always adjust resolution at least twice than chart.
Enjoy it! BTCUSD
Laguerre-based RSI Backtest This is RSI indicator which is more sesitive to price changes.
It is based upon a modern math tool - Laguerre transform filter.
With help of Laguerre filter one becomes able to create superior
indicators using very short data lengths as well. The use of shorter
data lengths means you can make the indicators more responsive to
changes in the price.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Cowabunga System from babypips.comPlease do read the information below as well, especially if you are new to Forex.
The Cowabunga System is a type of Mechanical Trading System that filters trades based on the trend of the 4 hour chart with EMAs and some other familiar indicators (RSI, Stochastics and MACD) while entering trades base on 15 minute chart.
I have coded (quite amateurishly) the basic system onto a 15 minute chart (the 4 hour settings are coded as well). The author says the system is to be traded off the 15 minute chart with the 4 hour chart only as a reference for trend direction.
4 Hour Chart Settings
5 EMA
10 EMA
Stochastics (10,3,3)
RSI (9)
Then we move onto the 15 minute chart, where he gives us the trade entry rules.
15 Minute Chart Settings
5 EMA
10 EMA
Stochastics (10,3,3)
RSI (9)
MACD (12,26,9)
Entry Rules - long entry rules used, obviously reverse these for shorting.
1. EMA must cross above the 10 EMA.
2. RSI must be greater than 50 and not overbought.
3. Stochastic must be headed up and not be in overbought territory.
4. MACD histogram must go from negative to positive OR be negative and start to increase in value.
What I did.
1. Set the RSI and Stochastic levels to avoid entries when they indicate overbought conditions for long and oversold conditions for short (80 and 20 levels).
2. Users can input specific times they want to backtest.
3. User's can configure profit targets, trailing stops and stops. Default is set it to was 100 pips profit target with a 40 pip trailing stop. (Note, when you are changing these values, please note that each pip is worth 10, so 100 pips is entered as 1000.)
The Cowabunga System from babypips.com is another popular and active system. The author, Pip Surfer, continues to post wins and losses with this system. It shows there is a lot of honesty and integrity with this system if the author keeps up to date even 10 years later and is not afraid of sharing the times the system causes losses.
As an example of this, here is post he shared just last week . It's almost like a journal, he gives specific times and reasons why he entered, lets the readers know when he was stopped out, etc. I think that what he does is equally important as his system.
To read more about this system, visit the thread on babypips.com, click here.
How to automate this strategy for free... Version 2Hello fellow traders and automation lovers.
It has been about 2 years since we originally created Autoview to connect your exchanges/brokers with your TradingView alerts. We've since added multiple exchanges, parameters and have built a large community filled with awesome, passionate traders.
One of the first strategies we built was sadly not a viable one for trading due to it using built-in variables that resulted in the backtest results being inaccurate in comparison to placing live trades. Luckily, we did not encounter repainting until a few strategies in, however, there was a point where we published a few of them as well. We will be going through all of our scripts again to not only eliminate any repainting and update to version 3, but to also include all the code snippets that we've learned to use over the years that allow for accurate backtesting and live trading.
The first script we are redoing is our How to automate this strategy for free using a chrome extension. .
Easter egg: This includes a new snippet of code that makes controlling how many orders you pyramid within a study fast and easy.
We look forward to bringing all of our scripts and delving deep into Pine again :)
Happy Trading
Autoview
rsi+bb stadded BB in rsi .
if rsi touch green, sell.
if rsi touch red, buy.
also it has stop-loss function.
RSI Binary StrategyAnother basic strategy most people learn at the beginning of their trading carreer (like me) is the RSI strategy. This is an adaptation of the built-in RSI strategy for use in binary options. Who knows, maybe one day i will graduate to CFD trading, but my time for trading in general is limited at the moment and I am very much still at the beginning of this entire topic.
The rather specific values for the RSI bounds and length I saved have been developed for the EURUSD short term (5min.) interval, giving the highest amount of winning vs. loosing trades as of the publishing date of this script, which is the only important factor for binary options in my understanding. Use at your own risk.
Feel free to comment, give me pointers and/or recommendations.
DSS Bressert (Double Smoothed Stochastic) Strategy Backtest Double Smoothed Stochastics (DSS) is designed by William Blaw.
It attempts to combine moving average methods with oscillator principles.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
CMOfilt BacktestThis indicator plots a CMO which ignores price changes which are less
than a threshold value. CMO was developed by Tushar Chande. A scientist,
an inventor, and a respected trading system developer, Mr. Chande developed
the CMO to capture what he calls "pure momentum". For more definitive
information on the CMO and other indicators we recommend the book The New
Technical Trader by Tushar Chande and Stanley Kroll.
The CMO is closely related to, yet unique from, other momentum oriented
indicators such as Relative Strength Index, Stochastic, Rate-of-Change, etc.
It is most closely related to Welles Wilder`s RSI, yet it differs in several ways:
- It uses data for both up days and down days in the numerator, thereby directly
measuring momentum;
- The calculations are applied on unsmoothed data. Therefore, short-term extreme
movements in price are not hidden. Once calculated, smoothing can be applied to the
CMO, if desired;
- The scale is bounded between +100 and -100, thereby allowing you to clearly see
changes in net momentum using the 0 level. The bounded scale also allows you to
conveniently compare values across different securities.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
CMOav Backtest This indicator plots average of three different length CMO's. This indicator
was developed by Tushar Chande. A scientist, an inventor, and a respected
trading system developer, Mr. Chande developed the CMO to capture what he
calls "pure momentum". For more definitive information on the CMO and other
indicators we recommend the book The New Technical Trader by Tushar Chande
and Stanley Kroll.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
CMOabs Backtest This indicator plots the absolute value of CMO. CMO was developed by Tushar
Chande. A scientist, an inventor, and a respected trading system developer,
Mr. Chande developed the CMO to capture what he calls "pure momentum". For
more definitive information on the CMO and other indicators we recommend the
book The New Technical Trader by Tushar Chande and Stanley Kroll.
The CMO is closely related to, yet unique from, other momentum oriented indicators
such as Relative Strength Index, Stochastic, Rate-of-Change, etc. It is most closely
related to Welles Wilder`s RSI, yet it differs in several ways:
- It uses data for both up days and down days in the numerator, thereby directly
measuring momentum;
- The calculations are applied on unsmoothed data. Therefore, short-term extreme
movements in price are not hidden. Once calculated, smoothing can be applied to
the CMO, if desired;
- The scale is bounded between +100 and -100, thereby allowing you to clearly see
changes in net momentum using the 0 level. The bounded scale also allows you to
conveniently compare values across different securities.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
CMO & WMA Backtest This indicator plots Chande Momentum Oscillator and its WMA on the
same chart. This indicator plots the absolute value of CMO.
The CMO is closely related to, yet unique from, other momentum oriented
indicators such as Relative Strength Index, Stochastic, Rate-of-Change,
etc. It is most closely related to Welles Wilder?s RSI, yet it differs
in several ways:
- It uses data for both up days and down days in the numerator, thereby
directly measuring momentum;
- The calculations are applied on unsmoothed data. Therefore, short-term
extreme movements in price are not hidden. Once calculated, smoothing
can be applied to the CMO, if desired;
- The scale is bounded between +100 and -100, thereby allowing you to clearly
see changes in net momentum using the 0 level. The bounded scale also allows
you to conveniently compare values across different securities.