Level 1 - Learn to code simply - PineScriptThe goal of this script is honestly to help everyone learn about trading with bots and algos.
At least, to get started.
Level 1:
10 lines of code.
learn to plot 2 moving averages on your chart.
learn to create a signal from a crossover.
learn the very basics of Pine Script algo.
Algotrading
[Fedra Algotrading LR + TTP Indicator Lite]How it works?
- It calculates the linear regression of the last X candles and define a range based on a linear regression deviation (represented by the 3 parallel lines over the last candle).
-Open trades based on the breakout of the deviation of the linear regression (represented by the yellow triangle).
-Advanced trend filter to not open trades against the trend consist in 2 SMA cross and and a few other conditions, including sptionally super trend (Represented by the red and green background).
-Percentage take profit (represented by the horizontal green line. configurable)
-Percentage stop loss (represented by the horizontal red line. Configurable
-Break even when a trade has already opened and there is a change of trend. Calculated in 1.5% when the price is under the yellow SMA.
Alerts in each case to receive notifications (BUY & SELL, TP BE SL).
Added labels with entry price and PnL of each closed trade to facilitate optimization
Joint Conditions Strategy Suite + TradingConnector alerts bot"Please give us combined alerts with the possibility of having several conditions in place to trigger the alert." - was the top voted request from users under one of the recent blogposts by TradingView.
Ask and you shall receive ;)
TradingView is a great platform, with unmatched set of functionalities, yet this particular combo of features indeed seems not to be in place. Fortunately, TradingView is also very open platform, thanks to PineScript coding language, which enables developing combos like the requried one and plenty of other magic.
I have already published numerous "educational" scripts, showing how to code indicators and alerts with PineScript, but... this is not one of them. This one is for real. READY FOR USE on real markets, also by the non-coding traders. Just take my script, set parameters with dropdowns, backtest the strategy, fire the alerts and execute them.
HOW TO USE IT
In "Settings" popup I tried to mimic the CreateAlert popup dropdowns for selecting logic. Let's say you want to enter Long position at Stochastic KxD crossover. In first line of Long Entry conditions set "StochK" + "Crossing Up" + "StochD". Last field doesn't matter because in 3rd dropdown something else than "value" was selected. In second line you could set "maB" + "Greater Than" + "maC" to filter out those entries which are in direction of the uptrend. And yeah, add ADX>25 to make sure the market is actually moving: "ADX" + "Greater Than" + "value" + "25". All condition lines must be TRUE (or skipped) for the entry to be triggered. Toghether with an alert.
The same for Short entries. Combinations are limitless.
INDICATORS AND MTF (MULTI-TIMEFRAME)
In those dropdowns you can select candle values like open/close/high/low/ohlc4, but also some most popular indicators, which I have pre-built into this script: RSI, various Moving Averages, ADX-DMI, Stochastic and Bollinger Bands for start. You can configure parameters of those indicators also in "Settings" popup, in "Indicator Definitions" section. What's important, you can use any of these indicators from higher timeframe, setting MTF multiplier. So if you applied this indicator to 1h chart, but want to use rsi(close,14) from 4h chart, set MTF to 4. If you want to use current timeframe indicators, keep MTF at 1, which is a default setting here.
Note for coders: to keep focus of this script on joining conditions, entire logic for those indicators has been moved to external library, also open source. I encourage you to dig into the code and see how it's done. I love the addition of libraries concept in PineScript.
CUSTOM INDICATOR
Following the "openness" spirit of my master - which is TradingView itself - my work is also open, in 2 ways:
1. This script is open source. So you can grab it, modify or add any functionalities you want. I cannot and don't want to stop you from doing that. I'm asking for only one favor - please mention this source script in your credits.
2. You can import the plot (series) from any other indicator on TradingView. In Settings popup of my script, scroll down to "Indicator Definitions" section, and select the series of your choice in the first dropdown. Now it is ready to use in conditions dropdowns on top of the Settings popup.
Let me give you an example of that last scenario. Take another script of mine, "Pivot Points on SR lines DEMO". You can find it in "Indicators & Strategies" library or here: (). Attach it to your chart. Now come back to THIS script, open Settings popup and in "Custom Indicator aka Imported Source" select "Pivot Points on SR lines: ...". The way it works - it detects if a pivot point happened on Support/Resistance line from the past and returns 1 for PivotLow and -1 for Pivot High. Now in first Long Entry condition set: "custom indicator" + "Greater Than" + "value" + "0" and long entries will be marked on every pivot low noticed on Support/Resistance line.
ALERTS
Last but not least - the alerts. This script produces alerts on the entries calculated by strategy logic, as marked on the chart by the backtester. Moreover, syntax of those alerts is already prepared and fully compatible with TradingConnector - alerts executing tool (bot), if you want to auto-execute those trades. Apart from installing the tool, you need to set
up the alerts in TradingView, here is how:
open CreateAlert popup
in first dropdown select "Joint Conditions Strategy Template"
in second dropdown select "alert() function calls only"
And that's all. You only need to set one alert for the whole script, not one for Longs and one for Shorts as it was in the past. Also, you don't need to setup closing alerts, because stop-loss/take-profit/trailing-stop information is embedded in the entry alert so your broker receives it as early as possible. Alerts sent will look like this: "long sl=40 tp=80", which is exactly what TradingConnector expects.
Phew, that's all folks. If you think I should add something to this template (maybe other indicators?) please let me know in comments or via DM. Happy trading!
P.S. Pyramiding is not supported in this script.
Disclaimer : I'm not saying above combination of conditions will make you money. Actually none of this can be considered financial advice. It is only a software tool. Use it wisely, be aware of the risk and do your own research!
Bollinger band & Volume based strategy V2this script is upgraded version of previous one the major change is deleted script which find a highest price after entry the last of strategy is same.
If current volume is above daily average volume, and three bollinger band`s Standard Deviation, 1 and 1.5 and 2 if the current lowest price is bigger then 1 stdev and current closed is bigger then 1.5 stdev and the last,highest price is above 2.0 stdev, it defined current market is bullish and had momentum.
and the Short will entered when ma60 and ma120 is undercrossed it work as prevent current price is way lower then entry price.
**this script is working in 15min Only in BTC market or USDT**
** basic equity setting is 500$, set your own**
**if you will use this in real-trade,plz comment the result to me**
Ps: i wanna know why my script is only working well in 15 min tick, anyone who has similar phenomenon or if you had a answer about it, please comment me.
Linear SSL ShortThis script consist of two parts: linear SSL and DEMA. The difference between original SSL and current is that it calculated by linear regression. The logic is simple: when SSL "crossunder" and DEMA is above the price - we get short signal. When price became above DEMA and SSL "crossover" - close short.
Pivot Reversal Strategy + alerts via TradingConnector to indicesSoftware part of algotrading is simpler than you think. TradingView is a great place to do this actually. To present it, I'm publishing each of the default strategies you can find in Pinescript editor's "built-in" list with slight modification - I'm only adding 2 lines of code, which will trigger alerts, ready to be forwarded to your broker via TradingConnector and instantly executed there. Alerts added in this script: 14 and 22.
How it works:
1. TradingView alert fires.
2. TradingConnector catches it and forwards to MetaTrader4/5 you got from your broker.
3. Trade gets executed inside MetaTrader within 1 second of fired alert.
When configuring alert, make sure to select "alert() function calls only" in CreateAlert popup. One alert per ticker is required.
Adding stop-loss, take-profit, trailing-stop, break-even or executing pending orders is also possible. These topics have been covered in other example posts.
This routing works for Forex, indices, stocks, crypto - anything your broker offers via their MetaTrader4 or 5.
Disclaimer: This concept is presented for educational purposes only. Profitable results of trading this strategy are not guaranteed even if the backtest suggests so. By no means this post can be considered a trading advice. You trade at your own risk.
If you are thinking to execute this particular strategy, make sure to find the instrument, settings and timeframe which you like most. You can do this by your own research only.
RSI Strategy with alerts via TradingConnector to ForexSoftware part of algotrading is simpler than you think. TradingView is a great place to do this actually. To present it, I'm publishing each of the default strategies you can find in Pinescript editor's "built-in" list with slight modification - I'm only adding 2 lines of code, which will trigger alerts, ready to be forwarded to your broker via TradingConnector and instantly executed there. Alerts added in this script: 12 and 17.
How it works:
1. TradingView alert fires.
2. TradingConnector catches it and forwards to MetaTrader4/5 you got from your broker.
3. Trade gets executed inside MetaTrader within 1 second of fired alert.
When configuring alert, make sure to select "alert() function calls only" in CreateAlert popup. One alert per ticker is required.
Adding stop-loss, take-profit, trailing-stop, break-even or executing pending orders is also possible. These topics have been covered in other example posts.
This routing works for Forex, indices, stocks, crypto - anything your broker offers via their MetaTrader4 or 5.
Disclaimer: This concept is presented for educational purposes only. Profitable results of trading this strategy are not guaranteed even if the backtest suggests so. By no means this post can be considered a trading advice. You trade at your own risk.
If you are thinking to execute this particular strategy, make sure to find the instrument, settings and timeframe which you like most. You can do this by your own research only.
DMI + HMA - No Risk ManagementDMI (Directional Movement Index) and HMA (Hull Moving Average)
The DMI and HMA make a great combination, The DMI will gauge the market direction, while the HMA will add confirmation to the trend strength.
What is the DMI?
The DMI is an indicator that was developed by J. Welles Wilder in 1978. The Indicator was designed to identify in which direction the price is moving. This is done by comparing previous highs and lows and drawing 2 lines.
1. A Positive movement line
2. A Negative movement line
A third line can be added, which would be known as the ADX line or Average Directional Index. This can also be used to gauge the strength in which direction the market is moving.
When the Positive movement line (DI+) is above the Negative movement line (DI-) there is more upward pressure. Ofcourse visa versa, when the DI- is above the DI+ that would indicate more downwards pressure.
Want to know more about HMA? Check out one of our other published scripts
What is this strategy doing?
We are first waiting for the DMI to cross in our favoured direction, after that, we wait for the HMA to signal the entry. Without both conditions being true, no trade will be made.
Long Entries
1. DI+ crosses above DI-
2. HMA line 1 is above HMA line 2
Short Entries
1. DI- Crosses above DI+
2. HMA line 1 is below HMA lilne 2
Its as simple as that.
Conclusion
While this strategy does have its downsides, that can be reduced by adding some risk manegment into the script. In general the trade profitability is above average, And the max drawdown is at a minimum.
The settings have been optimised to suite BTCUSDT PERP markets. Though with small adjustments it can be used on many assets!
Engulfing Candle Rejection IndicatorThis indicator allows you to filter noisy chart, with engulfing candles which have been rejected from current trend lines. Trend lines by default are 21 MA (fast) and 10 MA (slow one). If fast moving average is greater than slower one, automatically indicator would represent that like uptrend, and if opposite then like a downtrend.
Consider to work only on higher time frames like 1H and higher, so you really can find only best entries.
Have fun, best wishes!
Pinbar-Rejection-IndicatorThis indicator allows you to filter noisy pin bar chart, with pin bars which have been rejected from dynamic support/resistance level also named as 21 Moving Average.
I would consider to work only on higher time frames like 1H and higher, so you really can find only best entries.
Have fun, write your feedback in the comments section:)
P.S This is the first version of the indicator, so be free to contribute, and soon I'm going to improve this indicator.
Ichimoku Cloud Strategy Long Only [Bitduke]Slightly modificated and optimized for Pine Script 4.0, Ichimoku Cloud Strategy which, suddenly, good suitable for the several crypto assets.
Details:
Enter position when conversion line crosses base line up, and close it when the opposite happens.
Additional condition for open / close the trade is lagging span, it should be higher than cloud to open position and below - to close it.
Backtesting:
Backtested on SOLUSDT ( FTX, Binance )
+150% for 2021 year, 8% dd
+191% for all time, 32% dd
Disadvantages:
- Small number of trades
- Need to vary parameters for different coins (not very robust)
Should be tested carefully for other coins / stock market. Different parameters could be needed or even algo modifications.
Strategy doesn't repaint.
Grid Bot AutoThis script is an auto-adjusting grid bot simulator. This is an improved version of the original Grid Bot Simulator. The grid bot is best used for ranging/choppy markets. Prices are divided into grids, or trade zones, that will trigger signals each time a new zone is entered. During ranging markets, each transaction is followed by a “take profit.” As the market starts to trend, transactions are stacked (compare to DCA ), until the market consolidates. No signals are triggered above the Upper Limit or Below the Lower Limit. Unlike the previous version, the upper and lower limits are calculated automatically. Grid levels are determined by four factors: Smoothing, Laziness, Elasticity, and Grid Intervals.
Smoothing:
A moving average (or linear regression) is applied to each close price as a basis. Options for smoothing are Linear Regression, Simple Moving Average, Exponential Moving Average, Volume-Weighted Moving Average, Triple-Exponential Moving Average.
Laziness:
Laziness is the percentage change required to reach the next level. If laziness is 1.5, the price must move up or down by 1.5% before the grid will change. This concept is based on Alex Grover’s Efficient Trend Step. This allows the grids to be based on even price levels, as opposed to jagged moving averages.
Elasticity:
Elasticity is the degree of “stickiness” to the current price trend. If the smoothing line remains above (or below) the current grid center without reverting but still not enough to reach the next grid level, the grid line will start to curve toward the next grid level. Elasticity is added to (or subtracted from) the gridline by a factor of minimum system ticks for the current pair. Elasticity of zero will keep the gridlines horizontal. If elasticity is too high, the grid will distort.
Grid Intervals:
Grid intervals are the percentage of space between each grid.
Laziness = 4%, Elasticity = 0. Price must move at least 4% before reaching the next level. With zero elasticity, gridlines are straight.
Laziness = 5%, Elasticity = 100. For each bar at a new grid level, the grid will start “curve” toward the next price level (up if price is greater than the middle grid, down if less than middle grid). Elasticity is calculated by the user-inputted “Elasticity” multiplied by the minimum tick for the current pair (ELSTX = syminfo.mintick * iELSTX)
Try experimenting with different combinations of the Smoothing Length, Smoothing Type, Laziness, Elasticity, and Grid Intervals to find the optimum settings for each chart. Lower-priced pairs (e.g. XRP/ADA/DODGE) will require lower Elasticity. Also note that different exchanges may have different minimum tick values. For example, minimum tick for BITMEX:XBTUSD and BYBIT:BTCUSD is .5, but BINANCE:BTCUSDT and COINBASE:BTCUSD is .01.
s3.tradingview.com
DODGEUSDT, 5min. Laziness: 4%, Elasticity 2.5
Number of Grids: 2. Laziness: 3.75%. Elasticity: 150. Grid Interval 2%.
Settings Overview
Smoothing Length : Smoothing period
Smoothing Type : Linear Regression, Simple Moving Average, Exponential Moving Average, Volume-Weighted Moving Average, Triple-Exponential Moving Average
Laziness : Percentage required for price to move until it reaches the next level. If price does not reach the next level (up or down), the grid will remain the same as previous grid (because it’s lazy).
Elasticity : Amount of curvature toward the next grid, based on the current price trend. As elasticity increases, gridlines will curve up or down by a factor of the number of ticks since the last grid change.
Grid Interval : Percent between grid levels.
Number of Grids : Number of grids to show.
Cooldown : Number of bars to wait to prevent consecutive signals.
Grid Line Transparency : Lower transparencies brighten the gridlines; higher transparencies dim the gridlines. To hide the gridlines completely, enter 100.
Fill Transparency: Lower transparencies brighten the fill box; higher transparencies dim the fill box. To hide the fill box completely, enter 100.
Signal Size : Make signal triangles large or small.
Reset Buy/Sell Index When Grids Change : When a new grid is formed, resetting the index may prevent false signals (experimental)
Use Highs/Lows for Signals : If enabled, signals are triggered as soon as the price touches the next zone. If disabled, signals are triggered after bar closes. Enable this for “Once Per Bar alerts. Disable for “Once Per Bar Close” alerts.
Show Min Tick : If checked, syminfo.mintick is displayed in upper-righthand corner. Useful for estimating Laziness.
Reverse Fill Colors : Default fill for fill boxes is green after buy and red after sell. Check this box to reverse.
Note: The Grid Bot Simulator scripts are experimental and works in progress. Please feel free to comment or contact me if you have suggestions/complaints.
Stochastic TrendDear community,
I've made another simple trading bot for you to use. This bot is based on the Stochastic Oscillator. It only produces long trades currently.
I changed the oscillation period to a much longer one, which in turn creates opportunities to trade long term trends.
The bot goes long when the Entry lines is crossed from below and it will close its long position once the Exit line has been crossed from above.
Strategy NNFX Tester Strategy NNFX, Baseline, QQEs Fast C1, Slow C2, ATR, Volume and Exit
This is a Strategy Tester designed to work with Study (Alerts) of the same.
At time of creation based on Revision 8 of the Study.
DO NOT USE the Currency/Money Management section under settings. use the position sizing under "Inputs" - "Money Management" - "Risk per trade" which is defaulted to 2%
This has adjustable Baselines, Exits, ATR calculations, C1 and C2 are currently QQE & QQE Histo with adjustable settings but I'll include more choice of C1 & C2 as time goes on.
Find settings that work for you, then move them over to the Study version for best results.
Forward plans are to add much more options to both Alert/Strategy.
If anyone wants to collaborate or anything hit me up.
NNFX, Baseline, QQEs Fast C1, Slow C2, ATR, Volume and ExitDesigned Around the NNFX rules
Selectible Baseine
Selectible Exit Indicators
ATR bands, ATR labels for TP and TSL (1x and 1.5x ATR).
Indication (White Diamond) where candle is over 1x ATR in size.
Combined QQE Fast & Slow (C1 & C2) confirmations, Candles Grey before Trend Confirmed, change to Normal Colour when Trend established (QQE MOD used for calcualtions).
Continuations signaled by white dot above/below candle (0.9x ATR from Close Signal).
Exit Long and Exit Short signaled by Red and Blue Arrow under/above candle.
Keltner Channel [LINKUSDT] 1HThis is a long-only strategy tested on LINK/USDT, 1 hour bar, from Feb 2019. The entry is determined by the breakout of upper Keltnel Channel and when the +DI is higher than 32. Instead of a fixed stop-loss from the original script , I change the exit to the middle band of the Keltnel Channel. 1st profit target will close 20% of the position. 2nd profit target will close 30% of the position. While the remaining 50% position will be closed when the price closes below the middle band of the Keltnel Channel, to take advantage of big trend. All parameters are adjustable. I added another option to enable or disable the ribbon trend filter.
My thoughts: For the same period, LINK appreciated 3000%. So I guess most in and out strategies couldn’t beat a buy and hold strategy during this period. But this doesn’t mean that this strategy is not feasible as each strategy is designed to only take advantage of a certain pattern or behavior of the market. Also, short term strategies allow you to use leverage and hence enable you to use you capital efficiently. Commission is set to 0.1%, taking account of the slippage.
Suggestion: Please perform walk forward analysis before you use real money for trading. Parameters need to be adjusted from time to time depends on your analysis. Can try using ATR for profit targets as over a longer term, the volatility might drop hence a high fixed % profit targets might not be realistic.
Any suggestions are welcome!
BTC and ETH Long strategy - version 1I will start with a small introduction about myself. I'm now trading cryto currencies manually for almost 2 years. I decided to start after watching a documentary on the TV showing people who made big money during the Bitcoin pump which happened at the end of 2017.
The next day, I asked myself "Why should I not give it a try and learn how to trade".
This was in February 2018 and the price of Bitcoin was around 11500USD.
I didn't know how to trade. In fact, I didn't know the trading industry at all.
So, my first step into trading was to open an account with a broken. Then I directly bought 200$ worst of BTC . At that time, I saw the graph and thought "This can only go back in the upward direction!" :)
I didn't know anything about Stop loss, Take profit and Risk management.
Today, almost 2 years after, I think that I know how to trade and can also confirm that I still hold this bag of 200$ of bitcoin from 2018 :)
I did spend the 2 last years to learn technical analysis , risk management and leverage trading.
Today (14/05/2020), I know what I'm doing and I'm happy to see that the 2 last years have been positive in terms of gains. Of course, I did not make crazy money with my saving but at least I made more than if I would have kept it in my bank account.
Even if I like trading, I have a full time job which requires my full energy and lots of focus, so, the biggest problem I had is that I didn't have enough time to look at the charts.
Also, I realized that sometimes, neither technical analysis , nor fundamentals worked with crypto currency (at least for short time trading). So, as I have a developer background I decided to try to have a look at algo trading.
The goal for me was neither to make complex algos nor to beat the market but just to automate my trading with simple bot catching the big waves.
I then started to take a look at TV pine script and played with it.
I did my first LONG script in February 2020 to Long the BTC Market. It has some limitations but works well enough for me for the time being. Even if the real trades will bring me half of what the back testing shows, this will still be a lot more than what I was used to win during the last 2 years with my manual trading.
So, here we are! Below you will find some details about my first LONG script. I'm happy to share it with you.
Feel free to play with it, give your comments and bring improvements to it.
But please note that it only works fine with the candle size and crypto pair that I have mentioned below. If you use other settings this algo might loose money!
- Crypto pairs : XBTUSD and ETHXBT
- Candle size: 2 Hours
- Indicator used: Volatility , MACD (12, 26, 7), SMA (100), SMA (200), EMA (20)
- Default StopLoss: -1.5%
- Entry in position if: Volatility < 2%
AND MACD moving up
AND AME (20) moving up
AND SMA (100) moving up
AND SMA (200) moving up
AND EMA (20) > SAM (100)
AND SMA (100) > SMA (200)
- Exit the postion if: Stoploss is reached
OR EMA (20) crossUnder SMA (100)
Here is a summary of the results for this script:
XBTUSD : 01/01/2019 --> 14/05/2020 = +107%
ETHXBT : 01/01/2019 --> 14/05/2020 = +39%
ETHUSD : 01/01/2019 --> 14/05/2020 = +112%
It is far away from being perfect. There are still plenty of things which can be done to improve it but I just wanted to share it :) .
Enjoy playing with it....
(JS) Multi-Time Frame Pivot Point Detector 2.0So here's an updated version of my automatic Pivot Point detector.
If you don't like having a bunch of Pivots on your chart at once, or having to cycle through various resolutions to see different ones, this is for you!
What does this indicator do? It automatically detects the nearest daily, weekly, and monthly pivot points both above and below the current price and automatically plots them for you. It's really just as simple as that.
You select how far back you want it to plot with the "Pivot Point Look Back Period" option.
I also have transparency options for each type of pivot so its easy to find the opacity you prefer and save it as a default setting.
With "Turn Off Each Pivot Point On All Time Frames" turned on, as an example, if you were to uncheck "S1/R1" then it turns S1/R1 plots off across all 3 pivot resolutions. By default however, I have it set where you can pick and choose each one individually.
I also added the default "VWAP Periodic" script from TradingView in there with it (not in prior version). This works identical to the built in indicator (because it is identical).
Trading algorithms like to target pivot points and liquidity, so I figured they would pair together nicely for active trading.
Ichimoku Clouds Strong Bullish/Bearish signals and alertsIchimoku Clouds Strong Bullish/Bearish signals with allerts
The Ichimoku cloud was developed by Goichi Hosoda, a Japanese journalist, and published in the late 1960s. It provides more data points than the standard candlestick chart. While it seems complicated at first glance, those familiar with how to read the charts often find it easy to understand with well-defined trading signals.
We provide you easy-to-use script which helps to decrypt meaning of lines in the indicator. The script takes Ichimoku clouds indicator formulas to calculate Tenkan, Kijun, SenkouA, SenkouB values and examines them in order to produce buy ( Bullish ) and sell ( Bearish ) signals which are displayed at the chart
The most appropriate time frame is 30m
Custom alerts are added to send you a notice with a webhook when bullish or bearish signal arrives.
You can easily add weak and neutral signals alerts by removing "//" in a specified place
Feel free to copy and use this script for your ideas and trading. You can modify the script by adding Parabolic SAR in order to increase accuracy of positions closure
Coinbase_3-MIN_HFT-StrategyThis conceptual strategy trades against the short-term trend. The first position can be either long or short.
In the short-term, prices fluctuate up and down on wide spread exchanges.
And if the price moves to one side, the price tends to return to its original position momentarily.
This strategy set stop order. Stop price is calculated with upper and lower shadows.
Combo Backtest 123 Reversal & CMOaDisparity Index This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
The related CMOaDisparity Index article is copyrighted material from Stocks & Commodities Dec 2009
My strategy modification.
WARNING:
- For purpose educate only
- This script to change bars colors.
N Bars Down Backtest Evaluates for n number of consecutive lower closes. Returns a value
of 1 when the condition is true or 0 when false.
WARNING:
- For purpose educate only
- This script to change bars colors.
N Bars Up Backtest Evaluates for n number of consecutive higher closes. Returns a value
of 1 when the condition is true or 0 when false.
WARNING:
- For purpose educate only
- This script to change bars colors.