Daily Moving Averages on Intraday ChartsPrints exponential 8, 21, 50, 100 and 200-day moving averages on intraday charts. For example, if you are on a 5 minute chart, you will see a magenta "X" making the current value of the 8-day EMA with an "8" label above it.
This is NOT a Strat script and it follows more closely the way Scott Redler from T3Live looks at charts. If you acknowledge that the vast majority of the time, price does have some sort of reaction to these daily EMAs (whether just a short relative pause or the beginning of a reversal), this script may be helpful.
The Strat and Rob Smith DO NOT support the use of moving averages. This adds more data to your chart which you may or may not find extraneous.
Intraday
Range PlotToday's first 75 minutes candle high in darker blue color and today's first 75 minutes candle low in darker red color.
Previous trading session last 75 minutes candle high in green color and previous trading session last 75 minutes candle low in orange color.
Today's marking are in blue n red little darker and previous day's last candle marking are in orange and red.
You are likely to familiar with the opening range of 5 min, 15 min, or even of 60 min also. In the opening range, we use today's' candle only. In the range plot, we have made a little addition of previous trading session last candle also. And we got very good results.
Price doesn't know what we have plotted. we just try to make our trading decisions around this area.
Range plot give very good signal in trending scripts and it helps to keep us out from ranging stock.
Badshai Trading ToolsBadshai Trading Tools is the tool where Buy and sell signals generates automatically according to the candles behavior.
It uses WD Gann Levels to calculate entry point with the help of VWAP .
Pivot points determines the recent support and resistance levels.
Trading rule for this indicator
This indicator is designed for Indian equity stocks
Best performance is expected on 10 minutes chart basic user can use 5 minutes chart for stock value less than 500 rupees, else 15 minutes chart
Plotted line shows the market sentiment, green for buy, red for sell and black for neutral market.
Order thumb rule
For buy signals there is a up triangle in green color
For sell signal there is a down triangle in red color
1. avoid any trade signal before 9:35 AM Indian time
2. signal and related stop loss candle must be formed in the same day
3. if order placed in 5 minutes chart then don't go for a target of 15 minutes chart
4. if order placed in 15 minutes time frame and target is too far then check the target in 5 minutes time frame
5. if signal candle touches the target then avoid the signal.
6. Money management is most important for this indicator.
7. Take trade only if it satisfy risk reward ratio.
8. It has long target but need patience.
Signal
using vwap calculates gann square of 9 levels and if any smart money activity on that level then checks the confirmation of the trend by higherhigh or lowerlow formation
Buy Entry : entry price should be on the high of the candle before signal for buy and sl on bottom of flagged candle just before signal
SellEntry : entry price should be on the low of the candle before signal for sell and sl on top of flagged candle just before signal
Please add some extra value to the Stop Loss for safe trading
Warning : Don't place any order without stop loss, This tool is made for educational and learning purpose only, take any trade at your own risk.
FTSMA - Trend is your frendThis my new solid strategy: if you belive that "TREND IS YOUR FRIEND" this is for you!
I have tested with many pairs and at many timeframes and have profit with just minor changes in settings.
I suggest to use it for intraday trading .
VERY IMPORTANT NOTE: this is a trend following strategy, so the target is to stay in the trade as much as possible. If your trading style is more focused on scalping and/or pullbaks, this strategy is not for you.
This strategy uses moving averages applied to Fourier waves for forecasting trend direction.
How strategy works:
- Buy when fast MA is above mid MA and price is above slow MA, which acts as a trend indicator.
- Sell when fast MA is below mid MA and price is below slow MA, which acts as a trend indicator.
Strategy uses a lot of pyramiding orders because when you are in a flat market phase it will close 1 or 2 orders with a loss, but when a big trend starts, it will have profit in a lot of orders.
So, if you analize carefully the strategy results, you will note that "Percent Profitable" is very low (30% in this case) because strategy opened a lot of orders also in flat markets with small losses, BUT "Avg # bars in winning trades" is very high and overall Profit is very high: when a big trend starts, orders are kept open for long time generating big profits.
Thanks to all pinescripters mentioned in the code for their snippets.
I have also a study with alerts. Next improvement (only to whom is interested to this script and follows me): study with alerts on multiple tickers all at one. Leave a comment if you want to have access to study.
HOW TO USE STRATEGY AND STUDY TOGHETER:
1- Add to chart the strategy first, so your workspace will be as clean as possible.
2- Open the Strategy Tester tab at footer of the page.
3- Modify settings to get best results (Profit, Profit Factor, Drawdown).
4- Add study with alerts to your chart with same setting of strategy.
I WILL PROVIDE A DETAILED QUICK INSTALLATION GUIDE WITH THE STUDY!
Please use comment section for any feedback or contact me if you need support.
Strategy - Bobo PAPATRHi I've revamped this bot mentioned in the linked idea to make it work with v4 of pine. In doing so there are some very significant changes to how it works. The main one is that it no longer uses traditional daily pivot calculations to calculate the bands. It creates a more dynamic intraday set of pivot points based on recent price action rather than yesterday's ohlc. As published, the bot is tuned for a 15 min time frame. But it actually works well on lower time frames you just need to adjust the lookback periods in settings a bit to re tune it. It's also tuned to ES really but will need tweaking for a different instrument at the very least.
The basic concept is recent price action is used to calculate a 'middle' around which red and green bands are located. Their position or width is largely determined by recent volatility. The middle line is again calculated from recent price action. The three lines from that form a tradeable range with green at the top and red at the bottom. The strategy is simple enough, it shorts as it sinks from outside red, and longs when rising above green. The basic principle being that once you enter that range you have a high probability of hitting the middle before you hit your stop loss. So the basic principle is you are trying to capture the inherent ranginess of liquid indices like S&P 500. That back and forth movement that happens. The bot is capturing this by fading extremes of a recent range but the problem with that is you'dd get murdered in a strong trend. To mitigate that there is a trend calculation running in the background the will prevent trading against firm trends mostly. So the bot should trade mostly in rangy conditions because that is what it is trying to do.
Bot will close issue close signals automatically upon crossing the middle, it also will close automatically at predefined stops or limits. These values are denominated in market mintick values. For example the CFD SPX500 has a mintick of 0.1. Therefore a stop value of 100 will equate to 10 points on the index. If trading the same market via ES1! the mintick value is different - 0.25. So in this case a value of 40 is required to set the stop at 10 points.
Anyway shout if you have questions. Hope it's useful.
TVC:SPX OANDA:SPX500USD
Strategy - Bobo Intraday Swing Bot with filtersThis is an adapted version of my swing bot with additional filters that mean it works quite well on lower timeframes like 1min, 5 mins as long as you adjust the setting accordingly (reduce pivot timescale, band width)
Entry conditions are filtered by an invisible trend calculation running in the background so the bot doesn't repeatedly try and fail to fade a strong trend. It has just about everything you should need for basic use, stop losses and targets, automatically close trade at pivot.
I get good results on rangey instruments like major indices such as SPX / ES that kind of thing. Make sure you understand the minmum tick value of an index so the stop setting on the bot work properly
Hope it's useful!
Crypto Tipster Study / Alerts -theCrypster===========
Crypto Tipster Study with Alerts
===========
Our Crypto Tipster Study with Alerts Script is a carbon copy of our tried and tested Crypto Tipster Pro Strategy , but now with the option of setting TradingView Alerts for your chosen trading plan. Making missing trades a thing of the past, and helping you to automate your own trading strategy.
-----------
Crypto Tipster Pro is a trading strategy with indicators based on Technical Analysis, Price Action and Momentum Swings for TradingView's charting platform.
We've compiled and continue to update a trading strategy that adapts to changes in the market; with custom indicator settings, fixed SL/TP, Trailing Stop, Safe Mode, Heikin Ashi Confirmation and more!
Our efforts have been focused towards the 1D time frame - using a larger time frame benefits most part-time or evening traders in multiple ways, catching bigger swings and earning a higher percentage per trade, the ability to reduce or remove any leverage associated with the trade, and only having to place a trade or move a stop loss ONCE per day ~ Meaning you are still able to go to work, tidy the house, play with the kids AND be a successful trader.
-----------
What's Included within Crypto Tipster Pro?
Crypto Tipster Pro comes with a host of features and is being continually updated, these features include (but are not limited to):
- Date Range Settings
Setting custom Start/End dates can help hone your strategy to suit the current times, or get a general overview of the market over the years.
- Heikin Ashi Confirmation
We added HA confirmation for both Entry & Exit of trades. This started as a form of "Safe Mode", we have since adapted this mode beyond Heikin Ashi; but kept this confirmation as an added extra.
- Variable Indicator Settings
As well as our Fixed Indicators and Price Action analysis going on in the background of the strategy, we've also included some Variable Indicators that you have access to edit.
Trend Detection Length for detecting trend! Higher numbers detect longer trends, but will inevitably make fewer trades and possibly miss the start of a new trend; a lower length will create more opportunities to trade but may get confused when ranging in choppy markets.
Range Short/Long Lengths are used for detecting percentage price movements over a given number of bars back. This enables you to effectively "zoom in" on market data and catch trends within trends.
- Safe Mode
Enabling Safe Mode will add a couple more confirmation indicators to the strategy - the aim of Safe Mode is, in essence, to remove any trading signals that would end of being false/bad moves. Usually resulting in less Overall Trades, a higher Net Profit, higher % Profitable, higher Profit Factor AND a lower Drawdown.
- Stop Loss/Take Profit Settings
This is where Crypto Tipster Pro really proves itself, Money Management. We have an editable Fixed SL/TP, as well as Trailing Stops for Long or Short orders, all of which you can use on their own, or combined with each other. Playing with these settings can turn an un-profitable system into a very-profitable system!
- Custom Stop Loss Indicator
This is a little extra indicator that we have found very useful over the years of trading markets, a custom Stop Loss Indicator. Simply turn it on, enter the price you want to calculate from, tick Long or Short, enter a % movement and watch as your new stop loss level is plotted on the chart. This is especially useful for when the strategy doesn't marry up with the prices you've actually obtained (for better or for worse!)
-----------
What's Included within Crypto Tipster Study / Alerts Script?
Our Study script will find Entry and Exit points exactly as our Pro Strategy would find them. The same indicators, methods and chart reading techniques are used, there are 2 big differences however...
The first difference is that our Pro Strategy has the ability to manage your money, Fixed Stops, Take Profit and Trailing Stops to name just a few. Our Study does not (and cannot) have these functions added due to the way TradingView's charting platform operates.
That's the bad news, the good news for our Crypto Tipster Study Script is that you can add Alerts to your trading plan! This is super handy if you decide to implement our methods into various time frames other than 1D and are looking for Intra-day alerts, or if you're looking to Automate your trading strategy using external software.
Help and Advice for setting up Alerts or to Automate your Strategy can be found on our website.
----------
For more information on the Crypto Tipster Pro Strategy visit the link in our signature.
Good Luck and Happy Trading!
Intraday Smart Money ExpertIntraday Masters Analogy is the tool where Buy and sell signals generates automatically according to the candles behavior.
It uses WD Gann Levels to calculate entry point with the help of VWAP .
Pivot points determines the recent support and resistance levels.
Trading rule for this indicator
This indicator is designed for Indian equity stocks
Best performance is expected on 5 minutes chart or 15 minutes chart
Order thumb rule
1. avoid any trade signal before 9:35 AM Indian time
2. signal and and related stop loss candle must be formed in the same day
3. if order placed in 5 minutes chart then don't go for a target of 15 minutes chart
4. if order placed in 15 minutes time frame and target is too far then check the target in 5 minutes time frame
5. if signal candle touches the target then avoid the signal.
6. Money management is most important for this indicator.
7. Take trade only if it satisfy risk reward ratio.
8. It has long target but need patience.
Signal
using vwap calculates gann square of 9 levels and if any smart money activity on that level then checks the confirmation of the trend by higherhigh or lowerlow formation
Buy Entry : entry price should be on the high of the candle before signal for buy and sl on bottom of flagged candle just before signal
SellEntry : entry price should be on the low of the candle before signal for sell and sl on top of flagged candle just before signal
Warning : Don't place any order without stop loss
Intraday Masters AnalogyIntraday Masters Analogy is the tool where Buy and sell signals generates automatically according to the candles behavior.
It uses WD Gann Levels to calculate entry point with the help of VWAP.
Zigzag trend lines shows the momentum behavior for last few days and shows whether it following current trend or building new trend.
Pivot points determines the recent support and resistance levels.
Trading rule for this indicator
This indicator is designed for Indian equity stocks
Best performance is expected on 5 minutes chart or 15 minutes chart
Order thumb rule
1. avoid any trade signal before 9:35 AM Indian time
2. signal and and related stop loss candle must be formed in the same day
3. if order placed in 5 minutes chart then don't go for a target of 15 minutes chart
4. if order placed in 15 minutes time frame and target is too far then check the target in 5 minutes time frame
5. if signal candle touches the target then avoid the signal.
6. Money management is most important for this indicator.
7. Take trade only if it satisfy risk reward ratio
Signal
using vwap calculates gann square of 9 levels and if any smart money activity on that level then checks the confirmation of the trend by higherhigh or lowerlow formation
Buy Entry : entry price should be on the high of the candle before signal for buy and sl on bottom of flagged candle just before signal
SellEntry : entry price should be on the lowof the candle before signal for sell and sl on top of flagged candle just before signal
Warning : Don't place any order without stop loss
gannsquareof9chart2This Indicator works on W.D.Gann Square of 9 chart
gann works on SQUARES: ODD and EVEN
HIGH and LOW of this chart will be the " SQUARES "
this chart provides 7 major and 8 minor levels in between the ODD or EVEN Squares .
major levels are colored in blue and white respectively.
minor levels are colored in olive .
better visibility in dark background
change the color of the levels according to your requirement.
Once the HIGH or LOW (or SQUARES) breaks The next ODD or EVEN SQUARES open up ,
As the breakout of Squares happens the chart expands and acquire the new HIGH or LOW.
I have given Three different resolution option user can switch between:
DAILY ; WEEKLY ; MONTHLY .
thankyou
Oasis Group - VWAP / OHLC (Daily / Weekly / Monthly)
5min with the Daily overlay
4hour with the Weekly overly
This Script was influenced be Chris Moody's OHLC Script.
I have created my version of the script and used it to Overlay Daily/Weekly/Monthly Candles over any chosen Intraday Time Frame.
**Important**
The "Stepline" Line style function in pine script is defective so anyone who wants to use this must change all line
styles to "Stepline" manually except for the VWAP Line.
This gives traders a great overall candle experience and also insight into the noise of the intraday.
Intraday traders can keep watch of the highs and Lows along with open and close levels for the larger time frames chosen.
Give us a Follow and Like. This can be used on any Asset class.
I personally use this on Intraday Trading.
Helps me Identify the Prior day Highs and Lows, Closing price compared to the next mornings Opening Price, and daily, weekly, or monthly ranges.
Also included is the powerful VWAP indicator for identifying bullish or bearish pysche.
[HM] VWAP Envelope dinamic intraday v1- VWAP, volume weighted average price;
- Plus Envelope bands:
1) Dinamic, adjusted by volatility:
- - - daily ATR or
- - - daily Standard Deviation
2) or simple fixed % increments bands, defined by user.
# Intraday timeframe only.
# If volume data is absent, the indicator will not work at all.
Hope this could help the community.
DcPi for intraday tradesDcPi stands for dark cloud and piercing , This is a very reliable pattern for intraday trades.
Precondition-
Whenever a big move is followed by gap(up/down) open next day.
Trade Setup-
Wait for price to enter in previous day range.
Aggressive traders can enter trade as soon as price enters previous day range, safe traders can wait for 1st 5 minute candle close, target can be mid of previous day range.
Trailing stoploss is a good way to secure your profits.
How this indicator helps?
Whenever intraday range will be more than 5% move, chart background will turn light blue, one might add stock to watchlist for next day.
if next day is gap open, chart background will be light green, and a textbox will be displayed with entry, stoploss and targets. One might take trades as explained in trade setup.
How it is dark cloud and piercing pattern?
Green candle followed by gap up open next day and closing in previous day range is Dark cloud on daily timeframe.
Red candle followed by gap down open next day and closing in previous day range is piercing pattern on daily timeframe.
Cyatophilum Intraday Breakouts [ALERT SETUP]Private indicator.
Here is the alert version of the Triple Screen Strategy
Recap of the strategy:
The goal of this indicator is to be able to automate and backtest the strategy, all while staying on a single chart and without repainting.
Features:
Market Tide MACD configuration
Market Wave choice between 3 oscillator: Elder Force Index, Stochastic and William Percent Range
Automated Long and Short entries alerts
Integrated Trailing Stop Loss system fully configurable with automated exit alerts
Integrated Trailing Take profit system fully configurable with automated exit alerts
Indicator samples
Backtest version:
Alerts
Entry Long: Triggers on green long labels.
Take Profit Long: Triggers on the "TAKE PROFIT" green flag if the long target is reached.
Stop Loss Long: Triggers on the "STOP LOSS" or "TSSL" label if the stop loss line has been crossed.
Exit Long: Triggers on either of Take Profit Long or Stop loss long.
Entry Short: Triggers on red short labels.
Take Profit Short: Triggers on the "TAKE PROFIT" green flag if the short target is reached.
Stop Loss Short: Triggers on the "STOP LOSS" or "TSSL" label if the stop loss line has been crossed.
Exit Short: Triggers on either of Take Profit Short or Stop Loss Short.
To get access to this indicator use the link below
Thanks for reading!
Cyatophilum Intraday Breakouts [BACKTEST]Private indicator. Access can be unlocked by purchasing a subscription on my website which link is in my profile signature.
Here is the backtest version of the Triple Screen Strategy
Recap of the strategy:
The goal of this indicator is to be able to automate and backtest the strategy, all while staying on a single chart and without repainting.
Features:
Market Tide MACD configuration
Market Wave choice between 3 oscillator: Elder Force Index, Stochastic and William Percent Range
Automated Long and Short entries alerts
Integrated Trailing Stop Loss system fully configurable with automated exit alerts
Integrated Trailing Take profit system fully configurable with automated exit alerts
Indicator samples
Backtest
Strategy time period can be choosen in the parameters of the indicator.
Be aware that the chart is limited to 10 000 candles of the current timeframe for the backtest calculation.
Default initial capital: 10 000$
Default order size: 100% of equity
Default commission fees: 0.1% per transaction
Backtest results below.
Alerts
Entry Long: Triggers on green long labels.
Take Profit Long: Triggers on the "TAKE PROFIT" green flag if the long target is reached.
Stop Loss Long: Triggers on the "STOP LOSS" or "TSSL" label if the stop loss line has been crossed.
Exit Long: Triggers on either of Take Profit Long or Stop loss long.
Entry Short: Triggers on red short labels.
Take Profit Short: Triggers on the "TAKE PROFIT" green flag if the short target is reached.
Stop Loss Short: Triggers on the "STOP LOSS" or "TSSL" label if the stop loss line has been crossed.
Exit Short: Triggers on either of Take Profit Short or Stop Loss Short.
You can get access to this indicator by purchasing a subscription using the link below.
Thanks for reading!
Intraday S/RPlots yesterday's low and high, and the current day's open, as intraday support/resistance levels.
All Instrument Swing Trader with Pyramids, DCA and Leverage
Introduction
This is my most advanced Pine 4 script so far. It combines my range trader algorithms with my trend following pyramids all on a single interval. This script includes my beta tested DCA feature along with simulated leverage and buying power calculations. It has a twin study with several alerts. The features in this script allow you to experiment with different risk strategies and evaluate the approximate impact on your account capital. The script is flexible enough to run on instruments from different markets and at various bar intervals. This strategy can be run in three different modes: long, short and bidirectional. The bidirectional mode has two split modes (Ping Pong and BiDir). It also generates a summary report label with information not available in the TradingView Performance report such as Rate Of Return Standard Deviation and other Sharpe Ratio input values. Notable features include the following:
- Swing Trading Paradigm
- Uni or Bidirectional trading modes
- Calculation presets for Crypto, Stocks and Forex
- Conditional Minimum Profit
- Hard stop loss field
- Two types of DCA (Positive and Negative)
- Discretionary Pyramid levels with threshold adjustment and limiter
- Consecutive loss counter with preset and label
- Reentry loss limiter and trade entry caution fields
- Simulated Leverage and margin call warning label (approximation only)
- Buying power report labels (approximation only)
- Rate Of Return report with input values for Sharpe Ratio, Sortino and others
- Summary report label with real-time status indicators
- Trend follow bias modes (Its still range trading)
- Six anti-chop settings
- Single interval strategy to reduce repaint occurrence
This is a swing trading strategy so the behavior of this script is to buy on weakness and sell on strength. As such trade orders are placed in a counter direction to price pressure. What you will see on the chart is a short position on peaks and a long position on valleys. Just to be clear, the range as well as trends are merely illusions as the chart only receives prices. However, this script attempts to calculate pivot points from the price stream. Rising pivots are shorts and falling pivots are longs. I refer to pivots as a vertex in this script which adds structural components to the chart formation (point, sides and a base). When trading in “Ping Pong” mode long and short positions are intermingled continuously as long as there exists a detectable vertex. Unfortunately, this can work against your backtest profitability on long duration trends where prices continue in a single direction without pullback. I have designed various features in the script to compensate for this event. A well configured script should perform in a range bound market and minimize losses in a trend. For a range trader the trend is most certainly not your friend. I also have a trend following version of this script for those not interested in trading the range.
This script makes use of the TradingView pyramid feature accessible from the properties tab. Additional trades can be placed in the draw-down space increasing the position size and thereby increasing the profit or loss when the position finally closes. Each individual add on trade increases its order size as a multiple of its pyramid level. This makes it easy to comply with NFA FIFO Rule 2-43(b) if the trades are executed here in America. The inputs dialog box contains various settings to adjust where the add on trades show up, under what circumstances and how frequent if at all. Please be advised that pyramiding is an advanced feature and can wipe out your account capital if your not careful. You can use the “Performance Bond Leverage” feature to stress test your account capital with varying pyramid levels during the backtest. Use modest settings with realistic capital until you discover what you think you can handle. See the“Performance Bond Leverage” description for more information.
In addition to pyramiding this script employs DCA which enables users to experiment with loss recovery techniques. This is another advanced feature which can increase the order size on new trades in response to stopped out or winning streak trades. The script keeps track of debt incurred from losing trades. When the debt is recovered the order size returns to the base amount specified in the TV properties tab. The inputs for this feature include a limiter to prevent your account from depleting capital during runaway markets. The main difference between DCA and pyramids is that this implementation of DCA applies to new trades while pyramids affect open positions. DCA is a popular feature in crypto trading but can leave you with large “bags” if your not careful. In other markets, especially margin trading, you’ll need a well funded account and much experience.
To be sure pyramiding and dollar cost averaging is as close to gambling as you can get in respectable trading exchanges. However, if you are looking to compete in a Forex contest or want to add excitement to your trading life style those features could find a place in your strategies. Although your backtest may show spectacular gains don’t expect your live trading account to do the same. Every backtest has some measure to data mining bias. Please remember that.
This script is equipped with a consecutive loss counter. A limit field is provided in the report section of the input dialog box. This is a whole number value that, when specified, will generate a label on the chart when consecutive losses exceed the threshold. Every stop hit beyond this limit will be reported on a version 4 label above the bar where the stop is hit. Use the location of the labels along with the summary report tally to improve the adaptability of system. Don’t simply fit the chart. A good trading system should adapt to ever changing market conditions. On the study version the consecutive loss limit can be used to halt live trading on the broker side (managed manually).
This script can simulate leverage applied to your account capital. Basically, you want to know if the account capital you specified in the properties tab is sufficient to trade this script with the order size, pyramid and DCA parameters needed. TradingView does not halt trading when the account capital is depleted nor do you receive notification of such an event. Input the leverage you intend to trade with and simulate the stress on your account capital. When the check box labeled “Report Margin Call” is enabled a marker will plot on the chart at the location where the threshold was breached. Additionally, the Summary Report will indicated such a breach has occurred during the backtest. Please note that the margin calculation uses a performance bond contract model which is the same type of leverage applied to Forex accounts. This is not the same leverage as stock margin accounts since shares are not actually borrowed. It is also not applicable to futures contracts since we do not calculate maintenance margin. Also note that the account margin and buying power are calculated using the U.S. Dollar as a funding currency. Margin rules across the globe vary considerably so use this feature as an approximation. The “Report Margin Call” plot only appears on negative buying power which is well beyond the NFA enforced margin closeout price. Vary the order size and account capital and activate the buying power plot to get as close as you can to the desired margin call threshold. Also keep in mind that rollover fees, commissions, spreads, etc affect the margin call in actual live trading. This feature does not include any of those costs.
Inputs
The script input dialog box is divided into five sections. The last section, Section 5, contains all of the script reporting options. Notable reporting options are the inputs which provide support for calculating actual Sharpe Ratios and other risk / performance metrics. The TradingView performance report does not produce a scalable Sharpe Ratio which is unfortunate considering the limited data supplied to the backtest. Three report fields made available in this section are intended to enable users to measure the performance of this script using various industry standard risk metrics. In particular, The Sharpe Ratio, Sortino Ratio, Alpha Calculation, Beta Calculation, R-Squared and Monthly Standard Deviation. The following fields are dedicated to this effort:
– ROR Sample Period - Integer number which specifies the rate of return period. This number is a component of the Sharpe Ratio and determines the number of sample periods divisible in the chart data. The number specified here is the length of the period measured in bar intervals. Since the quantity of TradingView historical data is limited this number should reflect the scalar value applied to your Sharpe calculation. When the checkbox “Report Period ROR” is enabled red boxes plot on the dates corresponding to the ROR sample period. The red boxes display information useful in calculating various risk and performance models. Ongoing buying power is included in the period report which is especially useful in assessing the DCA stress on account capital. Important: When the “ROR Sample Period” is specified the script computes the ROR mean value and displays the result in the summary report label on the live end of the chart. Use this number to calculate the historical standard deviation of period returns.
– Return Mean Value - This is the ROR mean value which is displayed in the summary report field “ROR Mean”. Enter the value shown in the summary report here in order to calculate the standard deviation of returns. Once calculated the result is displayed in the summary report field “Standard Dev”. Please note that ROR and standard deviation are calculated on the quote currency of the chart and not the account currency. If you intend to calculate risk metrics based on other denominated returns use the period calculations in a spreadsheet. Important: Do not change the account denomination on the properties tab simply to force a dollar calculation. It will alter the backtest itself since the minimum profit, stop-loss and other variables are always measured in the quote currency of the chart.
– Report Period ROR - This checkbox is used to display the ROR period report which plots a red label above the bars corresponding to the ROR sample period. The sample period is defined by the value entered into the “ROR Sample Period” field. This checkbox only determines if the period labels plot on the chart. It does not enable or disable the ROR calculation itself. Please see input description“ROR Sample Period” for a detailed description of this feature.
Design
This script uses twelve indicators on a single time frame. The original trading algorithms are a port from a much larger program on another trading platform. I’ve converted some of the statistical functions to use standard indicators available on TradingView. The setups make heavy use of the Hull Moving Average in conjunction with EMAs that form the Bill Williams Alligator as described in his book “New Trading Dimensions” Chapter 3. Lag between the Hull and the EMAs form the basis of the entry and exit points. The vertices are calculated using one of five featured indicators. Each indicator is actually a composite of calculations which produce a distinct mean. This mathematical distinction enables the script to be useful on various instruments which belong to entirely different markets. In other words, at least one of these indicators should be able generate pivots on an arbitrarily selected instrument. Try each one to find the best fit.
The entire script is around 2200 lines of Pine code which pushes the limits of what can be created on this platform given the TradingView maximums for: local scopes, run-time duration and compile time. This script incorporates code from both my range trader and trend following published programs. Both have been in development for nearly two years and have been in beta test for the last several months. During the beta test of the range trading script it was discovered that by widening the stop and delaying the entry, add on trading opportunities appeared on the chart. I determined that by sacrificing a few minor features code space could be made available for pyramiding capability in the range trader. The module has been through several refactoring passes and makes extensive use of ternary statements. As such, It takes a full three minutes to compile after adding it to a chart. Please wait for the hovering dots to disappear before attempting to bring up the input dialog box. For the most part the same configuration settings for the range script can be applied to this script.
Inputs to the script use cone centric measurements in effort to avoid exposing adjustments to the various internal indicators. The goal was to keep the inputs relevant to the actual trade entry and exit locations as opposed to a series of MA input values and the like. As a result the strategy exposes over 70 inputs grouped into long or short sections. Inputs are available for the usual minimum profit and stop-loss as well as safeguards, trade frequency, pyramids, DCA, modes, presets, reports and lots of calibrations. The inputs are numerous, I know. Unfortunately, at this time, TradingView does not offer any other method to get data in the script. The usual initialization files such as cnf, cfg, ini, json and xml files are currently unsupported.
I have several example configuration settings that I use for my own trading. They include cryptocurrencies and forex instruments on various time frames.
Indicator Repainting and Anomalies
Indicator repainting is an industry wide problem which mainly occurs when you mix backtest data with real-time data. It doesn't matter which platform you use some form of this condition will manifest itself on your chart over time. The critical aspect being whether live trades on your broker’s account continue to match your TradingView study.
Based on my experience with Pine, most of the problems stem from TradingView’s implementation of multiple interval access. Whereas most platforms provide a separate bar series for each interval requested, the Pine language interleaves higher time frames with the primary chart interval. The problem is exacerbated by allowing a look-ahead parameter to the Security function. The goal of my repaint prevention is simply to ensure that my signal trading bias remains consistent between the strategy, study and broker. That being said this is what I’ve done address this issue in this script:
1. This script uses only 1 time frame. The chart interval.
2. Every entry and exit condition is evaluated on closed bars only.
3. No security functions are called to avoid a look-ahead possibility.
4. Every contributing factor specified in the TradingView wiki regarding this issue has been addressed.
5. Entry and exit setups are not reliant on crossover conditions.
6. I’ve run a 10 minute chart live for a week and compared it to the same chart periodically reloaded. The two charts were highly correlated with no instances of completely opposite real-time signals. I do have to say that there were differences in the location of some trades between the backtest and the study. But, I think mostly those differences are attributable to trading off closed bars in the study and the use of strategy functions in the backtest.
The study does indeed bring up the TV warning dialog. The only reason for this is because the script uses an EMA indicator which according to TradingView is due to “peculiarities of the algorithm”. I use the EMA for the Bill Williams Alligator so there is no way to remove it.
One issue that comes up when comparing the strategy with the study is that the strategy trades show on the chart one bar later than the study. This problem is due to the fact that “strategy.entry()” and “strategy_exit()” do not execute on the same bar called. The study, on the other hand, has no such limitation since there are no position routines.
Please be aware that the data source matters. Cryptocurrency has no central tick repository so each exchange supplies TradingView its feed. Even though it is the same symbol the quality of the data and subsequently the bars that are supplied to the chart varies with the exchange. This script will absolutely produce different results on different data feeds of the same symbol. Be sure to backtest this script on the same data you intend to receive alerts for. Any example settings I share with you will always have the exchange name used to generate the test results.
Usage
The following steps provide a very brief set of instructions that will get you started but will most certainly not produce the best backtest. A trading system that you are willing to risk your hard earned capital will require a well crafted configuration that involves time, expertise and clearly defined goals. As previously mentioned, I have several example configs that I use for my own trading that I can share with you. To get hands on experience in setting up your own symbol from scratch please follow the steps below.
The input dialog box contains over 70 inputs separated into five sections. Each section is identified as such with a makeshift separator input. There are three main areas that must to be configured: long side, short side and settings that apply to both. The rest of the inputs apply to pyramids, DCA, reporting and calibrations. The following steps address these three main areas only. You will need to get your backtest in the black before moving on to the more advanced features.
Step 1. Setup the Base currency and order size in the properties tab.
Step 2. Select the calculation presets in the Instrument Type field.
Step 3. Select “No Trade” in the Trading Mode field.
Step 4. Select the Histogram indicator from Section 2. You will be experimenting with different ones so it doesn’t matter which one you try first.
Step 5. Turn on Show Markers in Section 2.
Step 6. Go to the chart and checkout where the markers show up. Blue is up and red is down. Long trades show up along the red markers and short trades on the blue.
Step 7. Make adjustments to “Base To Vertex” and “Vertex To Base” net change and roc in Section 3. Use these fields to move the markers to where you want trades to be.
Step 8. Try a different indicator from Section 2 and repeat Step 7 until you find the best match for this instrument on this interval. This step is complete when the Vertex settings and indicator combination produce the most favorable results.
Step 9. Go to Section 3 and enable “Apply Red Base To Base Margin”.
Step 10. Go to Section 4 and enable “Apply Blue Base To Base Margin”.
Step 11. Go to Section 2 and adjust “Minimum Base To Base Blue” and “Minimum Base To Base Red”. Observe the chart and note where the markers move relative to each other. Markers further apart will produce less trades but will reduce cutoffs in “Ping Pong” mode.
Step 12. Return to Section 3 and 4 and turn off “Base To Base Margin” which was enabled in steps 9 and 10.
Step 13. Turn off Show Markers in Section 2.
Step 14. Put in your Minimum Profit and Stop Loss in the first section. This is in pips or currency basis points (chart right side scale). Percentage is not currently supported. This is a fixed value minimum profit and stop loss. Also note that the profit is taken as a conditional exit on a market order not a fixed limit. The actual profit taken will almost always be greater than the amount specified (due to the exit condition). The stop loss, on the other hand, is indeed a hard number which is executed by the TradingView broker simulator when the threshold is breached. On the study version, the stop is executed at the close of the bar.
Step 15. Return to step 3 and select a Trading Mode (Long, Short, BiDir, Ping Pong). If you are planning to trade bidirectionally its best to configure long first then short. Combine them with “BiDir” or “Ping Pong” after setting up both sides of the trade individually. The difference between “BiDir” and “Ping Pong” is that “Ping Pong” uses position reversal and can cut off opposing trades less than the specified minimum profit. As a result “Ping Pong” mode produces the greatest number of trades.
Step 16. Take a look at the chart. Trades should be showing along the markers plotted earlier.
Step 17. Make adjustments to the Vertex fields in Section 2 until the TradingView performance report is showing a profit. This includes the “Minimum Base To Base” fields. If a profit cannot be achieved move on to Step 18. Other adjustments may make a crucial difference.
Step 18. Improve the backtest profitability by adjusting the “Entry Net Change” and “Entry ROC” in Section 3 and 4.
Step 19. Enable the “Mandatory Snap” checkbox in Section 3 and 4 and adjust the “Snap Candle Delta” and “Snap Fractal Delta” in Section 2. This should reduce some chop producing unprofitable reversals.
Step 20. Increase the distance between opposing trades by adding an “Interleave Delta” in Sections 3 and 4. This is a floating point value which starts at 0.01 and typically does not exceed 2.0.
Step 21. Increase the distance between opposing trades even further by adding a “Decay Minimum Span” in Sections 3 and 4. This is an absolute value specified in the symbol’s quote currency (right side scale of the chart). This value is similar to the minimum profit and stop loss fields in Section 1.
Step 22. Improve the backtest profitability by adjusting the “Sparse Delta” in Section 3 and 4.
Step 23. Improve the backtest profitability by adjusting the “Chase Delta” in Section 3 and 4.
Step 24. Improve the backtest profitability by adjusting the “Adherence Delta” in Section 3 and 4. This field requires the “Adhere to Rising Trend” checkbox to be enabled.
Step 25. Try each checkbox in Section 3 and 4. See if it improves the backtest profitability. The “Caution Lackluster” checkbox only works when “Caution Mode” is enabled.
Step 26. Enable the reporting conditions in Section 5. Look for long runs of consecutive losses or high debt sequences. These are indications that your trading system cannot withstand sudden changes in market sentiment.
Step 27. Examine the chart and see that trades are being placed in accordance with your desired trading goals. This is an important step. If your desired model requires multiple trades per day then you should be seeing hundreds of trades on the chart. Alternatively, you may be looking to trade fewer steep peaks and deep valleys in which case you should see trades at major turning points. Don’t simply settle for what the backtest serves you. Work your configuration until the system aligns with your desired model. Try changing indicators and even intervals if you cannot reach your simulation goals. Generally speaking, the histogram and Candle indicators produce the most trades. The Macro indicator captures the tallest peaks and valleys.
Step 28. Apply the backtest settings to the study version and perform forward testing.
This script is open for beta testing. After successful beta test it will become a commercial application available by subscription only. I’ve invested quite a lot of time and effort into making this the best possible signal generator for all of the instruments I intend to trade. I certainly welcome any suggestions for improvements. Thank you all in advance.
One final note. I'm not a fan of having the Performance Overview (blue wedge) automatically show up at the end of the publish page since it could be misleading. On the EUR/USD backtest showing here I used a minimum profit of 65 pips, a stop of 120 pips, the candle indicator and a 5 pyramid max value. Also Mark Pyramid Levels (blue triangles) are enabled along with a 720 ROR Sample Period (red labels).
JM Momentum Moving Average CrossoverReuploaded.
Some people complained about noisy signals from previous gainzy inspired intraday indicator so have designed this one to be more robust. Is pretty good at capturing early trend changes in momentum. Have not backtested yet. Recommended for lower time frames, 1 hour and under, I like 45m.
How it works?
____________
Using custom fast and slow momentum factors it is simply a crossover of the two.
How to use?
____________
Wait for closing bar, if BUY signal is printed, momentum is trending upwards so longs are favoured. If SELL signal is printed, shorts are favored.
Normailzed CandleThis indicator normalizes Day's candle with Open. Idea is to see the daily movement in the context of the Open of the Day.
Larry Williams talks about Open being the most important price of the day. Hence, this indicator.
The Green line is average Open-to-High for occurrences of Red days. The Red line is average Open-to-Low for occurrences of Green days.
Average are not perfect calculations since occurrences(of Red or Green) will vary within the time-span used for averages.
These can used to gauge likelihood of the intra-day price reversal. If the price exceeds green/red line, there is higher likelihood of the price closing above/below open.
The blue lines are average Open-to-close for Green and Red occurrences.
Be careful on days where consecutive 3rd Highest High or Lowest Low day is made and also on the next day after such day. Prices may turn direction at least for a short while.
The precursor to this script of the Candle Infopanel script. That script was just numbers in panel and this is a graphical representation. I
Some of the calculations from original script are commented here because it would make visuals clutters (and probably the left-out calculation are not critical to making trade decisions!)
Hide extended hours/non-intraday barsEspecially for future users, such as ES/NQ/RTY/YM, etc., this script can hide the extended hours/non-intraday bars and leave the intraday bars only.
With this script , you can find the intraday support/resistance quite easily!
Example, if you are a ES investor, you can easily find the intraday support/resistance level ,which is almost equal to SPY, with this script, and no need to check SPY separately again , saving your time a lot.
Note: Please couple this script with American Bars. If you use candle charts, the upper/lower pins of the candle can't be hidden with the bars together, which is restricted by the code editor itself...
Price reversal intraday IndicatorIndicator “Price reversal intraday”
Class : oscillator
Trading type : scalping+intraday trading
Time frame : 15-30 min
Purpose : trading on rebounds and reversals
Level of aggressiveness : aggressive
“Price reversal intraday (PRI)” indicator is designed for aggressive intraday trading on rebounds and reversals. It belongs to oscillators. The idea that formed the basis for the creation of “Price reversal intraday (PRI)” is to obtain a synergistic effect from the use of the best oscillatory techniques: modified Bollinger bands and the classic RSI oscillator.
The indicator, using advanced Bollinger technique, monitors the deviation of the current price from the equilibrium value, and then with the help of the RSI oscillator it determines the moment when this deviation reaches a critical point. As a result, a buy or sell signal is generated, which is displayed on the chart in order to facilitate the trading process as much as possible.
Structure of the indicator
Indicator consists of the following elements:
- red zone – indication of a sell zone. Entry into this zone is a signal to close long positions and search for entry points to sell asset;
- red line – extremely high positive deviation of current price from its equilibrium value;
- blue zone - indication of a buy zone. Entry into this zone is a signal to close short positions and search for entry points to buy asset;
- blue line – extremely high negative deviation of current price from its equilibrium value.
Parameters of the indicator
To configure the indicator, the following parameters are provided:
- RSI_period (default value is 8) - period for calculating the RSI oscillator.
- Ranger_period (default value - 21) - period for calculating the modified Bollinger bands.
- Ranger_width (default value - 1) - the parameter used to control the level of aggressiveness of the indicator and frequency of signals. The lower it is, the more signals the indicator will generate. Possible values from 0 to 3.
- ob (the default value is 60) - this parameter defines the overbought zone for the RSI indicator.
- os (the default value is 40) - this parameter defines the oversold zone for the RSI indicator.
Rules of trading
The main task of the trader using indicator is to monitor the location of the current market price relative to the extreme zones (blue/red). Entering the red zone is a signal for closing long positions and searching for sell entry points. Entering the blue zone is a signal for closing short positions and searching for buy entry points.
The appearance of a blue triangle with the inscription “BUY” on the chart is a signal to open buy positions, and a red triangle with the inscription “SELL” is a signal for sale.