Strategy Backtester TemplateA template for building a strategy tester:
- date range selector
- stop loss
- take profit
- long and short strategy type selector
Strategy
MTF stochastic strategyThis strategy is based on MTF strategy found on Forex Factory forum and published by bobby2 (credits to him).
This is quite simple but need improvement to work properly:
1- it is made for 5 min chart
2- when 15min stochastic cross above 50 and 5min stochastic is rising, buy
3- when 15min stochastic cross below 50 and 5min stochastic is falling, sell
Gidra's RSI or MFI Strategy v 0.1Strategy based on Gregg_s indicator RSI or MFI (ru.tradingview.com)
When crossing above 0 - close short, open long
When crossing below 1 - close long, open short
For crypto/fiat and any timeframe
Keltner Channel Strategy The Keltner Channel, a classic indicator
of technical analysis developed by Chester Keltner in 1960.
The indicator is a bit like Bollinger Bands and Envelopes.
WARNING:
- This script to change bars colors.
Gidra's Vchain Strategy v0.1Tested on "BTC/USD", this is a reversible strategy
If the RSI is lower than "RSI Limit" (for last "RSI Signals" candles) and there were "Open Color, Bars" green Heiken Ashi candles - close short, open long
If the RSI is higher than 100-"RSI Limit" (for last "RSI Signals" candles) and there were "Open Color, Bars" red Heiken Ashi candles - close long, open short
- timeframe: 5m (the best)
RSI Period = 14
RSI Limit = 30
RSI Signals = 3
Open Color = 2
Piramiding = 100
Lot = 100 %
- timeframe: 1h
RSI Period = 2
RSI Limit = 30
RSI Signals = 3
Open Color = 2
Piramiding = 100
Lot = 100 %
Woodie Pivot Points Strategy Simply input the vales of the high, low and closing price of the previous
period to calculate the Woodie pivot point and the associated resistance
and support levels for the present period.
WARNING:
- This script to change bars colors.
Volatility Strategy The Volatility function measures the market volatility by plotting a
smoothed average of the True Range. It returns an average of the TrueRange
over a specific number of bars, giving higher weight to the TrueRange of
the most recent bar.
WARNING:
- This script to change bars colors.
TFS: MBO Strategy MBO indicator is the third component of TFS trading system. This indicator
was developed by Bryan Strain and Mark Whitley.
The idea of MBO is similar to moving average convergence/divergence (MACD)
indicator. It is calculated by subtracting the 200-day moving average from
the 25-day moving average.
WARNING:
- This script to change bars colors.
TEMA1 Strategy This study plots the TEMA1 indicator. TEMA1 ia s triple MA (Moving Average),
and is calculated as 3*MA - (3*MA(MA)) + (MA(MA(MA)))
WARNING:
- This script to change bars colors.
Ehlers-Smoothed Stochastic RSI StrategyI have been asked by several people for a Strategy based on the ES Stoch RSI Alert so here it is. The strategy has an adjustable backtest date range so that you can adjust the test time period to whatever you like. This strategy is based on a script by fskrypt.
Moving average cloud strategyHi folks!
Here a script uses the moving average cloud. A sma (50, aqua) and a sma (200, olive) are plotted on the cart. When both sma go up the cloud is green. When both sma go down the cloud is red. When sma (200, olive) goes down and sma (50, aqua) goes up the cloud is orange. When sma (200, olive) goes up and sma (50, aqua) goes down the cloud is lime.
There three entry points in this strategy.
Long
Aggressive: When the cloud turns orange and price closes above the sma (200).
Neutral: When the both sma make the golden cross.
Cautious: When the cloud is green and price closes sma (200) after searching for support. So not when there's a great distance between them.
In case you missed the entry point you can jump in when price CLOSES above sma (50). So after it searched for support on that line. The cloud has to be green at that moment.
Short
Aggressive: When the cloud turns lime and price CLOSES below the sma (200).
Neutral: When the both sma make the death cross.
Cautious: When the cloud is green and price is above the sma (200).
In case you missed the entry point you can jump in when price CLOSES above sma (50). So after it searched for support on that line.
There are also two exit points in this strategy.
Cautious: When price closes on the other side of the sma (50).
Neutral: When the cloud changes color.
Aggressive: When price closes on the other side of the sma (200). There's always the opportunity that the price searches for support at the sma (200) line and goes from that moment in the direction you want.
Don't wait for the cross of the both sma. Very usually you give a huge part of your profit away at that point.
Remember: Above the cloud is bullish area, never go short there. Below the cloud is bearish area, never go long there.
Remember 2: When the clouds changes rapidly from color we're not in a trend. The sma (200) will be almost flat at those situations. It's a sign not to go into a trade since the market doesn't know in which direction it will go.
Smart Money Index (SMI) Strategy Attention:
If you would to use this indicator on the ES, you should have intraday data 60min in your account.
Smart money index (SMI) or smart money flow index is a technical analysis indicator demonstrating investors sentiment.
The index was invented and popularized by money manager Don Hays. The indicator is based on intra-day price patterns.
The main idea is that the majority of traders (emotional, news-driven) overreact at the beginning of the trading day
because of the overnight news and economic data. There is also a lot of buying on market orders and short covering at the opening.
Smart, experienced investors start trading closer to the end of the day having the opportunity to evaluate market performance.
Therefore, the basic strategy is to bet against the morning price trend and bet with the evening price trend. The SMI may be calculated
for many markets and market indices (S&P 500, DJIA, etc.)
The SMI sends no clear signal whether the market is bullish or bearish. There are also no fixed absolute or relative readings signaling
about the trend. Traders need to look at the SMI dynamics relative to that of the market. If, for example, SMI rises sharply when the
market falls, this fact would mean that smart money is buying, and the market is to revert to an uptrend soon. The opposite situation
is also true. A rapidly falling SMI during a bullish market means that smart money is selling and that market is to revert to a downtrend
soon. The SMI is, therefore, a trend-based indicator.
Some analysts use the smart money index to claim that precious metals such as gold will continually maintain value in the future.
WARNING:
- This script to change bars colors.
Percent difference between price and MA Strategy Percent difference between price and MA Strategy
WARNING:
- This script to change bars colors.
Percent change bar chart Strategy This histogram displays price or % change from previous bar.
WARNING:
- This script to change bars colors.
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.
Modified Price-Volume Trend Strategy The related article is copyrighted material from
Stocks & Commodities.
Strategy by HPotter.
WARNING:
- This script to change bars colors.
Last High and Low Level Strategy This script shows a high and low period value.
SelectPeriod - Day or Week or Month and etc.
LookBackPeriods - Shift levels 0 - current period, 1 - previous and etc.
WARNING:
- This script to change bars colors
CM_Ultimate_MA_MTF_V2 with Alert Long and Short Hello All,
Here is a scirpt of ChrisMoody modified with the alerts of purchases and sales.
I just have a problem with automation. At the bottom of my script my alerts "Buy1" and "Sell2" give alerts constantly and I wish to have a single alert before the order is completed. Before "Sell1" or Buy2 ".
I found the function "barstate.isfirst" that could possibly work?
Does anyone have an idea ? :)
High and Low Levels Strategy This script shows a high and low period value.
Width - width of lines
SelectPeriod - Day or Week or Month and etc.
LookBack - Shift levels 0 - current period, 1 - previous and etc.
WARNING:
- This script to change bars colors.
Free Trend Lines Tool/IndicatorI don't trade much with trend lines, but I was bored so made this hopefully someone will make use of it or program a strategy with it or something like that. It finds the highs and lows, works out the distance in time and price, then uses that to calculate the angle of the trend which can be used to pain the trend line. If you have any questions on how to implement it into a strategy feel free to ask. It is written in quite a messy wayt so sorry about that.
Floor Pivot Points Strategy The name ‘Floor-Trader Pivot,’ came from the fact that Pivot points can
be calculated quickly, on the fly using price data from the previous day
as an input. Although time-frames of less than a day can be used, Pivots are
commonly plotted on the Daily Chart; using price data from the previous day’s
trading activity.
WARNING:
- This script to change bars colors.
Script functionality test - work in progress (2RS + BB + MA)This is the first script I've written. Its sole purpose is to make me learn a bit of pine script. Its not intended to trade live.
Feel free to modify it if you wish and let me know if you do it. Also any comments are welcome!
Also i need help in two things:
1. Im unable to print the "in-strategy" rsi on chart
2. I want to ignore the first buy signal after each sell. I was looking to ad a counter to the signals but im unable to do it.
Any help will be greatly appreciated!
Finite Volume Elements (FVE) Strategy The FVE is a pure volume indicator. Unlike most of the other indicators
(except OBV), price change doesn?t come into the equation for the FVE (price
is not multiplied by volume), but is only used to determine whether money is
flowing in or out of the stock. This is contrary to the current trend in the
design of modern money flow indicators. The author decided against a price-volume
indicator for the following reasons:
- A pure volume indicator has more power to contradict.
- The number of buyers or sellers (which is assessed by volume) will be the same,
regardless of the price fluctuation.
- Price-volume indicators tend to spike excessively at breakouts or breakdowns.
WARNING:
- This script to change bars colors.