SMA StrategyIn this strategy, I took advantage of two different sma intersections for buying and selling points. You can use the intersection of 2 sma values for buying and 2 separate sma intersection for selling.
The main purpose of this strategy is to calculate the rate of return of the indicator belonging to this system. You can access the indicator version from this link and set an alarm.
简单移动平均线(SMA)
SMA Strategy - Indicator Version for AlertIn this indicator, I made use of two different sma intersections for buying and selling points. You can use the intersection of 2 sma values for buying and 2 separate sma intersection for selling.
There are 3 different alarms for those who want to set an alarm.
- Cross Alarm: The alarm that will work on buy-sell signals for those who have the right to set a single alarm.
- Buy Alarm: The alarm that will operate at the receiving point according to the values you specified.
- Sell Alarm: The alarm that will operate at the sales point according to the values you specify.
Zion's Multi Timeframe SMA crossThis script shows the multiple time frame SMA cross overs under single label.
It ideal to use this indicator with 1min chart to show trend change
PineScript v4 - Forex Pin-Bar Trading StrategyPineScript v4, forex trading robot based on the commonly used bullish / bearish pin-bar piercing the moving averages strategy.
I coded this robot to stress-test the PineScript v4 language to see how advanced it is, and whether I could port a forex trading strategy from MT4 to TradingView.
In my opinion, PineScript v4 is still not a professional coding language; for example you cannot use IF-statements to modify the contents of global variables; this makes complex robot behaviour difficult to implement. In addition, it is unclear if the programmer can use nested IF-ELSE, or nested FOR within IF.
The sequence of program execution is also unclear, and although complex order entry and exit appears to function properly, I am not completely comfortable with it.
Recommended Chart Settings:
Asset Class: Forex
Time Frame: H1
Long Entry Conditions:
a) Moving Average up trend, fast crosses above slow
b) Presence of a Bullish Pin Bar
c) Pin Bar pierces either Moving Average
d) Moving Averages must be sloping up, angle threshold (optional)
Short Entry Conditions:
a) Moving Average down trend, fast crosses below slow
b) Presence of a Bearish Pin Bar
c) Pin Bar pierces either Moving Average
d) Moving Averages must be sloping down, angle threshold (optional)
Exit Conditions:
a) Stoploss level is hit
b) Takeprofit level is hit
c) Moving Averages cross-back (optional)
Default Robot Settings:
Equity Risk (%): 3 //how much account balance to risk per trade
Stop Loss (x*ATR, Float): 2.1 //stoploss = x * ATR, you can change x
Risk : Reward (1 : x*SL, Float): 3.1 //takeprofit = x * stop_loss_distance, you can change x
Fast MA (Period): 20 //fast moving average period
Slow MA (Period): 50 //slow moving average period
ATR (Period): 14 //average true range period
Use MA Slope (Boolean): true //toggle the requirement of the moving average slope
Bull Slope Angle (Deg): 1 //angle above which, moving average is considered to be sloping up
Bear Slope Angle (Deg): -1 //angle below which, moving average is considered to be sloping down
Exit When MA Re-Cross (Boolean): true //toggle, close trade if moving average crosses back
Cancel Entry After X Bars (Period): 3 //cancel the order after x bars not triggered, you can change x
Backtest Results (2019 to 2020, H1, Default Settings):
EURJPY - 111% profit, 2.631 profit factor, 16.43% drawdown
EURUSD - 103% profit, 2.899 profit factor, 14.95% drawdown
EURAUD - 76.75% profit, 1.8 profit factor, 17.99% drawdown
NZDUSD - 64.62% profit, 1.727 profit factor, 19.14% drawdown
GBPUSD - 58.73% profit, 1.663 profit factor, 15.44% downdown
AUDJPY - 48.71% profit, 1.635 profit factor, 11.81% drawdown
USDCHF - 30.72% profit, 1.36 profit factor, 22.63% drawdown
AUDUSD - 8.54% profit, 1.092 profit factor, 19.86% drawdown
EURGBP - 0.03% profit, 1.0 profit factor, 29.66% drawdown
USDJPY - 1.96% loss, 0.972 profit factor, 28.37% drawdown
USDCAD - 6.36% loss, 0.891 profit factor, 21.14% drawdown
GBPJPY - 28.27% loss, 0.461 profit factor, 39.13% drawdown
To reduce the possibility of curve-fitting, this robot was backtested on 12 popular forex currencies, as shown above. The robot was profitable on 8 out of 12 currencies, breakeven on 1, and made a loss on 3.
The default robot settings could be over-fitting for the EUR, as we can see out-sized performance for the EUR pairs, with the exception of the EURGBP. We can see that GBPJPY made the largest loss, so these two pairs could be related.
Risk Warning:
This is a forex trading strategy that involves high risk of equity loss, and backtest performance will not equal future results. You agree to use this script at your own risk.
Net BTC Exchange VolumeBTC Net exchange volume of top BTC exchanges with moving averages
- Jake Scanlan
Static + Dynamic LevelsShows static and dynamic levels which can act as support/resistance. These are important as there is a lot of users who are interested in buying/selling at these prices.
Static Levels include -
Daily/Weekly/Monthly/Yearly Open (changes color depending on if below or above price)
Previous Daily/Weekly/Monthly/Yearly Open
Previous day's High/Low
Dynamic Levels include -
100/200 Daily MA
100/200 Weekly MA
PEC Range (Prefer on 1D chart)Price Expansion and Contraction is basic calculation of Candles High-Low and it is average of previous 5 High-Low. Which will help to analyse volatility of running situation. This can be used for analysis purpose only not as buy/sell signals.
How to use this?
Ranges of candles may increase on lower value of PEC.
Ranges of candles may decrease on high of PEC.
This is not ATR of 5 period.
Barcolor Averaging1. Colors candles or bars, ascending (blue) or descending (red), as determined by the MA setting.
2. Colors candles white when the MA is flat, or the market is moving sideways or in consolidation.
Moving Average Colored EMA/3 SMA1. Updated this available script to have 2 SMA's and 2 EMA's.
2. Revised so that plot turns white when flat.
3. Added Trend Gain to control what slope "flat" has for different TF's.
The Lazy Trader - Index (ETF) Trend Following Robot50/150 moving average, index (ETF) trend following robot. Coded for people who cannot psychologically handle dollar-cost-averaging through bear markets and extreme drawdowns (although DCA can produce better results eventually), this robot helps you to avoid bear markets. Be a fair-weathered friend of Mr Market, and only take up his offer when the sun is shining! Designed for the lazy trader who really doesn't care...
Recommended Chart Settings:
Asset Class: ETF
Time Frame: Daily
Necessary ETF Macro Conditions:
a) Country must have healthy demographics, good ratio of young > old
b) Country population must be increasing
c) Country must be experiencing price-inflation
Default Robot Settings:
Slow Moving Average: 50 (integer) //adjust to suit your underlying index
Fast Moving Average: 150 (integer) //adjust to suit your underlying index
Bullish Slope Angle: 5 (degrees) //up angle of moving averages
Bearish Slope Angle: -5 (degrees) //down angle of moving averages
Average True Range: 14 (integer) //input for slope-angle formula
Risk: 100 (%) //100% risk means using all equity per trade
ETF Test Results (Default Settings):
SPY (1993 to 2020, 27 years), 332% profit, 20 trades, 6.4 profit factor, 7% drawdown
EWG (1996 to 2020, 24 years), 310% profit, 18 trades, 3.7 profit factor, 10% drawdown
EWH (1996 to 2020, 24 years), 4% loss, 26 trades, 0.9 profit factor, 36% drawdown
QQQ (1999 to 2020, 21 years), 232% profit, 17 trades, 3.6 profit factor, 2% drawdown
EEM (2003 to 2020, 17 years), 73% profit, 17 trades, 1.1 profit factor, 3% drawdown
GXC (2007 to 2020, 13 years), 18% profit, 14 trades, 1.3 profit factor, 26% drawdown
BKF (2009 to 2020, 11 years), 11% profit, 13 trades, 1.2 profit factor, 33% drawdown
A longer time in the markets is better, with the exception of EWH. 6 out of 7 tested ETFs were profitable, feel free to test on your favourite ETF (default settings) and comment below.
Risk Warning:
Not tested on commodities nor other financial products like currencies (code will not work), feel free to leave comments below.
Moving Average Slope Angle Formula:
Reproduced and modified from source:
SSL Backtester With ATR SL TP and Money ManagementSimilar to other SSL Channel scripts, but this one allows you to set an ATR-derived stop loss and adds the option to risk a % of the equity or used a fixed lot.
Enters upon a long or short SSL crossover.
FIXED LOTS
For 0.01 "lots" use 1000
For 1 standard lot, use 100,000
FOR MONEY MANAGEMENT
For 1% risk, enter 0.01
For 10% risk, enter 0.1
etc
You should be able to adapt this to any other indicator by just changing the entry conditions and adding your own indicator values.
It is not meant to be a profitable script, just a template to begin adding money management ideas to existing scripts which currently just enter and exit on an event.
Camilo MA 20 40 100 200Adds the following:
- Adds moving average for the following periods: 20, 40, 100, 200. These moving average are used to understand the context of the stock. 20 and 40 are for hourly use, and 100 and 200 are for daily use.
- Adds red background color when RSI is over 70 and green background when RSI is less than 30.
- Adds arrow to first bar chart to identify the gaps.
Golden Ratio MultiplierThe moving averages 350 and 111 by themselves do a great job of identifying market tops/bottoms. The fraction 350/111 is very close to Pi as well (3.15) so that's is suspicious in its own right.
Nonetheless, fibonacci retracements/multiplies of the 350 SMA does a remarkable job of finding reversal points. I commented out a couple of multiplies for simplicity's sake (the lines became rather crowded). However, the script is open source so you all can copy it into Pine Editor and delete the "//" and add it back to the script.
Cheers.
AK Simple Moving Average 50 days Simple Moving average suitable for Intraday on 1Hr,30Min.15Min Time frames
1. When candle crossing above SMA Line - Go for Long Entries
2. When candle crossing below SMA Line - Go for short Entries
SMA 8 & 20 & 50This is a colored moving average for the 8, 20 and 50 SMA. You can switch the values if you would like. The color is based off the slope of the moving average, I is very simple yet valuable indicator. The market will generally stay above the 8 and 20, with every now and then testing the 50 sma. Of coarse that is when moving upward in price action. The same can be said in a bear market.
Deep_Fractal_Signals_and_Rubber_Band_TradesThis indicator is based on Williams Fractals and the TopDog Trading "Rubber Band Trade"
The Deep Fractal Signals are triangles that indicate the price is forming a pattern of decreasing lows in a down trend (orange) or, increasing highs in an up trend (green).
The triangles are placed above or below the last bar of the pattern, unlike Fractals which are drawn 2 candles prior to the current candle, and are re-painted on the chart.
When the triangle is indicated above the moving average in a down trend (blue), or below the moving average in an up trend (yellow), this is a Rubber Band Trade.
When the slope of the moving average is less than the Gain set by the user, or are counter-trend, the triangles are plotted in silver.
When used in conjunction with the Power Analyzer indicator, a signal to the long side should be taken when the Power Analyzer momentum indicator is at a cycle low. Similarly, a signal to the short side should be taken when the indicator is at a cycle high.
The first, second or third signal in a new trend have the highest probability of a follow through.
The indicator sometimes gives a false signal at the very end of the trend, just before the market reverses. This is an attempt by the Market Makers to persuade traders that the trend will continue.
Please leave a comment and "Like" this indicator if you find it useful.
FX Engineering
The 11 moving averages with bar color It is made by 11 moving averages and an indicator that color the candles when there is a strong trend.
The moving averages change color becoming green or red if there is a bullish trend in green or a bearish trend in red.
There are few ways to use this indicator.These two is what I found easier, please back test it and share your thoughts.
1. When the cloud is red and the candle is outside the cloud and the candle become red it s a sell entry.
When the cloud is green and the candle is outside the cloud and become green it s a buy entry.
2.The moving averages can be used as dynamic support and resistance.In a red cloud if a candle stop exactly where there is a moving averages and the next candle is a bearish engulfing candle it s a sell entry.
In a green cloud if a candle stop exactly where there is a moving averages and the next candle is a bullish engulfing candle it s a buy entry.
The exit is when the bar is not colored anymore or if the bar close below/above the second moving average from the top/from the bottom
Please look as well the blue moving averages that could work as dynamic support/resistance
VERY IMPORTANT WHEN YOU TRY A NEW STRATEGY TEST IT IN A DEMO ACCOUNT FOR AT LEAST 3 MONTHS
Every donations will be devolved to cancer research and you ll have one month free trial.
If you want to purchase this indicator 30% will be devolved to cancer research.
Please leave a comment or message me if you want you have two weeks trial.
Enjoy!
Bollinger/Donchian + BollingerA mixture of A Bollinger and fork from Ricardo Santos Donchian/Bollinger(DBH). Looks Nicer on a higher time frame, 4hr+. Default of DBH is 20, but 13/15 looks clearer to me.
MTF SMA on specific timeframe(5M-4H)Japanese below. 日本語の説明は下記
This is multi time frame simple moving average that is shown only on the specific timeframe; 5M, 15M, 30M, 1H, 4H.
Problem of conventional MTF moving average is that MTF MA is sometimes annoying especially when you look at upper timeframe such as daily chart and/or weekly chart.
e.g. You set 20 MA of 4 hour chart into 1 hour chart, however, when you look at daily chart, daily chart also shows 20MA of 4 hour chart which is unnecessary.
This is why I have developed this MTF SMA indicator shown only on the timeframe from 5M to 4 hour.
With this indicator, even if you set MA of upper timeframe(such as 4 hour) into Lower timeframe, that MA will not be shown on above daily chart.
You can customize adding or removing below code;
timeframe.period == “X”? security(syminfo.tickerid, res, sma(src, ma_len))
X is the timeframe that you would add/remove from the indicator.
——————————————————————————————
特定の時間軸にのみ表示されるマルチタイムフレーム移動平均線のインジケーターです。
従来のマルチタイムフレーム移動平均線の問題点は、上位足に切り替えた時にもマルチタイムフレーム移動平均線の設定が表示され、チャートが見にくくなる点でした。
例: 4時間足の20MAをマルチタイムフレーム移動平均線としてセットしたとします。この場合、1時間足などの下位足で4時間足の20MAが表示されることになりますが、同時に日足や週足といった上位足チャートを見る時にも、この4時間足の20MAが表示されてしまいます。
このインジケーターでは、従来のマルチタイムフレーム移動平均線と同様に、設定元となる上位足の時間軸(4時間、日足など)を選択し、期間とソースを設定することができる一方で、表示されるのは5分足、15分足、30分足,1時間足、4時間足のみとなります。
スクリプトのMAの取得部分に以下コードを追加することで、必要な時間軸を追加・削除することが可能です。
timeframe.period == “X”? security(syminfo.tickerid, res, sma(src, ma_len))
Xは表示したい時間軸です。4時間足チャートからこのインジケーターを削除したい場合は
timeframe.period == “240”? security(syminfo.tickerid, res, sma(src, ma_len))
を削除してください。
2-Year MA MultiplierThis script improves on the basic moving average multiplier script by adding inputs for the multiplier and moving average type.
COPPER 5Mins BUY/SELL StrategyCopper Buy/Sell Indicator for Copper Future Contracts (since tested only on copper) based on Simple Moving Average.
This works based on the gap between the price and sma along with the open and close value.
This sets target as 2 points and stop loss as 3 points. The position may reverse based on the scenario. Works well with 5 mins timeframe.
Web SlingerIf the candles are above the ichimoku clouds and webstrings, search for BUYS. If the candles are below the ichimoku clouds and webstrings, search for SELLS.
For greater effectiveness operate with the trend (also applying price action and looking for bounce points)
SMA: 9
EMA:5
EMA:9
EMA:10
EMA:15
EMA:20
EMA:25
EMA:30
EMA:35
EMA:40
EMA:45
EMA:50
EMA:55
EMA:60
EMA:65
EMA:70
EMA:75
EMA:80
EMA:85
EMA:90