strategy.convert_to_symbol() demoA strategy demonstrating the new strategy.convert_to_symbol() and strategy.convert_to_account() functions introduced in Pine v5.
Try selecting a custom "Base Currency" under Properties to see how the conversion works.
Note: The conversion functions seem to work as expected on BTCUSD, but not on BTCUSDT. This is likely because USDT is not recognized as a currency.
Médias Móveis
[astropark] Trend Skywalker V2 [strategy]Dear Followers,
today I'm glad to present you Trend Skywalker V2 , the evolution of Trend Skywalker V1 indicator that you can see here below:
This indicator works on every timeframe and market, it's quite responsive to market movements, so it's especially good on volatile markets.
In this new version you have 3 trend clouds available :
a short-term one (yellow)
a mid-term one (green)
a long-term one (blue)
You can also enable an option to show all trend clouds as one, the result will be similar to a special bollinger bands tool.
Of course you can edit trend clouds analysis period and color, also you can turn on or off the cloud that you prefer.
The indicator can run 4 different kinds of strategy : one for each trend cloud individually or a mixed one.
Also the indicator tracks for you a peak profit from entry: this tracker is a suggestion for you to take profits while price goes up!
All red-green circles you see in the chart is a reminder that a peak profit label was there in the past: what does this tell you?
if price starts losing the short-term trend and you had a lot of TP suggestions, maybe trend ended and you should start consider closing your trade before you give back all your profit.
On backtesting you can you test long and short setups individually or both, as well as performance in a specific time window.
This is a premium indicator , so send me a private message in order to get access to this script.
Volume and Moving average,will this model working in real-trade?i`ve recently made this script through few month,understand me if there are some incorrect grammar or something.
basically this script is based on moving average strategy and the bollinger bands
if the buy volume is bigger than sell volume,also buy volume is bigger then daily average volume than it`s defined current market is bullish and entered(of course there is some other conditions)
the exit condition is find the highest price after entered,keep refresh the highest price through time and then,if the current price is ?%lower then highest price,it will closed the position.
my question is this : 1 this model will working in real-trade?
2 why the winning rate is 100%?
- i`ve coded if the position margin over -10%,close the position this code isn`t work? or the other profit line is prevent that happened?
Three EMAs Trend-following Strategy (by Coinrule)Trend-following strategies are great because they give you the peace of mind that you're trading in line with the market.
However, by definition, you're always following . That means you're always a bit later than your want to be. The main challenges such strategies face are:
Confirming that there is a trend
Following the trend, hopefully, early enough to catch the majority of the move
Hopping off the trade when it seems to have run its course
This EMA Trend-following strategy attempts to address such challenges while allowing for a dynamic stop loss.
ENTRY
The trading system requires three crossovers on the same candle to confirm that a new trend is beginning:
Price crossing over EMA 7
Price crossing over EMA 14
Price crossing over EMA 21
The first benefit of using all three crossovers is to reduce false signals. The second benefit is that you know that a strong trend is likely to develop relatively soon, with the help of the fast setup of the three EMAs.
EXIT
The strategy comes with a fixed take profit and a volatility stop, which acts as a trailing stop to adapt to the trend's strength. That helps you get out of the way as soon as market conditions change. Depending on your long term confidence in the asset, you can edit the fixed take profit to be more conservative or aggressive.
The position is closed when:
The price increases by 4%
The price crosses below the volatility stop.
The best time frame for this strategy based on our backtest is the 4-hr. Shorter timeframes can also work well, although they exhibit larger volatility in their returns. In general, this approach suits medium timeframes. A trading fee of 0.1% is taken into account. The fee is aligned to the base fee applied on Binance, which is the largest cryptocurrency exchange.
You can execute this strategy on your favourite exchange at coinrule.com
AMRS_LongOnly_PartTimerThis Script is created to back-test the data starting 01/01/2000 based on AMRS strategy.
AMRS is long only strategy. It is based on unique calculation around moving averages and 2 year high price.
There are few strategies for moving average crossovers but AMRS strategy is unique compared to other moving averages strategies as it has very specific below mentioned calculations evolving around moving average and stock price.
AMRS strategy is unique one to generate buying signals when stock price creates new 2 year high and retraces back to 13 day EMA value.
AMRS strategy is unique one having specific calculation for entry signal and exit signal as mentioned below. This strategy gives back testing results to help build conviction on entry/exits if trades were taken in past as per the AMRS rules.
As per AMRS strategy this script generates green arrow on each time when new 2 year high is made and also generates long signal indicated by white arrow when stock price retraces back to 13 day EMA value and price is within 10% range from 2 year high.
This strategy will generate white arrow on the chart for each buy signal when stock price reaches 13 day EMA after first Long signal is generated. These subsequent buy signals can be used for pyramiding.
Entry Signal Logic : 1. Stock should be trading near 2 year high.
2. Stock price should be within 10% range from 2 year high
3. Stock price should be less than or equal to 13 day EMA and grater than equal to 21 day EMA
This AMRS strategy also generates exit signal for already generated buy signal (open position).
Exit signal generated when stock price closes 5% below 21 day EMA or when stock price closes below 20% from most recent 2 year high price.
Exit Signal Logic : 1. Stock price closes 5% below 21 day EMA or stock price closes below 20% from most recent 2 year high price.
2. Since exit logic is based on closing price it is plotted on the chart next day.
3. So when exit signal is plotted on the chart, previous days stock price is either closed below 5% of 21 day EMA or corrected 20% from recent 2 year high.
Note : To Calculate last entry positions % return, by default all positions are getting closed on mentioned end date.
Script parameters :
start date as 01/01/2000 - Constructed from Start Year - 2000, Start Month - 1 Start Date - 1
End date (mostly current date) Constructed from Values in End Year, End Month, End Date.
Initial Capital - Defaulted to 100000
Order Size - 5% of Equity
Pyramiding - 3 orders
Commission - 0.2%
Slippage - 1 tick (Since this strategy exit is on close basis mostly there wont be any slippages)
3x Supertrend and Stoch RSIBased on the strategy if Trade pro "HIGHEST PROFIT Triple Supertrend Trading Strategy Proven 100 Trade Results"
Your entry long signal will show when two of the three supertrend are green and the stochastic rsi cross up and the candle is above the ema
Your entry short signal will show when two of the three supertrend are red and the stochastic rsi cross down and the candle is below the ema
You can change the settings of the three supertrend and the stochastic rsi
Daily HIGH/LOW strategyThis is a DAILY High/LOW strategy combined with a moving average and volume for more accuracy.
The rules are simple :
For long if we had a cross of the high with the previous high and close of the candle is above moving average and chaikin money flow volume is positive we have a long entry.
We exit when we cross down the moving average with the close of the candle.
For short if we had a crossdown of the low with the previous low and close of the candle is below moving average and chaikin money flow volume is negative we have a short entry.
We exit when we cross above the moving average with the close of the candle.
This strategy has no risk management inside so use it with caution.
If you have any questions, let me know
Williams Fractals StrategyThis indicator made with using Williams Fractals, 20 50 100 Moving Averages and Relative Strength Index. You can easily find entry points by using Long (L), Short (S) signals.
Note : Settings are optimized for BTC:USDT Perpetual 15min TF. For use different pairs or TFs you may need to change settings.
OnePunch Algo KITEIntroducing One of OnePunch ALGO Flagship plugin. In this plugin it comes with a in-built risk management system plus it allows users stop loss input per trade. This can be used with Cryptocurrency and Stocks equally.
#################################
########## User Guide ###########
################################
OnePunch ALGO KITE should be used with 30min or upper time limits, this is built for long term trading strategies. Make sure once you pick a crypto or stock to trade, check its backtest data: which can be found at Strategy Tester. A good strategy should always out perform the Buy & Hold for a given timeframe.
Best Bar Time: 45m
Other Options
___________________________________________________________
Short Term/Day Trading Setup
For Short Term or Day Trade: 5min, 15min & 30min candlesticks
Mid Term Trading Setup
For Mid-term traders: 45m, 1hr, 2hr, and 3hr setup works really well.
For Long Term Trading Setup
For long term traders: 4hr, 1D, 1Week and 1Month Setup works well.
* Best timeframe should beat buy and hold for a given timeline.
#################################
####### How Strategy Work ########
################################
Strategy use multiple signals and technical data. Including and not limited to Simple Moving Averages, Volume , & Trends. In this chart, we picked Polkadot (DOTUSD) crypto coin as an example with an initial capital of $1k. We have also added a slippage of 1 just to be on the safe side and a commission rate of 0.01% (Commission rates depends of your broker).
#################################
######## Built with Inputs #########
################################
Date Pick: User can backtest the plugin with exact date you want from to till. For an example, you can check date from 01 / 01 /2020 (Default setting date) till day, and compare apple to apple results with other stocks. This is mostly used to check if another stock/crypto do better than the other compared to a given timeframe.
Risk Management per Trade: This also allows users to put their own risk management loss percentage. In default it is set to 100%. This allows user to see in the long run, if this provide better results with or without a stop loss.
Commission Rates: User can update commission rates according to their broker's fees
Slippage: To be more conservative about the entry and exit of a trade, user can input any slippage amount
#################################
#### How to Detect BUY Signals #####
################################
When a teal color BUY signal is given, it is a BUY. This signal basically happen when a stock land in a high volatility zone. We use in-build systems such as MA , Support and Resistance and Trends to come up with the Buy Signal. Algorithm make a market order when the criteria's are met and algorithm exit if this turns out to be a bluff bullish signal.
#################################
#### How to Detect SELL Signals #####
################################
When a maroon color SELL signal is given, it is a SELL happen when a momentum changed in a bearish downtrend. Sell happen when a momentum changed in a bearish downtrend. We use moving averages and trend analysis to identify downtrends. Algorithm make a market order when the criteria's are met. There is a in-built risk management that make an exit order when a bullish alert turns out to be a bluff.
#################################
#### Bullish and Bearish Signals #####
################################
When a silver color Bearish signal is given, it is a BEARISH trend alert. It's up to the user to decide what to do when this alert is given. (Note: Backtest data only shows Buy and Sell Signal market orders results, it does not account bearish alerts), a Bearish signal given when the stock/crypto is overbought in multiple technical indicators.
When a sea blue Bullish trend signaled. (Mind this sea blue color signal will not be calculated in the backtest, it is up to the users to decide what to do with this bullish signal) - This signal happen when a stock is oversold in multiple technical indicators.
DISCLAIMER: Stocks and options trading involves substantial RISK of LOSS and is NOT suitable for every investor. The valuation of stocks and options may fluctuate, and, as a result, clients may lose more than their original investment. If the market moves against you, you may sustain a total loss greater than the amount you deposited into your account. You are responsible for all the risks and financial resources you use and for the chosen trading system. You should not engage in trading unless you fully understand the nature of the transactions you are entering into and the extent of your exposure to loss. If you do not fully understand these risks, you must seek independent advice from your financial advisor.
All trading strategies are used at your own risk. And OnePunch ALGO Developer does NOT take any responsibility for your losses using any of the advice or suggestions or strategies are shown/said in any of OnePunch ALGO publications.
Dagger V1 strategyThe "Dagger V1 strategy" strategy is used for the backtest of the "Dagger V1 indicator & alerter" indicator. Their algorithm is identical. Further, all descriptions of the settings are the same for the strategy and the indicator.
Dagger is used for trading on the cryptocurrency spot market, but it can also be used for any other fairly volatile pairs.
Dagger shows the best results on the H1 timeframe, but you can experiment with other timeframes.
The logic of Dagger's work is based on the search for the optimal entry point into the market and the best moment to close a deal. Stochastic oscillator and exponential moving EMA are used for this. Also, the exit from the transaction can be optimized using several parameters.
The strategy can use trailing up to one or more red bars in order not to miss the sharp growth of the currency.
Linear SSL ShortThis script consist of two parts: linear SSL and DEMA. The difference between original SSL and current is that it calculated by linear regression. The logic is simple: when SSL "crossunder" and DEMA is above the price - we get short signal. When price became above DEMA and SSL "crossover" - close short.
TemaVWAPRSI StrategyExchange: Kraken
Timeframe: 5m
Pair: ETH/USD
If you use this for any other exchange or pair, you'll have to tweak the settings, most importantly are the trailing stop ticks. This strategy is currently in what I would call beta mode. It uses the volume weighted average price indicator, rate of change, two triple exponential moving averages and the relative strength index to find buy and sell signals.
SQV CrossThis strategy is used to find tickers that do well when SPY and QQQ are up and VIX is down. This uses EMA's on the user defined resolution to define direction of each ticker. Trades are entered upon crossover. EMAs are user defined as well.
Moving Average Band - Taylor V1A Very Simple Strategy From Moving Average
- Price Breakout Upper Band = Long
- Price Breakout Lower Band = Short
Moving Average Type = Able to Change RMA, EMA, SMA, WMA
Moving Average Period = Able to Change
Upper Band & Lower Band Gap = Able to Change
With Stop Lose & Take Profit = Able to Change
8 Day Extended Runs Inspired by Linda Bradford Raschke.
Strategy suited to the US T-note (ZN1!) with a t-test of 4.06.
The 5 day SMA is vital to Linda’s trend identification system. She’s done extensive testing and research using this indicator and has built models based on it. Linda used the 5 day SMA to determine that large outlier price moves happen in the direction of the trend in each market about 9-10 times per year. The powerful part about that number is that when the trend does persist, it can go on a long run, making this a trade with a high expected value.
Note: the current exit criteria is sell 10 days after entry, users should experiment with different stop placements.
TemaRSI StrategyThis strategy uses a triple exponential moving average (Tema) and RSI to find buy points and uses stops, trailing stops and take profit to exit. Draft 1.
Bagheri IG Ether v2In this version, the winning ratio has been decreased, but the Risk to Reward Ratio (RRR) has been set to be better than the previous version.
This is a technical trading strategy for Ethereum ( BINANCE:ETHUSDT ). We built and developed it on MetaEditor and optimized it with MetaTrader optimizer.
The main indicators are Donchian Channel, Oscillator of ROC , Bears Power, Balance of Power , and Simple Moving Average ( SMA ). Default values in the input panel are the best combination of these indicators, but you can change any of them and try it for better results.
Please notice that this strategy has been optimized on the 1-minute chart of Ethereum .
For each position, you can see the Take Profit (TP) and Stop Loss (SL) levels. Also, you can find the values of mentioned TP and SL in points from the input panel of the script.
Attention: The price of Ethereum has 2 decimal places.
Therefore, 3000 points for TP means 30 USDT for trading 1 BINANCE:ETHUSDT .
Take Profit On Trend (by BHD_Trade_Bot)The purpose of strategy is to detect long-term uptrend and short-term downtrend so that you can easy to take profit.
The strategy also using BHD unit to detect how big you win and lose, so that you can use this strategy for all coins without worry about it have different percentage of price change.
ENTRY
The buy order is placed on assets that have long-term uptrend and short-term downtrend:
- Long-term uptrend condition: ema200 is going up (rsi200 greater than 51)
- Short-term downtrend condition: 2 last candles are down price (use candlestick for less delay)
CLOSE
The sell order is placed when take profit or stop loss:
- Take profit: price increase 1 BHD unit
- Stop loss: price decrease 2 BHD units
The strategy use $15 and trading fee is 0.1% for each order. So that, in the real-life, if you are using trade bot, it will need $1500 for trading 100 coins at the same time.
Pro tip : The 1-hour time frame for altcoin/USDT has the best results on average.
3xATR + EMA 260 + TP SL By NussaraStrategy backtest for 3X ATR + EMA 260
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)
Average True Range
Average True Range ("ATR") was introduced by J. Welles Wilder in his 1978 book New Concepts In Technical Trading Systems. ATR is a measure of volatility for a stock or index
Calculation
ATR = (Previous ATR * (n - 1) + TR) / n
Where:
ATR = Average True Range
n = number of periods or bars
TR = True Range
The True Range for today is the greatest of the following:
Today's high minus today's low
The absolute value of today's high minus yesterday's close
The absolute value of today's low minus yesterday's close
3X ATR + EMA 260 Formula
1. ATR it indicates the market has a fluctuation. An indicator will check bar (High-Low) > 3 x ATR
2. EMA 260 identify the market uptrend or downtrend
- if condition (1) is true and the price closed above the EMA260 it’s an uptrend. An indicator will enter a long position.
- if condition (1) is true and the price closed below the EMA260 it’s a downtrend. An indicator will enter a short position.
Risk to Reward Ratio = 1:1.5
Stop loss = open price of entry position
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.
PSAR + EMA/TEMA/RSI/OBVThe Parabolic Stop-and-Reservse (PSAR) is a trend indicator, intended to capture reversal signals and show entry and exit points. The PSAR is bullish when the PSAR is below the candle body (usually indicated by a dot) and bearish when the PSAR is above the candle body. The PSAR generally only moves in the direction of the trend, making it useful for markets with an upward or downward trend, as well as swing markets. It is weaker when the market it sideways, as it can be prone to frequent flips (bull-to-bear or vice versa) in markets where a predominant trend is not present.
In order to combat the tendency for rapid swings in the PSAR, it is commonly paired with a second indicator. Often, this is a moving average (MA) to confirm the PSAR signal. Here is a common example:
PSAR + 2 EMAs: A trade would consider entering long when the PSAR is bullish and the fast EMA is above the short EMA.
PSAR + 3 EMAs: As above, but the trader could also add a very long EMA (200, for example) and use that as an additional filter.
In addition to using EMA, other MAs can be used and may be more appropriate to certain instruments and timeframes. Using TEMA, for example, may result in less lag but introduce more noise. Likewise, the Ehler's MAMA is an option.
Some traders use other indicators as PSAR confirmation signals, such as the relative strength index (RSI) on on-balance volume (OBV). The strategy is similar:
bullish PSAR + RSI oversold = consider long entry
bullish PSAR + OBV oscillator > 0 = consider long entry
The strategy presented here is based on my PSAR + EMA + TEMA study. Any of the above strategies are supported by this script:
1. The PSAR is the primary signal.
2. Confirmation is provided by any of the following: EMA , TEMA , Ehler's MAMA , RSI , or OBV.
3. You may use a third EMA (set to 200 as the default) to filter entries -- if used, the strategy will only show signals if the price is above the third (additional) EMA .
For example, a normal long signal would be a bullish PSAR + fast EMA > slow EMA + price > ema 200.
In addition, you may use a SL, which is set to the PSAR dots shown. You may also limit the backtesting dates. (Please note in the chart above, I do not have a limit on the trading dates. I believe this exaggerates the success of the strategy, but the house rules demand I not limit the timeframe to show you a more accurate picture.)
Vin's Playzone Strategy How it works
Playzone is a very simple system, utilizing just two exponential moving
averages. The 'Zones' in which different 'actions' should be taken is
highlighted with different colors on the chart. Calculations for the zones
are based on the relative position of price to the two EMA lines and the
relationship between the two EMAs
How to use
The basic method for using Playzone is to follow the green/red color.
Buy when bar closes in green.
Sell when bar closes in red.
Using it this way is safe but slow and is expected to have around 35-40%
accuracy, while yielding around 2-3 profit factors. The system works best
on larger time frames.
The more advanced method uses the zones to switch between different
trading system and biases, or in conjunction with other indicators.
example 1:
Buy when Yellow-Green and Bullish Divergence between price and RSI is visible,
if not Buy on Green and vise-versa
example 2:
Set up a long-biased grid and trade long only when actionzone is in green
change the bias to short when actionzone turns to te bearish side(red)
(Look at colors on a larger time frame)
"We let the market tell us what to do, Not to outguess what the market gonna do."
MTF C Strategy A
The Pearson coefficient is a type of correlation coefficient that represents the relationship between two variables that are measured on the same interval or ratio scale. It's a measure of the strength of the association between two continuous variables.
This script allows you to choose one or more sources as a curve, if several sources are chosen, their average is taken into account in an EMA or SMA of your choice. It is possible to have the average of all the curves and to add one or more other curves for an influence on the calculated average.
Then, on the basis of this curve a correlation is calculated from 8 time ranges which give 4 curves, it is on this basis that the conditions of entries in the trade and / or exits are based with the possibility of adding an RSI condition.
For some entries, it is possible to try the symmetrically opposite condition, ie the one that is used in shorts.
To make entry short work, you must activate an exit short option.
However, exit conditions are more flexible than entry conditions because they allow the inverse entry condition used and / or to use statistical indices such as CCI / RSI / ROC / BB as exit condition independently or combined way.
It should be noted that if a condition among those chosen is executed substantially first, it will predominate over the others (same for long / short entries).
In addition, it is possible to choose a stop loss as an exit condition, however, it is not possible to combine the other exit conditions with the stoploss at the same time. Credits to adolgov for the base of the stoploss script part.
You can combine several curves, just as it is possible to combine several types of trade entries / exits.
The strategy uses 100% of equity, it has not been configured in such a way that there is an order pyramid and the closings are done on a total equity basis.
You can configure a daily session interval, a limit of the number of daily trades, a limit of drawdown.
You can add comments for each execution of an opening / closing order respectively to the direction (long or short).
Each step of the configuration has a tip, a button that must be hovered over in order to have the information relating to the configuration.
EMR Strategy [H1 Backtesting]EMR Strategy base on EMA, MACD and RSI to supply signal on time frame H1.
Details of Rule as below:
===
1.EMA
+ Time frame: H1
+ Periods: 25, 100 (~ EMA 25 H4), 600 (~ EMA 25 D1)
===
2.MACD
+ Time frame: H1
+ Periods: 12,26,9
===
3.RSI
+ Time frame: H1
+ Periods: 14
===
4.Trading Rule
4.1.Long Position
+ MACD>0 and RSI>50 and close price moving above EMA 25
+ Close price crossed EMA 100 or crossed EMA 600 at the first time
4.2.Short Position
+ MACD<0 and RSI<50 and close price moving below EMA 25
+ Close price crossed EMA 100 or crossed EMA 600 at the first time
===
5.Money Management
+ This strategy concentrate into winrate.
+ So use trailing stop to protect your profits.
+ And use stoploss to avoid big loss on trades.