Simple EMA Long Only StrategySimple EMA long only strategy, using ATR on crossings to minimize fake signals.
Moving Averages
Scripting Tutorial 9 - TManyMA Strategy - Long Market Order OnlyThis script is for a triple moving average strategy where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked to my profile.
- Ribbons added and on by default. Optional setting to disable the ribbons. 5 ribbons between MA1 and MA2 and another 5 between MA2 and MA3.
- Ribbons are alpha-color coded based on their relation to their default MAs.
- Ribbons are only visible between MAs if the MAs being compared share the same Type, Resolution, and Source because there is no way to consolidate those three in a simple manner.
- Ribbon values are calculated based on calculated MA Periods between the MAs.
- Converted the existing study into a strategy
- Strategy only enters long positions with a market order when MA crossovers occur
- Strategy exits positions when crossunders occur
- Trades 100% of the equity with one order/position by default
- Ability to disable trading certain crosses with input checks
This script is meant as an educational script with well-formatted styling, and references for specific functions.
*** PLEASE NOTE - THIS STRATEGY IS MEANT FOR LEARNING PURPOSES. DEPENDING ON IT'S CONFIGURATION IT MAY OR MAY NOT BE USEFUL FOR ACTUAL TRADING. THE STRATEGY IS NOT FINANCIAL ADVICE ***
Balance of Power StrategyA simple variation on the balance of power idea, using a weighted moving average and a basic lookback to attempt to predict the motion in the next tick.
As far as a trading pattern goes, it's performance is rather conservative, and it is rather noisy as it doesn't do a good job of preventing quick, meaningless trades.
BTCBOT2Watches 3 Symbols with separate timeframe control, with Hull Moving Average crossovers on each, DXY XAU/USD BTC/USD
and a daily candle crossover. With StopLoss and Target Price and Backtesting history selection control. Entry and Exit rules visible in script (script open)
So if DXY chart is going down and Gold chart going up and Bitcoin chart going up then it will enter a buy, yes it is watching more than just bitcoin itself.
it needs HMA to match on all 3 charts and with selected timeframes, the timeframe of users chart, the timeframe in settings for the HMA's on the symbols. Also a Daily Candle chart of the users selected chart (symbol)
Combo Backtest 123 Reversal & EMA & Volume WeightingThis 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 article is copyrighted material from Stocks & Commodities 2009 Oct
WARNING:
- For purpose educate only
- This script to change bars colors.
Combo Backtest 123 Reversal & DMI & Moving Average 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 article is copyrighted material from Stocks & Commodities Aug 2009
WARNING:
- For purpose educate only
- This script to change bars colors.
Simple 17 BF 🚀A Simple Moving Average of period 17 based on ohlc4 values. We go long when price closes above it. We go short when price closes below it. No stop loss. No take profit.
This strategy is really to showcase how effective a basic system can be, and that with discipline and patience, trading does not need to be complex to yield good results over time.
You can change the Moving Average type, source and period in the settings as well as the backtesting range. I found 17 period SMA with ohlc4 to be a good fit for XBT/USD on Daily timeframe but for other pairs, the type, source and period will likely differ.
INSTRUCTIONS
Red turns to Green = Long Entry/Short Exit
Green turns to Red = Short Entry/Long Exit
The entries are based on when price crosses the MA and this is what the backtest is based on. We exit the current trade when we get an opposing signal and enter the new trade.
Easy to Use 50/100/200 Day Moving Average StrategyWhenever you see someone publish a chart or idea, what's the one thing you almost always see? Moving Averages!
Many investors focus on these indictors solely as entry and exit points, so here's an easy to manipulate strategy to backtest and see if this is feasible on your security.
CODE VARIABLES
LINE 2 - Here you can change your currency and amount you want to invest on each entry.
LINE 8/9/10 - Here we establish the 50 (Fast), 100 (Medium) and 200 (Slow) day variables. These can be adjusted to your choosing.
LINE 13/14/15 - Here we establish what date we want to start backtesting from. Simple change the defval on each line to change the date (In the code below we start on Jan 1st, 2010).
LINE 20/23 - Here, within the crossover and crossunder functions, we set which MA's must cross to enter and exit a trade. Below we have the 50 day moving above and under the 200 day. Simple change the variables to FastMA, MediumMA and SlowMA to your choosing.
NOTE: As a beginner you may not want to short stock, therefore LINE 5 was added to only allow long positions.
Hope this helps, from one beginner to another.
Cheers!
Kase Dev Stops Backtest The Kase Dev Stops system finds the optimal statistical balance between letting profits run,
while cutting losses. Kase DevStop seeks an ideal stop level by accounting for volatility (risk),
the variance in volatility (the change in volatility from bar to bar), and volatility skew
(the propensity for volatility to occasionally spike incorrectly).
Kase Dev Stops are set at points at which there is an increasing probability of reversal against
the trend being statistically significant based on the log normal shape of the range curve.
Setting stops will help you take as much risk as necessary to stay in a good position, but not more.
WARNING:
- For purpose educate only
- This script to change bars colors.
Robot WhiteBox StopMALines
Blue line = SMA = simple moving average
Lime line = SMA percentage selected by the user
Red line = SMA - percentage selected by user
Stop orders
The strategy uses market stop orders. For a backtest, you need to set a fee of the order maker.
Strategy
Reversible system.
If a price is greater than a lime line, open a long position (and close a short position)
If a price is less than a red line, open a short position (and close a long position)
Strategy based on the principles of Price ActionIt is considered the percentage of candles with low and high closure for a certain period. Then, a moving average is built from these values. When the moving average of the ratio of tall candles to low candles is greater than the ratio of low candles to high, then long (that is, when the green line crosses the red). And vice versa - a condition for short. It also works on crypto with other settings. Idea for improvement: you can make partial exit by taking, at certain profit levels, the chart will be more stable. Result with a commission of 0.004% You can create an optimizer, and use this strategy on any liquid asset. (Sorry for google translator)
PtahX EMA/ATR StrategyPtahX EMA/ATR Strategy Public Release
written October 2019
EMA Strategy with ATR & "Fear Factor" built in
* modifications welcome
* please let me know if you improve it so I can continue to learn :)
* use at your own risk - I'm a new programmer and still learning
* Best of luck on your trades!!
// Take Profit (TP) option based on ATR or MA Crossover
SSL Channel BFSSL Channel Close is a great all-rounder based on 2 Simple Moving Averages, one of recent Highs, one of recent Lows.
The calculation prints a channel on the chart consisting of 2 lines.
This strategy gives a Long signal when price closes above the top of these 2 lines and a Short signal when it closes below the bottom.
Trading in choppy sideways markets can compound losses so we avoid that here by using recent ATR to determine relative volatility and refrain from trading when the background is White.
We use a basic 3% stop loss.
Charted on XBT/USD Bitmex Daily chart.
INSTRUCTIONS
Green = long
Red = short
White Background= No trade
The way I have set this strategy up is that if we get stopped out but we are still in a green or red background, we re-enter. Closing the trade only occurs on an opposing signal or if we get stopped out.
EMA X BF 🚀EMA Crossover Strategy
A simple EMA cross is a useful indication of a change in direction of a trend and is a very popular tool in trading. It can also be useful to judge price action momentum or severity by looking at the angle of the 2 EMAs, or the distance between them.
There are 2 Exponential Moving Averages, one fast and one slow. When the fast EMA crosses above the slow EMA, this can be considered bullish and may signal an upside move. Conversely, a cross to the downside of the fast EMA under the slow EMA can be considered bearish.
This strategy uses the same principle but uses different sources for the 2 EMAs; instead of using close values, we use ohlc4 values for the fast EMA and hlc3 values for the slow EMA.
The idea is that a trader might enter a long position upon a cross up and reverse position and go short upon the next cross down.
We use a simple 6% stop loss for both long and short positions.
This strategy is tuned to a 6hr chart for Bitcoin USD pairs.
INSTRUCTIONS
Go Long when the background is green
Go short when the background is red
White background means sideways market: a no trade zone
Renko Strategy with Ema against price crossover/underRenko Strategy with Ema against price crossover/under
Open Close Cross Strategy NoRepaint Version by JustUncleLThis is a Non Repaint version of my ever popular "Open Close Cross Strategy R5 revised by JustUncleL". After many comments/PMs on repainting issues of the original script, I decided to create this Non Repaint version for those that require non-repainting signals. Backtesting performance will not be as good as the repaint version, but some script maybe still useful as there are many options that can be adjusted.
Trend Angle BFThanks to Duyck for the idea for this code, and for the code itself. Also thanks to Everget, KyJ and kiasaki for code used in the calculations.
The indicator measures Moving average angles and generates a long or short signal based on the slope.
The chart used to optimise the current settings is XBT/USD on Bitmex 8hr.
You can change the MA length and stop loss, take profit params in the settings.
Green = long, red = short, white = no trade!
MA X 200 BFGo long when the price closes above the 200 SMA.
Go short when the price crosses under the 200 SMA.
Keep it simple.