Low-High-Trend StrategyWhen asked what the key to successful investing was, Warren Buffet famously said “buy low, sell high.” Was he onto something? Today I am sharing with the community a simple “buy low, sell high” strategy with an optional trend filter and take-profit target. I’ve found that this strategy works well in a variety of markets but has a higher tendency to out-perform buy & hold in markets that are ranging sideways.
How it works:
The strategy tracks the highest and lowest price over the last X number of bars (you select the look-back period). The highest price line is plotted in green and the lowest price line is potted in red. If the price crosses over the lowest price in the last X number of bars, then a buy signal is generated. Exit options include a take-profit % or selling when the price crosses over the highest price in the last X amount of bars. I.e. “Buy low, sell high.” An EMA is also plotted as a blue trend line, and there is an option to only trade if the price is above the EMA trend line.
Disclaimer: Open source scripts I publish in the community are largely meant to spark ideas that can be used as building blocks for part of a more robust trade management strategy. Even though this example script beats buy and hold over the back-test time-frame, I wouldn't advise using it as a stand-alone strategy without significant additions/modifications to the strategy and risk management functions. In this example the script is being used as a medium-term strategy with just 10% leverage over account equity, a $25k start balance, and back-testing 10+ years. Modifiable slippage and commissions are included in the model.
Green line = Highest price in the look-back period
Red line = Lowest price in the look-back period
Blue line = EMA Trend
Moving Averages
RSI & SMA Strategy By DenizIntroduction
It has always been a major challenge to detect the current market price in technical analysis . There are some basic but strong indicators that help us to estimate the next market action. Relative Strength Index and Simple Moving Average indicators were used in this strategy.
This strategy aims to detect the next market action with different calculations & usages of RSI and SMA indicators.
Strategy Features
As per the result of the calculation from RSI and SMA outputs the strategy will decide to go "Long" or "Short" if the directions are changed from long to short the trade will be closed and it's opening new trade as per to the new direction.
Apart from basic "take profit" and "stop" options there is an additional closing trade option named "Long/Short Bar Count". If the trade could not reach the target in a certain period, it will look for a quit with a 0 loss.
Advantages
Informative alarm messages.
High ratio of Profitable trade numbers.
Disadvantages
Less trade count.
UT Bot v5This is an update by request, on someone elses strategy! well more of an edit, but also update from pine v4 to pine v5.
//CREDITS to HPotter for the orginal code. The guy trying to sell this as his own is a scammer lol.
//Edited and converted to @version=5 by SeaSide420 for Paperina
The UT Bot v5 is Movinging average (the MA) vs ATR (the ATR is in the form intended for use as trailing stop loss (ATR_TSL))
Entry logic:
buy = the MA > ATR_TSL and Price > ATR_TSL
sell = the MA < ATR_TSL and Price < ATR_TSL
The Moving average type can be changed in the settings:
options = "SMA", "EMA", "WMA", "HMA"]
the edits i made were:
convert to v5
Add TP and SL
Add Buy only or Sell only option
Add MA type option
Add price source option
Draw MA and ATR_TSL on-chart
RSI multitimeframe SMA crossoverStrategy based on the multi timeframe equally weighted RSI moving averages turned into single average and then cross of the 2 combined outputs, seems to be promising, default settings work good on 5m chart(better entry) but very filtered trade amount. If you want to use it on different timeframes be my guest and mess with adjustments, pretty much every aspect of strategy is adjustable, idea is same. If somebody liked the idea and able to improve it - share with me :)
(Short) EMA200+Parabolic SAR+MACD+TP&SL By Nussara (strategy)This indicator is backtest of “ (Short) EMA 200 + Parabolic SAR + MACD + Take Profit and Stop Loss”
You can simulate trading by setting your own funds and trading fees. And you can adjust various parameter settings to get the results you want.
Exponential Moving Average
Moving averages smooth the price data to form a trend following indicator. They do not predict price direction, but rather define the current direction, though they lag due to being based on past prices. Despite this, moving averages help smooth price action and filter out the noise.
EMA=Price(t)×k+EMA(y)×(1−k)
where:
t=today
y=yesterday
N=number of days in EMA
k=2÷(N+1)
Parabolic SAR
The Parabolic SAR is a technical indicator developed by J. Welles Wilder to determine the direction that an asset is moving. The indicator is also referred to as a stop and reverse system, which is abbreviated as SAR . It aims to identify potential reversals in the price movement of traded assets.
MACD
Moving average convergence divergence ( MACD ) is a trend-following momentum indicator that shows the relationship between two moving averages of a security’s price. The MACD is calculated by subtracting the 26-period exponential moving average ( EMA ) from the 12-period EMA . The result of that calculation is the MACD line. A nine-day EMA of the MACD called the "signal line," is then plotted on top of the MACD line, which can function as a trigger for buy and sell signals. Traders may buy the security when the MACD crosses above its signal line and sell—or short—the security when the MACD crosses below the signal line.
EMA 200 + Parabolic SAR + MACD (Short) formula
1. The price closes below the ema200 line.
2. MACD Line cross down Signal Line"
3. Parabolic SAR above the bar means that it is a downtrend.
If all three are true, the indicator will have a Short signal.
Risk to Reward Ratio = 1:1
Stop loss = Parabolic SAR point.
This indicator is just a tool for technical analysis . It shouldn't be used as the only indication of trade because it causes you to lose your money. You should use other indicators to analyze together.
Larry Williams 3 Period EMAs strategyLarry R. Williams explains this strategy in his book "Long-Term secrets to Short-Term trading", it consists of using two 3-period EMAs, one representing the Highs and the other the Lows.
When the price falls below the 3-period Lows EMA we have a long signal.
The trade is closed when the price closes above the 3-period Highs EMA . BINANCE:BTCUSDT
Dynamic Fib StrategyAfter publishing many complex scripts with a myriad of inputs that were confusing for the average user, and after being told my previous publications were overfitted and not easily applied across the board...I spent the past three months working on this masterpiece.
The script is very simple to use, and it MUST be used for timeframes of 10 minutes or more. Please do not use this strategy for lower timeframes thinking that more trades is a desireable trait in a strategy. Patience is a virtue, and it doesn't matter if there are 1000 bars between trades (I am exaggerating here) all crypto is cyclical in a short timeframe of days.
The script is based on moving averages, what is different about this script is that it is the result of months of analysis of the crosses that are key indicators of the best times to trade. It also identifies crosses that indicate when a massive dump is coming and when the dump turns back into a pump. It is designed to be a long strategy with the careful identification of the dump indicators so it preserves your capital and results in a better trade approach.
At the heart of this script is the Sutte MA and the SMA, and only a subset of the settings for these are exposed for user input to keep things simple.
The second key piece of how this script works is the Fibonnaci levels. For the purposes of using this script, the first two levels (Fib 1 and Fib 2) are only for display purposes of the bands and does not affect the triggers for trading. It is only the third and fourth levels which impact the trade triggerers for buying and selling. The idea here is that the best times to execute a trade is when the price moves into the outer bands as these are typical triggers for selloffs from those suffering from FOMO.
Since I have done quite a bit of work here, I do not wish for this script to be copied and pasted into other scripts. It is my coup de grace and there is not a script like this anywhere on TradingView that delves deep into the crosses that matter.
(Long) EMA 200 + Parabolic SAR + MACD By Nussara (strategy)This indicator is backtest of “ (Long) EMA 200 + Parabolic SAR + MACD + Take Profit and Stop Loss”
You can simulate trading by setting your own funds and trading fees. And you can adjust various parameter settings to get the results you want.
Exponential Moving Average
Moving averages smooth the price data to form a trend following indicator. They do not predict price direction, but rather define the current direction, though they lag due to being based on past prices. Despite this, moving averages help smooth price action and filter out the noise.
EMA=Price(t)×k+EMA(y)×(1−k)
where:
t=today
y=yesterday
N=number of days in EMA
k=2÷(N+1)
Parabolic SAR
The Parabolic SAR is a technical indicator developed by J. Welles Wilder to determine the direction that an asset is moving. The indicator is also referred to as a stop and reverse system, which is abbreviated as SAR. It aims to identify potential reversals in the price movement of traded assets.
MACD
Moving average convergence divergence (MACD) is a trend-following momentum indicator that shows the relationship between two moving averages of a security’s price. The MACD is calculated by subtracting the 26-period exponential moving average (EMA) from the 12-period EMA. The result of that calculation is the MACD line. A nine-day EMA of the MACD called the "signal line," is then plotted on top of the MACD line, which can function as a trigger for buy and sell signals. Traders may buy the security when the MACD crosses above its signal line and sell—or short—the security when the MACD crosses below the signal line.
EMA 200 + Parabolic SAR + MACD (Long) formula
1. The price closes above the ema200 line.
2. MACD Line above Signal Line
3. Parabolic SAR below the bar means that it is an uptrend.
If all three are true, the indicator will have a buy signal.
Risk to Reward Ratio = 1:1
Stop loss = Parabolic SAR point.
This indicator is just a tool for technical analysis. It shouldn't be used as the only indication of trade because it causes you to lose your money. You should use other indicators to analyze together.
AleemTalks Crypto MachineOne of best Trend Trading Systems
It Included Moving Averages
Multi Time Frame Analysis
Order blocks
Support and Resistance
To understand it completely
You can Inbox me
Zero-Lag HMA Backtest v1.0 [loxx]This backtest compares profitability differences between a regular Hull Moving Average ( HMA ) and a Zero-Lag HMA .
Things to know:
- Profit is set to 1 ATR
- Stop-loss is set to 1.5 ATR.
- This is by design to test the minimum the profit scenario (1 ATR up) and the worst case loss scenario (1.5 ATR down) for momentum trading. Actual results vary when additional TPs are added
How to use:
- Adjust settings and dates to view different market structures and position scenarios
- See results in the "Strategy Tester" pane
Conclusions and what's next
- Modifying HMA does very little to improve backtest results
- Future iterations will include options to backtest various moving averages with additional modifiers to improve profits and avoide losses
Comment below or send a PM with questions, comments, observations, or concerns.
[001] Entry_Test [TradeStand]Entry_Exit_Test .
------------------------------------
Function description
------------------------------------
You can automatically receive an entry alert when the conditions you specify are met.
Settlement alerts can be sent automatically when the conditions you specify are met.
Three types of moving averages can be displayed.
------------------------------------
Entry and Settlement Conditions
------------------------------------
Trade Mode: Select the trade you wish to execute.
Date and time: Enter the date and time you wish to execute the trade.
Number of seconds: If you want to specify the number of seconds, please enter it.
Daily MA: The 5, 25, and 75 day moving averages are displayed.
------------------------------------
------------------------------------
Entry_Exit_Test .
------------------------------------
■機能説明
------------------------------------
あなたが指定した条件を満たした時に、エントリーアラートを自動的に配信することが出来ます。
あなたが指定した条件を満たした時に、決済アラートを自動的に配信することが出来ます。
3種類の移動平均線を表示することが出来ます。
------------------------------------
■エントリー・決済条件
------------------------------------
・トレードモード:実行したいトレードを選択します
・日時:実行したい日時を入力、または選択します
・秒数:秒数まで指定したい場合は入力してください
・日足MA:5、25、75日移動平均線が表示できます
[002] DAY_MA_Pass [TradeStand]Cond_for_Day_MA
------------------------------------
Function description
------------------------------------
You can automatically receive an entry alert when the conditions you specify are met.
Settlement alerts can be sent automatically when the conditions you specify are met.
Three types of moving averages can be displayed.
------------------------------------
Entry and Settlement Conditions
------------------------------------
Trade Mode: Select the trade you wish to execute.
Date and time: Enter the date and time you wish to execute the trade.
Number of seconds: If you want to specify the number of seconds, please enter it.
Daily MA: The 5, 25, and 75 day moving averages are displayed.
Daily MA Trade: Select for this function
Select MA: Select the moving average you want to use as a reference.
Select conditions: Select the current position relative to the moving average
------------------------------------
------------------------------------
Cond_for_Day_MA
日足移動平均線を基準としたエントリー・決済
------------------------------------
■機能説明
------------------------------------
あなたが指定した条件を満たした時に、エントリーアラートを自動的に配信することが出来ます。
あなたが指定した条件を満たした時に、決済アラートを自動的に配信することが出来ます。
3種類の移動平均線を表示することが出来ます。
------------------------------------
■エントリー・決済条件
------------------------------------
選択した時間に、移動平均線を「超えているか」「割っているか」で
エントリー・決済を実行できます。
・トレードモード:実行したいトレードを選択します
・日足MA表示:5、25、75日移動平均線が表示できます
・実行日時:実行したい日時を入力、または選択します
・秒数:秒数まで指定したい場合は入力してください
・日足MA基準トレード:この機能の「OFF/ON」を選択します
・指定 日足移動平均線:基準となる日足移動平均を選択します
・条件:移動平均線に対する現在の位置関係を選択します
Tendency EMA + RSI [Alorse]A very simple and highly effective strategy LONG & SHORT that combines only 2 indicators:
RSI
3 Moving Average Exponential (EMA)
LONG Entry conditions are:
EMA 20 cross over EMA 10
EMA 10 is above EMA 100
LONG Exit conditions are:
RSI greater than 70
Or when X number of candles have passed and the trade is in profit. (Check Settings)
SHORT Entry conditions are:
EMA 20 cross under EMA 10
EMA 10 is below EMA 100
SHORT Exit conditions are:
RSI is less than 30
Or when X number of candles have passed and the trade is in profit. (Check Settings)
Indicators & Conditions Test Framework [DTU]Hello All,
This script is a framework to build strategies by combining indicators and conditions (long, short, exits). You are able to analyze your strategies in realtime by changing the input parameters related to indicators, conditions and their combinations.
OVERVIEW
With this Study/Strategy framework, you will be able to create strategy conditions, display them on the chart, and test them using existing indicators as well as external and custom indicators that you can add.
The main purpose of the Framework is to choose your indicators to be used in the conditions and test your strategy by producing your "Long, short, Exit long, Exit short" combinations.
Although may be, it can be a bit difficult and complicated at first start, but you can understand the logic on its use in a very short time.
Notes:
I removed external links off descriptive images and video to be comply with Trading view violation House Rules
Since I am new in the community and still trying to understand the pine script language I can make errors and violations on my script. Please Inform me on any issue that I made..
HOW TO
STEP 1: SETTINGS ______________________________________________________________________________________________________
SOURCE, TIMEFRAME, SECURITY
Select the Source, timeframe and Secure type that your indicators will use.
Here, the Secure entry consists of 3 parts and the f_security function is used to determine it.
a)Secure
This option is defined as reducing repaint in tradingview calculations as much as possible. The following function is used.
request.security(_symbol, _res, _src , lookahead=barmerge.lookahead_on)
b)Semi Secure
While this option can reduce repaint in tradingview calculations as much as possible, it is less secure. The following function is used.
request.security(_symbol, _res, _src )
c)Repaint
This option turns on the repaint feature. The following function is used.
request.security(_symbol, _res, _src ) : na
Ind Source:
You can the source that indicators will use their own calculations
Ext Source:
You can import external Indicator sources from here . It appears on condition/combination area as "EXT".
To export the External indicator plot it with a title. It will be visible in source dropdown input
PERIOD , ALERTS...
Period:
Determine your strategy testing period by selecting start and end date/time
(!!! According to your tradingview subscription, it takes the last 5000, 10000.. bars.
The extra bar option may cause problems such as not appearing in the calculations or errors).
Plot Alerts:
Plot condition result as alerts arrows on the chart's bottom for "LONG" and the top for "SHORT" entries, exits
Close on opposite:
When selected, a long entry gets closed when a short entry opens and vice versa
Show Profit:
It appears if script is in strategy mode (not in study) this can display current or open profit for better reanalyzing your strategy entry exit points. (Currently under development)
PLOT TYPE OPERATIONS
This option has 4 entries
a) Mult
Sets the multiplier for the selected Plot Type (stochastic, Percentrank, Org Range (-1,1) ) except for "Original" in the range (-1,1).
EXAMPLE: When 1000 is selected, the indicator in the range of (-1,1) will appear in the range of (-1000, 1000) on the screen.
b) Shift
It determines the shift that will appear on the screen for the selected Plot Type (stochastic, Percentrank,Org Range (-1,1) ) in the range (-1,1) other than "Original".
EXAMPLE: When Shift:35000 and mult:1000 are selected, the indicator will appear in the range (34000, 36000) on the screen.
c) Smooth
This option (only for Stochastic & PercentRank) allows to smooth the indicator to be displayed.
Here, tradinview ta.swma function is used.
b) hline
Adjusts the horizontal lines to appear on the screen according to the mult factor for the range (-1,1)
The lines represent the values (-1, -05, 0, 05, 1)
STEP 2: INDICATORS ______________________________________________________________________________________________________
You need to choose indicators that you can use in strategy conditions.
Here, the indicators come from the dturkuler/lib_Indicators_DT open script library defined in the code
In addition, you can add the indicators that you will create in the area defined in the code to this list..
You can also import external indicators and test them with other variables on the system..
You can choose a maximum of 5 indicators that you can use in total. (can be increased in new versions)
Indicators are categorized in 3 main sections
Indicator Selection:
You can select your indicators from this area
a)Moving Averages
These are indicators such as EMA, SMA that you can show on the stock. They come from the library.
These indicators are fed from Settings/source. Only the length value can be used as a parameter.
In addition, line colors can be changed..
As of now, there are 28 indicators in the library in total and 5 indicators are left as future use for this field for now.
b)Other Indicators
These are different indicators from the stock value such as RSI, COG. They come from the library. These indicators are fed from Settings/source.
Only the length value can be used as a parameter. In addition, line colors can be changed.
As of now, there are 24 indicators in the library in total and 5 indicators are left as a future use for this field for now.
c)Custom Indicators
These indicators are the ones you can create by programming yourself in the source code..
The area at the bottom of the settings screen is reserved for the parameters of this type of indicators.
Indicator Length:
You can update your selected indicator length value from here. (Not: it doesn't work for custom indicators since they have their parameter on cust. Ind. input screen )
Indicator Plot Type:
Next to the indicators, there is an input selection field about how they will be displayed on the screen.
a)Original
The indicator is displayed on the screen with its current values. It is an ideal solution for displaying moving average indicators such as (EMA, SMA) over current stock.
Since the values of indicators such as (RSI, COB) are low (-100,100 : -1.1), they appear at the bottom of the screen and make analysis difficult.
For this reason, other options may be more suitable for these.
b)Stochastic
The indicator is displayed on the screen with stochastic calculation in the range of -1.1.
It uses the stochastic(50) calculation method to spread indicators such as (RSI, COB) over the range (-1,1).
Indicators in this selection can be fixed and monitored under stock on the screen with the parameters under the Plot Type section.
You can see the original values of the relevant indicator on the Data Window screen.
(!!! Do not use the values on the chart in your condition calculations. Instead, get the values from Data Window)
c)PercentRank
The indicator is displayed on the screen with stochastic calculation in the range of -1.1. .
Since the values of indicators such as (RSI, COB) are low (-100,100 : -1.1), they appear at the bottom of the screen and make analysis difficult.
Indicators in this selection can be fixed and monitored under stock on the screen with the parameters under the Plot Type section.
You can see the original values of the relevant indicator on the Data Window screen
((!!! Do not use the values on the chart in your condition calculations. Instead, get the values from Data Window)
d)Org Range (-1,1)
If your indicator is in the range of -1.1, your indicator will be displayed on the screen with its original calculation in the range of -1.1.
Indicators in this selection can be fixed and monitored under stock on the screen with the parameters under the Plot Type section.
You can see the original values of the relevant indicator on the Data Window screen.
(!!! Do not use the values on the chart in your fitness calculations. Instead, get the values from Data Window)
STEP 2 NOTES:
STEP 3: CONDITIONS ______________________________________________________________________________________________________
After choosing the indicators you will use in the conditions, you move on to the "CONDITIONS" section.
There are 4 conditions type here.
• LONG ENTRY CONDITION
• SHORT ENTRY CONDITION
• LONG CLOSE CONDITION
• SHORT CLOSE CONDITION
The use of each condition is the same.
There are 3 combinations you can use in each condition. (can be increased in new versions)
a)COMBINATIONS
There are 3 combinations you can use in each condition. (can be increased in new versions)
Each combination are build from 4 parts
1)1st Indicator
If set to "NONE" this combination will not be used on calculations. You can select
IND1-5: from indicators (See above),
EXT: value from externally imported indicator
Stock built-in values: close, open...
2)Operator
Selected Operator compares 1st Indicator with the 2nd one. You can select different operators such as
crossover, crossunder, cross,>,<,=....
3)2nd Indicator
This indicator will be compared with the 1st one via selected Operator. You can select
IND1-5: from indicators (See above),
VALUE: a float value defined in the combinations value parameter
EXT: value from externally imported indicator
Stock builtin values: close,open...
4)Value
When the 2nd indicator field is "VALUE", value area compares the entered value.
ex: 1st indicator="open", op=">", 2nd indicator="VALUE", value=3000.12 means is(close>3000.12)
In other conditions, it compares the previous values of the indicator.
ex: 1st indicator="open", op=">" 2nd indicator is "close" and value is 2 means is(open>close )
EXAMPLES:
indicator 1= "IND1", Operator=">", indicator 2= "IND2" => is(IND1>IND2)
indicator 1= "IND1", Operator=">", indicator 2= "VALUE", "0.1" => is(IND1>0.9)
indicator 1= "IND2", Operator="crossover", indicator 2= "IND1" => is(IND2 crossover IND1) : like a=ta.crossover(IND2, IND1)
indicator 1= "IND1", Operator="<", indicator 2= "close" => is(IND1>close)
indicator 1= "IND1", Operator="<", indicator 2= "EXT" => is(IND1>EXT) , EXT mean external imported indicator that define on settings section
indicator 1= "IND1", Operator="<", indicator 2= "IND1", Value="1" => is (IND1>IND1 )
b)JOIN COMBINATIONS
Each combination in Condition is compared with the next one via JOIN operator
The join operator can be selected as AND or OR.
Examples:
1st combination= is(IND1>0.9) true
2nd combination= is(IND2 crossover IND1) false
1st combination "AND" 2ndcombination" => false (is(IND1>0.9) AND is(IND2 crossover IND1))
1st combination "OR" 2nd combination" => true (is(IND1>0.9) OR is(IND2 crossover IND1))
STEP 3 NOTES:
When the 2nd indicator field is "VALUE", value area compares the entered value. In other conditions, it compares the previous values of the indicator.
In cases where "VALUE" is not selected, integer values must be entered in this field. (float should not be entered. ie 1, 2 should be entered)
!!!If the 1st indicator is "NONE" in the combination, that combination is cancelled.
Each combination returns true/false, allowing the selected value to be compared with another value
Example: EMA(21)>EMA(50) returns true under all conditions or (EMA(21) crossover EMA(50)) returns true when passed.
You can use , Value of 5 indicators (IND1-IND5) or (VALUE) that you have defined in combinations or import indicator (EXT) or stock values (close, open, high...) in your calculations.
combination Compares the 1st indicator with 2nd indicator via the operator.
STEP 4: CUSTOM INDICATORS ______________________________________________________________________________________________________
There is an area in the code for designing Custom Indicators.
Here you can design your own indicators and use them in the framework.
You can also create unlimited parameters for your indicators in the SETTINGS custom indicator field.
For now, only 3 Custom indicators have been defined.
Examples are entered in the code for custom indicators.
STEP 4 NOTES:
Including / updating custom to the code is explained in the source code
• LIMITATIONS:
!!! According to your tradingview subscription, it takes the last 5000, 10000.. bars. More bar options may cause problems such as not appearing in the calculations or errors.
• RAMBLINGS:
• NOTES [ /i]
This Script can be used as an indicator if the last strategy parts in the code are commented out and converted to the initial strategy study.
It was originally prepared for my use with my own strategy framework and has export functions accordingly.
When integrated to my own strategy framework it brings many more features over strategy definition of trades.
• TODO [ /i]
TODO: Add tooltips to the settings screen
TODO: Add double triple, Quatr factor for all indicators (convert any indicator to factor2-4 facotr. ex: EMA to DEMA, TEMA, QEMA...)
TODO: Add factorized Fibo avg range indicator (good for trend definition and entry exit points)
TODO: Add bands to the indicator and conditions
TODO: Add debug window for exporting indicator's parameters
TODO: Add isRising(value) isFalling(value), is...(value) .... to combinations (they can be used as custom indicator also
TODO: Reassess condition entry screen for user friendly GUI
TODO: Increase # conditions from 3 to 4
TODO: Reassess strategy entries, exit and close (should be improved)
TODO: Add Alerts, Condiional alerts for indicator (study) part
TODO: Create export function v3 for Pinecoders Indicator framework
• THANKS:
For Pine script format docs RicardoSantos .
For Pine script coding standards Pinecoders .
For moving average script used on library s RodrigoKazuma .
EMA RSI ADX Scalping StrategyThis is the strategy version of my ERA Indicator. You can check my scripts if you'd like to use only study indicator.
Strategy Rules For Long Entry:
- Check if price above the set EMA (Can disable this rule if you'd like in the settings)
- RSI is in Oversold
- ADX is above set "Trend Ready" threshold (Meaning there is a trend going on)
- Price must approve the trend of previous candles. This is bullish for buy entries and bearish for sell entries.
- Enter with stop loss below last swing low with 1:1 or 1.5:1 take profit ratio.
Strategy Rules For Short Entry:
- Check if price below the set EMA (Can disable this rule if you'd like in the settings)
- RSI is in Overbought
- ADX is above set "Trend Ready" threshold (Meaning there is a trend going on)
- Price must approve the trend of previous candles. This is bullish for buy entries and bearish for sell entries.
- Enter with stop loss above last swing high with 1:1 or 1.5:1 take profit ratio. (Can be adjusted)
Features:
- You can modify a lot values to your liking.
- Choose Fixed or Trailing Stop Loss / Take Profit with detailed modifiers.
- You can connect it to bots if you'd like.
- It does NOT repaint.
- Since it's a scalping strategy recommended to use on 15 min or below timelines.
- Choose if you want to stop entry on opposite signals.
- And some other things i may not remember right now...
I tried to code this as modifiable as possible. Let me know if there are any problems you encounter. Open to suggestions as well.
Happy Trading.
OBV MA StrategyThe On Balance Volume + Moving Average Strategy
Parameters: 1H candles, ETHUSDT on BINANCEUS, commission percent uses Binance's maker/taker fees of 0.075%
Strategy: I create a 30 day moving average of the On Balance Volume "obvSma = ta.sma(ta.obv, 30)." Then I use the following buy conditions:
OBV crosses above the OBV moving average
The obv drops x% below the OBV moving average (buy a dip)
The OBV moving average is rising, the OBV is greater than the OBV moving average and the OBV is rising
The first buy condition is attempting to buy into an uptrend. When the OBV rises above the OBV moving average, people are buying and it's a good time to enter the trade.
The idea behind the second buy condition is to buy a dip so make sure you are careful to not set it too shallow or you'll end up buying the dip before the dip before the dip. :) I recommend 10% or more.
The third buy condition is there in case our trailing stop takes us out of a trade but the trend is still rising, we don't want to miss out on that profit so if the OBV is above the OBV moving average, the average is rising and the OBV is rising, we are likely in the middle of an uptrend and we should buy in.
Mean Reversion Strategy v2 [KL]Description :
This strategy will enter a position when the following conditions are met:
a) Main signal: When source data (ATR) diverts from its moving average value, and
b) Confirmation: If predicted direction of trend is favorable.
Assumptions :
During periods of high price volatility, ATR diverts from its moving average value. Eventually, ATR should revert. But since just knowing the magnitude of increase/decrease of ATR does not indicate a trend signal, we need to introduce a model to predict the current trend.
In short:
• Trend Prediction : This strategy calculates the expected logarithmic return of the security (the "Drift") and considers prices to be moving in uptrend if the drift curve is upward sloping.
• Assessment of ATR diversion : To determine "yes/no" regarding whether ATR at a given point in time has diverted, this script conducts a two-tailed hypothesis test at each candlestick period. The null hypothesis (H0) is that the fast moving average value should equal the slow moving average value (say, denoted as H0: atr14 == atr28; it is assumed that atr28 is more meaningful for the purpose of describing the current trend because it has a larger sample size). Investopedia has an article summarizing this topic .
Exit Condition :
When trailing stop loss hits.
Previous version :
This strategy is based on Version 1 published back in September . This older version considers +/- one standard deviation to be the critical values relative to average ATR when testing whether ATR has diverted from the mean. This does not take Standard Error ("SE") into account. As a result, the threshold is often too wide and it generates too many entry signals.
TradingGroundhog - Strategy & Wavetrend V2#-- Public Strategy - No Repaint - Fractals - Wavetrend --
Here I come with another script, a nice and simple strategy based on fractals and Wavetrends.
#-- Synopsis --
A simple idea, on a small time frame (15 min) we buy when the opening price goes below a Bottom fractals and sell when it goes over a Top fractals, but in order to avoid bad and evil downtrends, we use Wavetrends based on a Daily time frame. From it, Tops and Bottoms are extracted. If the opening price goes above Wavetrend Tops, no trades will be conducted during the day. If the price goes below Wavetrend bottoms, no trades will be executed from 1 to N days, until a new Wavetrend bottom is generated.
I developed the strategy using BTC /EUR 15 MIN BINANCE but it can be applied to many other cryptos, I don't know for forex or others. You can use it for long term and automated trading, I implemented the Wavetrend indicator to do so, or for short term if you have spot a long coming uptrend. Test it, look at its profit and long or short period on your crypto of choice.
#-- Graph reading --
And now, how to read it ?
Wavetrends:
Red Backgrounds are associated to No Trade periods. These periods occur when the price goes below a Wavetrend bottom or above a Wavetrend Top. They are here to limit the loss.
Blue Gradient lines represent the past Tops. For each bar, only the increasing values of the Wavetrend tops are acquired. Going from light to dark blue based on the age of the Tops. Thus, if on line goes from dark to light, this means the price is approaching a previous Wavetrend top. In the opposite, if it darken, thus the price say 'buy buy' and go dropping.
Yellow Gradient lines represent the past Bottoms. They are based on the same principe that the blue lines.
Fractals:
Yellow Flags occur when the opening price goes below a Bottom fractal , it means Buy.
White Flags appear when the opening price goes over a Top fractal , it means Sell.
#-- Parameters --
*** Parameters have been intensively optimized using 10 cryptocurrency markets in order to have potent efficiency for each of them. I would recommend to only change the Can Be touch parameter. For the others, I don't recommend any modifications. The idea behind the script is to be able to switch between markets without having to optimize parameters, less work, easy to target active crypto and therefor limit the risks. ***
Can be touch :
'Combined Smoothness' : The number of open individuals used by the Wavetrend. (6 or 9, often 9 is better but with less volatile crypto it will be 6)
'Filter fractals' : Activate or Disable the filtering fractal operation. If Enable, buy during less risky periods. (Disable is often better)
Can be touch but not necessary :
'VolumeMA' : The Volume corrector used by the fractals
'Extreme window' : The number of price individuals to look for if we want to remove extreme fractals.
Not to touch :
'Limit_candle to look on' : Number of candles to use to compute the Wavetrend Tops and Bottoms.
'Length top bottom drawn' : Size of the lines
'Long Sop Loss (%)' : The minimal difference of price between a Fractal bottom and the opening price to buy.
#-- Time frame --
Should be used with the following time frames depending on the necessity:
1 MIN
3 MIN (Interesting for short term profit, may need some parameter ajustements)
5 MIN
15 MIN (Preferred for long term profit, the script was developed on it)
#-- Last words --
The script can be set up to send Tradingview signals to 3comma just by adding comment = " " in strategy.close_all() and strategy.entry().
Good trades !
Disclaimer (As it should always be one to any script)
***
This script is intended for and only to be used for personal purposes only. No such information provided by it constitutes advice or a recommendation for any investment or trading strategy for any specific person. There is no guarantee presented or implied as to the accuracy of specific forecasts, projections, or predictive statements offered by the script. Users of the script agree that its original developer does not take responsibility for any of your investment decisions. Please seek professional advice before trading.
***
# Here are the results from the 1rst of July 2021 with 100% of equity on the BTC /EUR 15 Min and with a capital of 1 000 EUR.
# As I saw, it goes from +20% to more than +100% depending on the selected crypto. Sometimes it's negative but it's quite rare on crypto using the EUR.
Simple Ema_ATR Strategy HulkTradingSimple EMA strategy, based on ema55+ema21 and ATR(Average True Range) and it enters a deal from ema55 when the other entry conditions are met
Basically long and short conditions
If long:
1) close must be less than open (because we are searching for a pullback)
2) emaFast(21) must be bigger than emaSlow(55) - for a trend detection
3) Difference between emaFast and emaSlow must be greater than ATR(14) - for excluding flat
For short conditions are opposite
Stop levels and take profits, based on ATR multiplier.
You can change it in input field.
I recommended values between 1 and 4, not more.
This strategy was tested on pairs BTCUSDT and ETHUSDT and have a nice results.
TripleEMA + StochasticRSI + ATR Scalping Strategy by TradeSmartCOINBASE:BTCUSD Hello everyone and welcome to our second script release!
This script is one of many upcoming scripts. This one is a test for us, how it works, how you guys like this kind of stuff, and for feedback what we should change/improve at.
So feel free to comment any suggestions you have.
SCRIPT IS OPTIMIZED FOR:
BTC/USD (Coinbase) 15 minute timeframe
(Keep in mind default settings does not include trading fees, you can set it at the properties)
I recommend using this script on a trading exchange where the fees are extremely low or on an exchange where you get paid to place limit orders.
(I am not a financial avdvisor and none of this is financial advice.)
Now you can modify the following:
Stochastic RSI
3 different EMA
Length of ATR (for stop loss and take profit)
Stop Loss and Take Profit Risk to Reward ratio
Choice between Capital Risk on each trade or Risk of % of Capital
Allowing Short/Long entries only
Limit between dates
Trading days 1-7
We will update the script with more and more features taking in consideration your requests.
Hope you like it! Don't forget to let us know what we should change or improve. Thanks, and have a great day!
STRATEGY ENTRY RULES
LONG
When EMAs are lining up (meaning for ex. 400 < 13 < 7), and the Stochastic RSI crosses upwards (meaning blue line crosses orange upwards), then go long.
SHORT
When EMAs are lining down (meaning for ex. 7 < 13 < 400), and the Stochastic RSI crosses downwards (meaning blue line crosses orange downwards), then go short.
TAKE PROFIT
When price hits the exit price (calculated from stop loss with the risk ratio)
STOP LOSS
When price hits stop loss then exit the position.
QUANTITY TO BUY (Risk per Trade % or Capital %)
Risk Per Trade % attribute: we can set how much money we want to risk on one trade. Meaning that if we lose that particular position, then a Risk Per Trade % value of our equity will be lost.
Example: if you set the Risk Per Trade % to 1 % and you have a 100$ account balance, then if you loose the trade you will loose 1$ max.
Capital % we can set with how big % of our capital we want to enter into a position. Meaning that we enter with a set % of our capital.
Example: if you set the Capital % to 1 % and you have a 100$ account balance, then you will enter the position with 1$.
First Release Settings: (2021-10-25) for BTC/USD (Coinbase) 15 minute timeframe
Stochastic RSI settings: (Not displayed in the script. If you want to see it you have to add it separately.)
K: 3
D: 2
RSI Length: 6
Stochastic Length: 16
RSI Source: hlc3
EMA 1: 5
Source One: Close
EMA 2: 12
Source Two: Close
EMA 3: 215
Source Three: Close
Length of ATR: 16
Stop Loss Multiplier (risk): 3.6
Exit Price Multiplier (reward): 1
Risk Percentage: 3
Allow Long Entries: yes
Allow Short Entries: yes
Valid Trading Days: 1234567
The valid trading days of the Limit Trading Time feature. Numbers represent the days: Sunday (1), Monday (2), Tuesday (3), …, Saturday (7)
If you like this one, follow for more scripts! Thank you for your support!
Scalping Trading System bot Crypto and StocksThis is a trend trading strategy scalping bot that can work with any type of market. However I concluded my tests so far with Crypto, Stocks and Forex, and with optimizations always could be found some profitable settings.
Indicators
SImple Moving Average
Exponential Moving Average
Keltner Channels
MACD Histogram
Stochastics
Rules for entry
long= Close of the candle bigger than both moving averages and close of the candle is between the top and bot levels from Keltner. At the same time the macd histogram is negative and stochastic is below 50.
short= Close of the candle smaller than both moving averages and close of the candle is between the top and bot levels from Keltner. At the same time the macd histogram is positive and stochastic is above 50.
Rules for exit
We exit when we meet an opposite reverse order.
This strategy has no risk management inside, so use it with caution !