Linear Cross Trading Strategy The Linear Cross trading strategy is a technical analysis strategy that uses linear regression to predict the future price of a stock. The strategy is based on the following principles: The price of a stock tends to follow a linear trend over time. The slope of the linear trend can be used to predict the future price of the...
The Advanced Trend Detection Strategy is a sophisticated trading algorithm based on the indicator "Percent Levels From Previous Close". This strategy is based on calculating the Pearson's correlation coefficient of logarithmic-scale linear regression channels across a range of lengths from 50 to 1000. It then selects the highest value to determine the length for...
This strategy uses the MACD indicator to determine buy and sell signals. In addition, the strategy employs the use of "TrueLevel Bands," which are essentially envelope bands that are calculated based on the linear regression and standard deviation of the price data over various lengths. The TrueLevel Bands are calculated for 14 different lengths and are plotted on...
This strategy is a momentum-based strategy that uses the Relative Strength Index (RSI) indicator and a TrueLevel envelope to generate trade signals. The strategy uses user-defined input parameters to calculate TrueLevel envelopes for 14 different lengths. The TrueLevel envelope is a volatility-based technical indicator that consists of upper and lower bands. The...
Pairs trading using hedge ratio. Firstly, it calculates hedge ration using OLS linear regression. Then it calculates spread and z-score of spread. if spread in specific range (which it's possible to change in settings) it makes Long/Short orders. The very basic script.
This is combination of multiple indicators and strategies. Mainly useful for indexes and to time the entry and exits of indexes. No stoploss used - makes it less desirable for leveraged trades or trading individual stocks. Let us rewind and look back at some of the indicators/strategies published earlier. 1. Moving Average Candles - this is one of my favourite...
This idea came up while discussing about strategies with one of the trading enthusiast from tradingview community. Strategy basically uses existing script of Vix Fix by Chris Moody: VixFix is a great indicator for finding the market bottoms. But, sometimes it generates signal too early. But, we can apply linear regression on vix fix to find vix fix top to make...
Following the introduction of the Moving Regression Prediction Bands indicator (see link below), I'd like to propose how to utilize it in a simple band breakout strategy : Go long after the candle closes above the upper band . The lower band (alternatively, the lower band minus the 14-period ATR or the central line ) will serve as a support line . ...
For my first foray into pine script I took the code from the generic "Consecutive up/down" and flipped the logic. I added a linear regression filter to try and stay with the overall trend. ATR added for visual, I eventually want to use it as part of the money management. Rules to open trade or close the opposite: IF the linear regression slope is >=0 AND the...
To be clear I'm using the code from Richard Santos for the functional polynomial regression. I really loved his script idea (given that I'm into linear regression myself). I took his code and made a strategy which applies to bitcoin on the 5 minute chart (but you could adjust this for any asset), and you could make this work on anytime frame by adjusting the...
script serves as an example how we can close trades at end of day. can be session controlled or the time controlled. the session should be adjusted to be earlier than the candle time.
Pair trade for crypto with inputs: * length of correlation and moving average * trade pair * spread threshold to enter long / short * spread threshold to exit long / short
Pair trade with inputs: * length of correlation and moving average * trade pair * spread threshold to enter long / short * spread threshold to exit long / short
This script takes advantage of the Pearson's R attribute of the data set you provide. Pearson's R attempts to find how correlated data is with a potential pattern. If the number is negative the correlation is upwards . If it's positive the correlation is downwards . Pearson's R can only be a number between -1 and 1. It should be impossible to ever...
Thanks to HPotter for the code I based this strategy on. Center of Gravity calculation is based here on a linear regression function using the least squares method. We use this to calculate a channel consisting of 2 lines, green and red on the chart This strategy employs a dynamic stop loss function that measures stop loss placement based on recent ATR. How...
SniperTrading permite detectar los momentos exactos de compra y venta obteniendo un buen rendimiento. Como aplicarlo: * Realice una compra cuando el indicador de COMPRA aparezca en la pantalla. * Realice una venta cuando el indicador de VENTA aparezca en la pantalla.
A Strategy with Backtest and Trailing Stop for Long/Short Credits: Study by RafaelZioni - Thanks buddy!