BuyTheDipWell, I often had arguments in online forum with a guy who claimed to time the market perfectly without any technical analysis or prior experience. He often claimed that technical analysis does not work and it only works when you trade on other's emotions. He also argued that algorithmic trading isn't profitable - if so, everyone would do that. Hence, I thought I will convert his idea to algorithm.
In his own words, the strategy is as below:
Chose an instrument which is in full uptrend.
Wait for the panic sell and buy the dip
Once market recovers back exit immediately
It seems to do just fine with indexes. But, not so good when it comes to stocks.
Moving Averages
Stock Market Strategy : VWAP, MACD, EMA, Breakout, BBHello there,
Today I bring you a stock market strategy, specialized in NASDAQ stocks.
Its a daytrading strategy, that can only do a max of 1 trade per day. In this case it only trades the first 2 opening hours of the market.
The rules are simple :
We follow the trend based on a big EMA, in this case 200, after that, we check for VWAP direction , then, we check histogram from MACD. This is the simple logic of the strategy.
Inside there is another strategy, that not just do the above, but also uses Bollinger bands, and checks for breakout of bottom or top line. Also it uses Average directional Index, for even a bigger criteria .
So for example a long condition it would be : candle is above the ema, and candle is above vwap, and histogram is positive, and candle break the top bb level and ADI < 40 -> long signal . The opposite works for short(ADI > 20).
In this case all this criterias are between the first 2 hours of market. So we enter between the first hour, and exit in the next hour. For this we need to use very short time frames.
Hope you enjoy it.
Let me know if you have any questions
Moving Average Cross Strategy early Closing This is my example for the Moving Average Cross Strategy with early Closing. You can modify the strategy for your individual setup and market.
I tested the strategy in DAX30 and SP55
Bitlinc MARSI Study AST w/ Take Profit & Stop loss - beta 0.1This script is beta 0.1 - will update as soon as the script is tradable
This script is based on AST on a 10 minute timeframe. You can change the asset and the timeframe for any asset you want to trade, but for it to work correct ALL settings have to be testes in the Strategy section of the TradingView. Each assets and timeframe require a different mixture of settings. This is NOT a one settings fits all trading for all assets on any timeframe. Below are the settings and explanation on how it works.
How it fires a buy / sell:
The script will plot an RSI with upper and lower bands in a separate indicator window. The idea behind this script is to fire a LONG when MA crosses OVER lower band and fire a SHORT when the MA crosses under the lower band. Each order that fires is an OCO (Order Cancels Order) for pyramiding.
Settings:
You have full control of these settings as mentioned above, you must configure every part of this script for each asset and timeframe you trade.
- Length of MA
- Length
- Upper bands of RSI
- Lower bands of RSI
- Take profit percentage
- Stop loss percentage
- Month to start and end the strategy (within 2020)
- Day to start and end the strategy (within 2020)
- Quantity type
- Slippage
- Pyramiding
***Remember that after the signal to enter or exit a trade is fired, the alert will trigger AFTER the close of the candle that caused the tigger to fire
London breakout GBPUSD daytradeHello,
First I want to WARN THAT YOU NEED A MINIMUM OF 30X LEVERAGE FOR THIS STRATEGY IN ORDER TO WORK.
THE REASON IS THAT THE SIZE IS CALCULATED BASED ON A VERY SHORT STOP LOSS LEVEL IN PIPS
UTILIZE IT AT YOUR OWN RISK
This is a daytrading strategy, that's suited for GBPUSD 1H timechart.
It a very simple strategy that utilizes 2 moving averages : a very fast one and a very slow one.
It will always enter only at the beginning candle of London session, and it will always exit at the candle at the finish of London session.
So the rules are simple :
If its 8 am GMT and the candle close or high cross the slow moving average and we are above at the same over the slow moving average we make a long movement. The oposite condition is applied for short.
At the same time we always use a very small stop loss = 50-100 points ( 5-10 pips).
We dont have a take profit, in our case the trade ends always at the end of London session. In this case at 15h GMT
It might work on other currencies aswell, but it has to be tested first.
For any questions or suggestions, please let me know.
Y-Profit Maximizer Strategy with Exit PointsThis script based on KivancOzbilgic 's PMax indicator. I modified a bit. Added Filters, Exit (TP) Levels and few indicator in it. This script opening only Long Positions.
I have used this indicators in this strategy:
-Moving Stop Loss (Most) by ceyhun
-PMax Explorer STRATEGY & SCREENER
-Bollinger Bands on Macd
-Tillson T3 Moving Average by KIVANÇ fr3762
I am open to suggestions for improve this script.
PS: Script is in Turkish Language.
BB21_MA200_StrategyThis strategy follows the trend and keeps you in the trend until it breaks SMA 200
SMA setting is 200
BB setting is 21
BUY
====
when BB is (lower band and upper band) above SMA 200 and price crossing above BB middle line
Partial Exit
==========
When Lower BB crossing down SMA200 , exit 30%
Total Exit
=========
When BB middle band crosses down SMA200 , exit ALL
Stop Loss
======
default is set to 5%
Risk Management
================
This is new parameter I have introduced in my strategies. Default value is 10% . That means , if your capital is 10000 , you are willing to risk 10% of it ... i.e 1000.
It doesnot mean that you are buying shares/units for 1000 only. It is different ...see below
Your trade size is calculated based on Risk% .... capital x risk 5 / stop Loss units
for further explanation you can check Alexander Elder's risk management rule. He mentioned 2% rule for 100K account. But most of us dont have 100K accounts .. . so I have defaulted 10% on 10K account. You can change this values and see the results. It wont change the number of trades or profit factor. It will increase the net profit.
Warning
=======
For educational purposes only
Low volatility Buy w/ TP & SL (Coinrule)The compression of volatility usually leads to expansion. When the breakout comes, it can ignite strong trends. One way to catch a coin trading in an accumulation area is to spot three moving averages with values close to each other. The strategy uses a combination of Moving Averages to spot the best time to buy a coin before its breakout.
Buy Condition
The MA200 is greater than the MA100
The MA50 is greater than the MA100
According to backtesting results, the 1-hour time frame is the best to run this strategy.
Sell Condition
Take Profit: the price increases 8% from the entry price
Stop Loss: the price drops 4% from the entry price
The strategy has a profitability of 40-60% (depending on the market conditions). Having a ratio of two between Take profit and Stop Loss helps keeping the strategy profitable in the long term.
MACD,RSI & EMA strategy with MA+PSAR by MAMMACD,RSI & EMA strategy with MA+PSAR
Buy strategy
- MACD above signal
- RSI above RSI signal
- Close price above EMA
Sell Strategy
- MACD below signal
- RSI below RSI signal
- Close price below EMA
Moving Average, T3 and Bollinger StrategyThis strategy uses a SMA much like an the faster EMA in many oscillators and the T3 average of the same period as the intermediate trend. Exits are defined by encounters with the Bollinger Band. The long term trend is defined by T3 moving averages of an even longer period.
Triple EMA Scalper low lag stratHi all,
This strategy is based on the Amazing scalper for majors with risk management by SoftKill21
The change is in lines 11-20 where the sma's are replaced with Triple ema's to
lower the lag.
The original author is SoftKill21. His explanation is repeated below:
Best suited for 1M time frame and majors currency pairs.
Note that I tried it at 3M time frame.
Its made of :
Ema ( exponential moving average ) , long period 25
Ema ( exponential moving average ) Predictive, long period 50,
Ema ( exponential moving average ) Predictive, long period 100
Risk management , risking % of equity per trade using stop loss and take profits levels.
Long Entry:
When the Ema 25 cross up through the 50 Ema and 100 EMA . and we are in london or new york session( very important the session, imagine if we have only american or european currencies, its best to test it)
Short Entry:
When the Ema 25 cross down through the 50 Ema and 100 EMA , and we are in london or new york session( very important the session, imagine if we have only american or european currencies, its best to test it)
Exit:
TargetPrice: 5-10 pips
Stop loss: 9-12 pips
Money maker EURUSD 15min daytraderVERY IMPORTANT : THIS STRATEGY WAS MADE WITH LEVERAGE IN MIND
You need atleast 20X LEVERAGE ACCOUNT IN ORDER TO WORK PROPERLY.
With high rewards come high risk .
If you dont want to use leverage, use a risk % of less than 0.25 %.
The below example is without use of leverage on a capital 100.000 risking only 0.25% on each trade
This is a breakout strategy, initially made for EURUSD 15 min for London session.
Its made of 4 SMMA and 1 EMA
Rules for entry are simple :
For buy if our current closed candle is above all moving averages, and they are in ascending order ( 3 > 6 > 9 .... ) and we are in the London session we enter.
For sell the same, but in reverse. If closed candle is below all moving averages and they are in descending order ( 3< 6 < 9 .....) and we are in the London session.
We have a risk manangement with TP/SL.
For exit its either if we reach a tp/sl level, or we reach London finish time.
It also has a risk management, calculating the size based on the pips for SL and our current balance.
For any questions , let me know.
Aroon Oscillator StrategyThis is simple strategy based on Aroon Oscillator. I have found that using length 144 or 169 on hourly chart shows excellent results.
Tested on SPY , QQQ and AAPL. Especially when you look at AAPL results , it has 60% profitable in recent trades. ( Dont assume this will be same for other stocks or ETFs)
Aroon Oscillator setting : 169 ( 169 is square root of 13 ... you can also use fib level 144 , which is square root of 12 )
BUY
When Aroon Oscillator crosses above zero line
Add
if Long position is already opened, and current close is less than BUY price and RSI 13 crossing above 30 line
Exit
when Aroon Oscialltor crosses below zero line
Stop Loss
default stop loss has been set to 5%
Note: I have not plotted RSI to the chart. Please include RSI 13 to see how position gets added ... Also add ema 169 to see how the price is aligned with the Aroon Oscillator
Warning
For the educational purposes only
Cross impro test by Canundo Crossover Crossunder Tick valuesThis is a script where I tried to check the following things:
Even thought the tick of an asset is, for example 0.5, there are calculated prices, like SMA's that have even more decimals. Leading to crosses happening that for example happen at the same price. Consequently triggering totally useless in side markets. What happens if SMA values are restricted to the tick resolution? (Option works on it's own or with a combination of the others.)
What happens if I set my own tick value, like 0.8 instead of 0.5, what will be the effect for calculated values that are used for crossings? Will tick sizes improve the success rate? (This option will work only when the first option is active.)
Can success rate, especially for sideway markets be improved when adding a spread between MA's, so that it triggers less in sideway markets? (Option works on it's own or with a combination of the others.)
First of all, I had a hard time to round prices properly when it needs to be dynamic and working for different assets with different amounts of decimal values in the tick. The solution is that abs(floor(syminfo.mintick)) will give you the amount of decimals a tick has. It works for all ticks that are at least lower than 10. I'm not sure how huge ticks are out there. I did not implement this solution at the end since I found another way to test it.
Findings:
The first option, when activated, takes out half the trades and raises the percent profitability by 8% so there is some effect. However, all of the tested options have less advantage than I hoped for but are nevertheless something worthy for sideway markets. The first option just forces the MA's from the example to use the tick resolution.
See these two images. One when the first option is off, the second when it's active.
The lines are the MA's with adjusted values, the crosses are the places of the MA's when left as is.
Here a screenshot of the third option set to the value 2 on the 1 minute XBTUSD chart.
The advantage is that less trades trigger that have a low change in price and so less trading fees will happen.
The disadvantage is that all options can implement some delay for a crossing since the crossing will trigger once a slightly bigger move into the direction was taken.
This test environment was not meant to be profitable but to test the effects.
Maybe someone finds it interesting or wanted to test the same, so here you can save some work.
TrendMaAlignmentStrategy - Long term tradesThis is another strategy based on moving average alignment and HighLow periods. This is more suitable for long term trend traders and mainly for stocks.
Candle is colored lime if : Lookback Period has at least one bar with moving averages fully aligned OR None of the bars in Lookback periods has negatively aligned moving averages (More than half are positively aligned).
Candle is colored orange if : Lookback Period has at least one bar with moving averages fully aligned in negative way OR none of the bars in lookback has positively aligned moving averages (More than half are negatively aligned).
If either of above conditions are met, candle is colored silver.
Moving average alignment parameters:
Moving Average Type : MA Type for calculating Aligned Moving Average Index
Lookback Period : Lookback period to check highest and lowest Moving Average index.
HighLow parameters:
Short High/Low Period: Short period to check highs and lows
Long High/Low Period: Longer Period to check highs and lows.
If short period high == long period high, which means, instrument has made new high in the short period.
ATR Parameters:
ATR Length: ATR periods
StopMultiplyer: To set stop loss.
ReentryStopMultiplyer: This is used when signal is green buy stop loss on previous trade is hit. In such cases, new order will not be placed until it has certain distance from stop line.
Trade Prameters:
Exit on Signal : To be used with caution. Enabling it will allow us to get out on bad trades early and helps exit trades in long consolidation periods. But, this may also cause early exit in the trend. If instrument is trending nicely, it is better to keep this setting unchecked.
Trade direction : Default is long only. Short trades are not so successful in backtest. Use it with caution.
Backtest years : limit backtesting to certain years.
Part of the logic used from study's below:
Other strategies based on these two studies are below (which are meant for short - medium terms):
[Strategy] Simple Golden CrossSimple Golden Cross Strategy.
Works best on a daily chart on "Blue Chip" cryptos such as BTC, ETH, and LTC.
Entry Signal:
-50 day moving average crosses over the 100 day moving average.
Exit Signal:
-50 day moving average crosses under the 100 day moving average.
-Daily candle closes under the 100 day moving average (support).
-100 day moving average crosses under the 200 day moving average.
Easy System 420In this strategy, 15 indicators are used, each giving its results as a numerical value, which then is added or subtracted from the total points, gathered from all 15 indicators.
Many thanks to RafaelZioni for his great work making the EasySys1 script which i modified to create this script.
Onchart is drawn some of the indicators, but not all, a info panel is drawn showing the value each indicator has calculated. The info panel can be turned on or off.
Many of the indicator settings can be changed by user, and this is recommended, to tune the strategy to users chosen pair/timeframe.
Therefore any pair or timeframe can be used, the strategy tester results showing possible results, remember to set commission to match your broker. example chart settings here have common crypto exchange commission value: 0.25%
indicator list : SAR + STT + ZigZag + ROC + DMI + CCI + Weis + SMA + AO + MOM + Hist + BB + Ichimoku + HMA
Profit Maximizer StrategyFirst I would like to thank to @KivancOzbilgic for developing this indicator.
All the credit goes to him.
I just created a strategy, in order to try to find the perfect parameters, timeframe and currency for it.
I will provide below the same description like he has in the publish of profit maximizer
Profit Maximizer - PMax combines the powerful sides of MOST (Moving Average Trend Changer) and SuperTrend (ATR price detection) in one indicator.
Backtest and optimization results of PMax are far better when compared to its ancestors MOST and SuperTrend. It reduces the number of false signals in sideways and give more reliable trade signals.
PMax is easy to determine the trend and can be used in any type of markets and instruments. It does not repaint.
The first parameter in the PMax indicator set by the three parameters is the period/length of ATR.
The second Parameter is the Multiplier of ATR which would be useful to set the value of distance from the built in Moving Average.
I personally think the most important parameter is the Moving Average Length and type.
PMax will be much sensitive to trend movements if Moving Average Length is smaller. And vice versa, will be less sensitive when it is longer.
As the period increases it will become less sensitive to little trends and price actions.
In this way, your choice of period, will be closely related to which of the sort of trends you are interested in.
We are under the effect of the uptrend in cases where the Moving Average is above PMax;
conversely under the influence of a downward trend, when the Moving Average is below PMax.
Built in Moving Average type defaultly set as EMA but users can choose from 8 different Moving Average types like:
SMA : Simple Moving Average
EMA : Exponential Movin Average
WMA : Weighted Moving Average
TMA : Triangular Moving Average
VAR : Variable Index Dynamic Moving Average aka VIDYA
WWMA : Welles Wilder's Moving Average
ZLEMA : Zero Lag Exponential Moving Average
TSF : True Strength Force
Tip: In sideways VAR would be a good choice
You can use PMax default alarms and Buy Sell signals like:
1-
BUY when Moving Average crosses above PMax
SELL when Moving Average crosses under PMax
2-
BUY when prices jumps over PMax line.
SELL when prices go under PMax line.
Inferential Statistics And Quick Metrics For Strategy Analysis.Part of this script is used to calculate inferential statistics and metrics not available through the built in variables in the strategy tester.
A label will be created on the last bar displaying important strategy results, so you can test and analyze strategies quicker.
The built in strategy itself is just an example. You can copy and paste the metrics into any existing version 4 strategy and instantly use it**
**Just be sure all the variable names are unique in your target script.
I am looking for critique and would appreciate input on the statistical functions. I am aware that some of these functions are based on the assumption that the data is normally distributed. It's not meant to be perfect, but it is meant to be helpful. So if you think I can add or improve something to make it more helpful, let me know.
AlignedMA and Cumulative HighLow Strategy V2Based on earlier strategy published - AlignedMA and Cumulative HighLow Strategy. Adjustments are done in entry and exit criteria to make it work for shares.
Modified to preserve existing entry criteria + additional MA shift condition. Exit criteria is set based on supertrend and trailing stops.
Most of the parameters are already optimized. You only need to alter SupertrendMult for individual shares based on individual share volatility. Usually works within 2-4.
There might be bit of repainting. I am unable to understand if there is any. Any suggestions on further improvements welcome :)
Note to moderators : I have used 1000 as initial capital with 100% on each trade. As strategy does not compound - I believe this is reasonable. I have kept this setting as this makes it easier to compare with buy and hold return.
Higher High / Lower Low StrategyThis is a very simple trend following strategy for Day Trading. The premise is to follow the Moving Average for the trend direction and buy/sell the dips and blips in the trend.
1. In an uptrend, when the candle action offers a "dip", or a lower high, the strategy will then buy on the close of the candle that breaks the high of the previous candle.
2. In a downtrend, when the candle action offers a"blip", or a higher low, the strategy will then sell on the close of the candle that breaks the low of the previous candle.
3. The strategy will go Long only or Short only, not both. It must be manually reversed in the settings when a new trend is established.
4. The start month and year allow you to backtest from then until now. It's not one month at a time.
5. The strategy uses a reversal of the Stochastic %K variable as the exist. The setting for Period K controls the exit for backtesting purposes.
6. The strategy uses a moving average to determine the trend. The setting for the Period MA controls the SMA.
7. The strategy has the option of filtering the number of trades based on the direction of the MACD and/or the Signal line. This can either reduce or increase the probability, and is highly dependent on the price action of the instrument.
WARNING: I am not a licensed financial advisor. This script is intended for entertainment purposes only. I highly recommend you manually enter and exit positions per your own Trading Rules, and do not blindly follow any software or recommendation. Use of this script is elective and at your own discretion, and risk.
If you like this script, please give it a Thumb's Up, and leave a comment. If you would like any custom scripts developed, contact me to discuss it. All of my work here is open and available, free of charge. It can be copied and edited to suit your needs.
Custom Triple Moving Average Strategy | Auto BacktestingCreate your own MA Strategy set of up to three moving averages!
Auto Backtesting.
Cloud between MA1 and MA2.
Many different MA types to choose from.
Totally Custom!
Happy Trading, and algorithm analysis!
AlignedMA and Cumulative HighLow StrategyCombining the indicators:
1. Aligned Moving Average Index :
2. Cumulative High Low Index :
3. Supertrend
Works best in long only for crypto and precious metals.
My scenario is to present how much you can earn by investing 1000 for full 10 years. Hence, I am using fixed 1000 initial deposit and 100% equity per trade without any pyramiding. This allows us to compare gains to buy and hold.