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.
Medie mobili
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.
ICHIMOKU Crypto Swing StrategyThis is a crypto swing strategy designed for timeframes bigger than 1h.
The main components are
ICHOMOKU
KDJ
Average High
Average Low
Rules for entry
For long: we have the ichimoku crosses between tenkan and baselines, we have a rising kdj line and at the same time we have a increase in the average high
For short: we have the ichimoku crosses between tenkan and baselines, we have a falling kdj line and at the same time we have an increase in the average low
Rules for exit
We exit when we have inverse conditions than the initial ones used for entry.
Caution
This strategy does not use a risk management, so be careful with it !
If you have any questions let me know !
Swing Stock Market Multi MA Correlation This is a swing strategy adapted to stock market using correlation with either SP500 or Nasdaq, so its best to trade stocks from this region.
Its components are
Correlation Candle
Fast moving average to choose from SMA , EMA , SMMA (RMA), WMA and VWMA
Medium moving Average to choose from SMA , EMA , SMMA (RMA), WMA and VWMA
Slow moving average to choose from SMA , EMA , SMMA (RMA), WMA and VWMA
Rules for entry
Long: fast ma > medium ma and medium ma > slow ma
Short: fast ma< medium ma and medium ma < slow ma.
Rules for exit
We exit when we receive an inverse condition.
Caution:
This strategy use no risk management inside, so be careful with it .
If you have any questions, let me know !
Webhook Starter Kit [HullBuster]
Introduction
This is an open source strategy which provides a framework for webhook enabled projects. It is designed to work out-of-the-box on any instrument triggering on an intraday bar interval. This is a full featured script with an emphasis on actual trading at a brokerage through the TradingView alert mechanism and without requiring browser plugins.
The source code is written in a self documenting style with clearly defined sections. The sections “communicate” with each other through state variables making it easy for the strategy to evolve and improve. This is an excellent place for Pine Language beginners to start their strategy building journey. The script exhibits many Pine Language features which will certainly ad power to your script building abilities.
This script employs a basic trend follow strategy utilizing a forward pyramiding technique. Trend detection is implemented through the use of two higher time frame series. The market entry setup is a Simple Moving Average crossover. Positions exit by passing through conditional take profit logic. The script creates ten indicators including a Zscore oscillator to measure support and resistance levels. The indicator parameters are exposed through 47 strategy inputs segregated into seven sections. All of the inputs are equipped with detailed tool tips to help you get started.
To improve the transition from simulation to execution, strategy.entry and strategy.exit calls show enhanced message text with embedded keywords that are combined with the TradingView placeholders at alert time. Thereby, enabling a single JSON message to generate multiple execution events. This is genius stuff from the Pine Language development team. Really excellent work!
This document provides a sample alert message that can be applied to this script with relatively little modification. Without altering the code, the strategy inputs can alter the behavior to generate thousands of orders or simply a few dozen. It can be applied to crypto, stocks or forex instruments. A good way to look at this script is as a webhook lab that can aid in the development of your own endpoint processor, impress your co-workers and have hours of fun.
By no means is a webhook required or even necessary to benefit from this script. The setups, exits, trend detection, pyramids and DCA algorithms can be easily replaced with more sophisticated versions. The modular design of the script logic allows you to incrementally learn and advance this script into a functional trading system that you can be proud of.
Design
This is a trend following strategy that enters long above the trend line and short below. There are five trend lines that are visible by default but can be turned off in Section 7. Identified, in frequency order, as follows:
1. - EMA in the chart time frame. Intended to track price pressure. Configured in Section 3.
2. - ALMA in the higher time frame specified in Section 2 Signal Line Period.
3. - Linear Regression in the higher time frame specified in Section 2 Signal Line Period.
4. - Linear Regression in the higher time frame specified in Section 2 Signal Line Period.
5. - DEMA in the higher time frame specified in Section 2 Trend Line Period.
The Blue, Green and Orange lines are signal lines are on the same time frame. The time frame selected should be at least five times greater than the chart time frame. The Purple line represents the trend line for which prices above the line suggest a rising market and prices below a falling market. The time frame selected for the trend should be at least five times greater than the signal lines.
Three oscillators are created as follows:
1. Stochastic - In the chart time frame. Used to enter forward pyramids.
2. Stochastic - In the Trend period. Used to detect exit conditions.
3. Zscore - In the Signal period. Used to detect exit conditions.
The Stochastics are configured identically other than the time frame. The period is set in Section 2.
Two Simple Moving Averages provide the trade entry conditions in the form of a crossover. Crossing up is a long entry and down is a short. This is in fact the same setup you get when you select a basic strategy from the Pine editor. The crossovers are configured in Section 3. You can see where the crosses are occurring by enabling Show Entry Regions in Section 7.
The script has the capacity for pyramids and DCA. Forward pyramids are enabled by setting the Pyramid properties tab with a non zero value. In this case add on trades will enter the market on dips above the position open price. This process will continue until the trade exits. Downward pyramids are available in Crypto and Range mode only. In this case add on trades are placed below the entry price in the drawdown space until the stop is hit. To enable downward pyramids set the Pyramid Minimum Span In Section 1 to a non zero value.
This implementation of Dollar Cost Averaging (DCA) triggers off consecutive losses. Each loss in a run increments a sequence number. The position size is increased as a multiple of this sequence. When the position eventually closes at a profit the sequence is reset. DCA is enabled by setting the Maximum DCA Increments In Section 1 to a non zero value.
It should be noted that the pyramid and DCA features are implemented using a rudimentary design and as such do not perform with the precision of my invite only scripts. They are intended as a feature to stress test your webhook endpoint. As is, you will need to buttress the logic for it to be part of an automated trading system. It is for this reason that I did not apply a Martingale algorithm to this pyramid implementation. But, hey, it’s an open source script so there is plenty of room for learning and your own experimentation.
How does it work
The overall behavior of the script is governed by the Trading Mode selection in Section 1. It is the very first input so you should think about what behavior you intend for this strategy at the onset of the configuration. As previously discussed, this script is designed to be a trend follower. The trend being defined as where the purple line is predominately heading. In BiDir mode, SMA crossovers above the purple line will open long positions and crosses below the line will open short. If pyramiding is enabled add on trades will accumulate on dips above the entry price. The value applied to the Minimum Profit input in Section 1 establishes the threshold for a profitable exit. This is not a hard number exit. The conditional exit logic must be satisfied in order to permit the trade to close. This is where the effort put into the indicator calibration is realized. There are four ways the trade can exit at a profit:
1. Natural exit. When the blue line crosses the green line the trade will close. For a long position the blue line must cross under the green line (downward). For a short the blue must cross over the green (upward).
2. Alma / Linear Regression event. The distance the blue line is from the green and the relative speed the cross is experiencing determines this event. The activation thresholds are set in Section 6 and relies on the period and length set in Section 2. A long position will exit on an upward thrust which exceeds the activation threshold. A short will exit on a downward thrust.
3. Exponential event. The distance the yellow line is from the blue and the relative speed the cross is experiencing determines this event. The activation thresholds are set in Section 3 and relies on the period and length set in the same section.
4. Stochastic event. The purple line stochastic is used to measure overbought and over sold levels with regard to position exits. Signal line positions combined with a reading over 80 signals a long profit exit. Similarly, readings below 20 signal a short profit exit.
Another, optional, way to exit a position is by Bale Out. You can enable this feature in Section 1. This is a handy way to reduce the risk when carrying a large pyramid stack. Instead of waiting for the entire position to recover we exit early (bale out) as soon as the profit value has doubled.
There are lots of ways to implement a bale out but the method I used here provides a succinct example. Feel free to improve on it if you like. To see where the Bale Outs occur, enable Show Bale Outs in Section 7. Red labels are rendered below each exit point on the chart.
There are seven selectable Trading Modes available from the drop down in Section 1:
1. Long - Uses the strategy.risk.allow_entry_in to execute long only trades. You will still see shorts on the chart.
2. Short - Uses the strategy.risk.allow_entry_in to execute short only trades. You will still see long trades on the chart.
3. BiDir - This mode is for margin trading with a stop. If a long position was initiated above the trend line and the price has now fallen below the trend, the position will be reversed after the stop is hit. Forward pyramiding is available in this mode if you set the Pyramiding value in the Properties tab. DCA can also be activated.
4. Flip Flop - This is a bidirectional trading mode that automatically reverses on a trend line crossover. This is distinctively different from BiDir since you will get a reversal even without a stop which is advantageous in non-margin trading.
5. Crypto - This mode is for crypto trading where you are buying the coins outright. In this case you likely want to accumulate coins on a crash. Especially, when all the news outlets are talking about the end of Bitcoin and you see nice deep valleys on the chart. Certainly, under these conditions, the market will be well below the purple line. No margin so you can’t go short. Downward pyramids are enabled for Crypto mode when two conditions are met. First the Pyramiding value in the Properties tab must be non zero. Second the Pyramid Minimum Span in Section 1 must be non zero.
6. Range - This is a counter trend trading mode. Longs are entered below the purple trend line and shorts above. Useful when you want to test your webhook in a market where the trend line is bisecting the signal line series. Remember that this strategy is a trend follower. It’s going to get chopped out in a range bound market. By turning on the Range mode you will at least see profitable trades while stuck in the range. However, when the market eventually picks a direction, this mode will sustain losses. This range trading mode is a rudimentary implementation that will need a lot of improvement if you want to create a reliable switch hitter (trend/range combo).
7. No Trade. Useful when setting up the trend lines and the entry and exit is not important.
Once in the trade, long or short, the script tests the exit condition on every bar. If not a profitable exit then it checks if a pyramid is required. As mentioned earlier, the entry setups are quite primitive. Although they can easily be replaced by more sophisticated algorithms, what I really wanted to show is the diminished role of the position entry in the overall life of the trade. Professional traders spend much more time on the management of the trade beyond the market entry. While your trade entry is important, you can get in almost anywhere and still land a profitable exit.
If DCA is enabled, the size of the position will increase in response to consecutive losses. The number of times the position can increase is limited by the number set in Maximum DCA Increments of Section 1. Once the position breaks the losing streak the trade size will return the default quantity set in the Properties tab. It should be noted that the Initial Capital amount set in the Properties tab does not affect the simulation in the same way as a real account. In reality, running out of money will certainly halt trading. In fact, your account would be frozen long before the last penny was committed to a trade. On the other hand, TradingView will keep running the simulation until the current bar even if your funds have been technically depleted.
Entry and exit use the strategy.entry and strategy.exit calls respectfully. The alert_message parameter has special keywords that the endpoint expects to properly calculate position size and message sequence. The alert message will embed these keywords in the JSON object through the {{strategy.order.alert_message}} placeholder. You should use whatever keywords are expected from the endpoint you intend to webhook in to.
Webhook Integration
The TradingView alerts dialog provides a way to connect your script to an external system which could actually execute your trade. This is a fantastic feature that enables you to separate the data feed and technical analysis from the execution and reporting systems. Using this feature it is possible to create a fully automated trading system entirely on the cloud. Of course, there is some work to get it all going in a reliable fashion. Being a strategy type script place holders such as {{strategy.position_size}} can be embedded in the alert message text. There are more than 10 variables which can write internal script values into the message for delivery to the specified endpoint.
Entry and exit use the strategy.entry and strategy.exit calls respectfully. The alert_message parameter has special keywords that my endpoint expects to properly calculate position size and message sequence. The alert message will embed these keywords in the JSON object through the {{strategy.order.alert_message}} placeholder. You should use whatever keywords are expected from the endpoint you intend to webhook in to.
Here is an excerpt of the fields I use in my webhook signal:
"broker_id": "kraken",
"account_id": "XXX XXXX XXXX XXXX",
"symbol_id": "XMRUSD",
"action": "{{strategy.order.action}}",
"strategy": "{{strategy.order.id}}",
"lots": "{{strategy.order.contracts}}",
"price": "{{strategy.order.price}}",
"comment": "{{strategy.order.alert_message}}",
"timestamp": "{{time}}"
Though TradingView does a great job in dispatching your alert this feature does come with a few idiosyncrasies. Namely, a single transaction call in your script may cause multiple transmissions to the endpoint. If you are using placeholders each message describes part of the transaction sequence. A good example is closing a pyramid stack. Although the script makes a single strategy.close() call, the endpoint actually receives a close message for each pyramid trade. The broker, on the other hand, only requires a single close. The incongruity of this situation is exacerbated by the possibility of messages being received out of sequence. Depending on the type of order designated in the message, a close or a reversal. This could have a disastrous effect on your live account. This broker simulator has no idea what is actually going on at your real account. Its just doing the job of running the simulation and sending out the computed results. If your TradingView simulation falls out of alignment with the actual trading account lots of really bad things could happen. Like your script thinks your are currently long but the account is actually short. Reversals from this point forward will always be wrong with no one the wiser. Human intervention will be required to restore congruence. But how does anyone find out this is occurring? In closed systems engineering this is known as entropy. In practice your webhook logic should be robust enough to detect these conditions. Be generous with the placeholder usage and give the webhook code plenty of information to compare states. Both issuer and receiver. Don’t blindly commit incoming signals without verifying system integrity.
Setup
The following steps provide a very brief set of instructions that will get you started on your first configuration. After you’ve gone through the process a couple of times, you won’t need these anymore. It’s really a simple script after all. I have several example configurations that I used to create the performance charts shown. I can share them with you if you like. Of course, if you’ve modified the code then these steps are probably obsolete.
There are 47 inputs divided into seven sections. For the most part, the configuration process is designed to flow from top to bottom. Handy, tool tips are available on every field to help get you through the initial setup.
Step 1. Input the Base Currency and Order Size in the Properties tab. Set the Pyramiding value to zero.
Step 2. Select the Trading Mode you intend to test with from the drop down in Section 1. I usually select No Trade until I’ve setup all of the trend lines, profit and stop levels.
Step 3. Put in your Minimum Profit and Stop Loss in the first section. This is in pips or currency basis points (chart right side scale). Remember that the profit is taken as a conditional exit not a fixed limit. The actual profit taken will almost always be greater than the amount specified. The stop loss, on the other hand, is indeed a hard number which is executed by the TradingView broker simulator when the threshold is breached.
Step 4. Apply the appropriate value to the Tick Scalar field in Section 1. This value is used to remove the pipette from the price. You can enable the Summary Report in Section 7 to see the TradingView minimum tick size of the current chart.
Step 5. Apply the appropriate Price Normalizer value in Section 1. This value is used to normalize the instrument price for differential calculations. Basically, we want to increase the magnitude to significant digits to make the numbers more meaningful in comparisons. Though I have used many normalization techniques, I have always found this method to provide a simple and lightweight solution for less demanding applications. Most of the time the default value will be sufficient. The Tick Scalar and Price Normalizer value work together within a single calculation so changing either will affect all delta result values.
Step 6. Turn on the trend line plots in Section 7. Then configure Section 2. Try to get the plots to show you what’s really happening not what you want to happen. The most important is the purple trend line. Select an interval and length that seem to identify where prices tend to go during non-consolidation periods. Remember that a natural exit is when the blue crosses the green line.
Step 7. Enable Show Event Regions in Section 7. Then adjust Section 6. Blue background fills are spikes and red fills are plunging prices. These measurements should be hard to come by so you should see relatively few fills on the chart if you’ve set this up as intended. Section 6 includes the Zscore oscillator the state of which combines with the signal lines to detect statistically significant price movement. The Zscore is a zero based calculation with positive and negative magnitude readings. You want to input a reasonably large number slightly below the maximum amplitude seen on the chart. Both rise and fall inputs are entered as a positive real number. You can easily use my code to create a separate indicator if you want to see it in action. The default value is sufficient for most configurations.
Step 8. Turn off Show Event Regions and enable Show Entry Regions in Section 7. Then adjust Section 3. This section contains two parts. The entry setup crossovers and EMA events. Adjust the crossovers first. That is the Fast Cross Length and Slow Cross Length. The frequency of your trades will be shown as blue and red fills. There should be a lot. Then turn off Show Event Regions and enable Display EMA Peaks. Adjust all the fields that have the word EMA. This is actually the yellow line on the chart. The blue and red fills should show much less than the crossovers but more than event fills shown in Step 7.
Step 9. Change the Trading Mode to BiDir if you selected No Trades previously. Look on the chart and see where the trades are occurring. Make adjustments to the Minimum Profit and Stop Offset in Section 1 if necessary. Wider profits and stops reduce the trade frequency.
Step 10. Go to Section 4 and 5 and make fine tuning adjustments to the long and short side.
Example Settings
To reproduce the performance shown on the chart please use the following configuration: (Bitcoin on the Kraken exchange)
1. Select XBTUSD Kraken as the chart symbol.
2. On the properties tab set the Order Size to: 0.01 Bitcoin
3. On the properties tab set the Pyramiding to: 12
4. In Section 1: Select “Crypto” for the Trading Model
5. In Section 1: Input 2000 for the Minimum Profit
6. In Section 1: Input 0 for the Stop Offset (No Stop)
7. In Section 1: Input 10 for the Tick Scalar
8. In Section 1: Input 1000 for the Price Normalizer
9. In Section 1: Input 2000 for the Pyramid Minimum Span
10. In Section 1: Check mark the Position Bale Out
11. In Section 2: Input 60 for the Signal Line Period
12. In Section 2: Input 1440 for the Trend Line Period
13. In Section 2: Input 5 for the Fast Alma Length
14. In Section 2: Input 22 for the Fast LinReg Length
15. In Section 2: Input 100 for the Slow LinReg Length
16. In Section 2: Input 90 for the Trend Line Length
17. In Section 2: Input 14 Stochastic Length
18. In Section 3: Input 9 Fast Cross Length
19. In Section 3: Input 24 Slow Cross Length
20. In Section 3: Input 8 Fast EMA Length
21. In Section 3: Input 10 Fast EMA Rise NetChg
22. In Section 3: Input 1 Fast EMA Rise ROC
23. In Section 3: Input 10 Fast EMA Fall NetChg
24. In Section 3: Input 1 Fast EMA Fall ROC
25. In Section 4: Check mark the Long Natural Exit
26. In Section 4: Check mark the Long Signal Exit
27. In Section 4: Check mark the Long Price Event Exit
28. In Section 4: Check mark the Long Stochastic Exit
29. In Section 5: Check mark the Short Natural Exit
30. In Section 5: Check mark the Short Signal Exit
31. In Section 5: Check mark the Short Price Event Exit
32. In Section 5: Check mark the Short Stochastic Exit
33. In Section 6: Input 120 Rise Event NetChg
34. In Section 6: Input 1 Rise Event ROC
35. In Section 6: Input 5 Min Above Zero ZScore
36. In Section 6: Input 120 Fall Event NetChg
37. In Section 6: Input 1 Fall Event ROC
38. In Section 6: Input 5 Min Below Zero ZScore
In this configuration we are trading in long only mode and have enabled downward pyramiding. The purple trend line is based on the day (1440) period. The length is set at 90 days so it’s going to take a while for the trend line to alter course should this symbol decide to node dive for a prolonged amount of time. Your trades will still go long under those circumstances. Since downward accumulation is enabled, your position size will grow on the way down.
The performance example is Bitcoin so we assume the trader is buying coins outright. That being the case we don’t need a stop since we will never receive a margin call. New buy signals will be generated when the price exceeds the magnitude and speed defined by the Event Net Change and Rate of Change.
Feel free to PM me with any questions related to this script. Thank you and happy trading!
CFTC RULE 4.41
These results are based on simulated or hypothetical performance results that have certain inherent limitations. Unlike the results shown in an actual performance record, these results do not represent actual trading. Also, because these trades have not actually been executed, these results may have under-or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated or hypothetical trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to these being shown.
MarketGod for Tradingview(strategy)Fully Open Source Tv Market God Strategy. Good Luck
Strategy Description
MarketGod can be applied to any market, with any time-frame associated to it. The signals relay the alert at the close of the period, and the painted alert is then available to users to see on the chart or even set notifications for via tradingview's alert system. We recommend that users implement marketgod on their preferred time frames for trading, which for us is the 1h, 4h, 6h, 1D and above TFs.
MarketGod Versioning
The versions included with this release are the following
MarketGod v1
MarketGod v2
MarketGod v3
MarketGod v4
MarketGod v5
MarketGod v6
MarketGod v7
MarketGod v8
MarketGodx²
Ichimoku God
Suggested Uses
• MarketGod will inevitably produce false positives. We've taken steps to reduce this but we highly suggest you add this as a component of your strategy, not an end all be all
• That said, please do not feel the need to fire a trade based solely on a marketgod signal, or to every signal it fires.
• MarketGod users should backtest their strategy using OHLC candles for best results
• Heikin Ashi candles were recomended in the past, and we have eliminated the need for them, meaning that traditional candlestick inputs will yield the highest results.
• MarketGod will always give stronger alerts on higher TF's. If the 1-Day has fired a given signal and the 30 min or similar fire the opposite signal, know that the overall trend is still likely downward. Same concept applies to all timeframes on this tool.
Adjusting the Filter Settings
This tool has a noise filter for users to adjust.
The filter is a percentage based calculation, between significant points in time. The filter ranges between .5 and 25, with .5 increments
• For lower TFs ( IE Intraday), keep the filter set between .5-5
• Mid-TFs (4H,6H,12H,1D), the recommended range is between 5.5-10
• Higher TFs (3D and Higher), look for approx 11-20 range
Customizations
Customize the indicator by adjusting the colors in the style pane. Additionally, users can change the plots into labels with the price of close added to them, or a few other label text options, listed in the 'inputs' panel, below the filter adjustments. Users can also opt to turn the strategy orders as well, as this version will have them printed.
Strategy Performance Interpretation
Its important to understand the only metric that should be relevant is not the win %, as many may initially think. Alternatively, the only metric that matters in the end is your take home profit... meaning the profit one fees and taxes are accounted for. In our example here, the % brought back since the beginning of our window of 2018 is around 47% for $10,000 initial capital and 10% traded per position. Many are ignorant to the take home profit aspect as they focus solely on the winning %, which is ultimately incorrect approach to trading as a whole. as long as we maintain +30% (our goal minimum), the outcome being in the green, is our goal.
Initial templateI have created a starting template for strategies.
It allows quick control of turning on/off long and short conditions, or disabling them entirely.
It includes trade filters for strategy equity and volatility. If there is not enough volatility it will not trade, or if the strategy equity is below the equity ema it will not trade.
It has standard stops and limits.
Simply change the long/short conditions!
Macd Divergence + MTF EMA MACD Divergence + Multi Time Frame EMA
This Strategy uses 3 indicators: the Macd and two emas in different time frames
The configuration of the strategy is:
Macd standar configuration (12, 26, 9) in 1H resolution
10 periods ema, in 1H resolution
5 periods ema, in 15 minutes resolution
We use the two emas to filter for long and short positions.
If 15 minutes ema is above 1H ema, we look for long positions
If 15 minutes ema is below 1H ema, we look for short positions
We can use an aditional filter using a 100 days ema, so when the 15' and 1H emas are above the daily ema we take long positions
Using this filter improves the strategy
We wait for Macd indicator to form a divergence between histogram and price
If we have a bullish divergence, and 15 minutes ema is above 1H ema, we wait for macd line to cross above signal line and we open a long position
If we have a bearish divergence, and 15 minutes ema is below 1H ema, we wait for macd line to cross below signal line and we open a short position
We close both position after a cross in the oposite direction of macd line and signal line
Also we can configure a Take profit parameter and a trailing stop loss
Traffic Lights Strategy4HS Crypto Market Strategy
This strategy uses 4 ema to get Long or Short Signals
Length are: 4, 9, 18, 100
We take long positions when the order of the emas is the following:
green > yellow > red (As the color of Traffic Lights) and they are above white ema (Used as a filter for long positions)
We take short positions when the order of the emas is the following:
green < yellow < red (As the color of inverse Traffic Lights) and they are below white ema (Used as a filter for short positions)
Enable Long and/or Short Positions in settings
Enable Profit and Stop in strategy settings with different percentage to backtest the strategy. Also if it is better to use a Traditional Stop Loss or a Trailing Stop Loss based on ATR
Change ema filter resolution in settings for better strategy performance
This Strategy was tested on Crypto Market with good results in assets as BTC, ETH, BNB, ADA, LTC, XLM, BCH, among others
Feel free to optimize this strategy, optimizing its parameters. Each asset has its own "personality".
MACD Divergence + MTF EMA Reversal by @DaviddTechMACD Divergence + MTF Indicator / EMA by @DaviddTech
Long :
* Find Divergence in the MACD line
* Multi Time Frame EMA 50 15 minutes above Multi Time Frame EMA 50 60 minutes
* MACD and Signal line are below the 0 line
* MACD crosses above the Signal line
Short :
* Find Divergence in the MACD line
* Multi Time Frame EMA 50 15 minutes below Multi Time Frame EMA 50 60 minutes
* MACD and Signal line are above the 0 line
* MACD crosses below the Signal line
EMA usages instead.
* I found that as a strategy this could work better with the 200 EMA line.
* Trends reversals also gave good results.
Trend Reversals :
* Price is below EMA 200 - Take LONG on divergence.
* Price is above EMA 200 - Take SHORT on divergence.
** You may need to turn off MTF ema when using the Simple EMA 200
WARNING:
- For purpose educate only - My mission is to debunk fake strategies with code to find THE ONE.
- Plots EMAs and other values on chart.
- This script to change bars colors.
Ultimate Scalper by @DaviddTechThis script turns out to be a great scalper for Crypto.
Long
* Looks for a pullback in MACD
* EMA 50 over EMA 200
Short
* Looks for a pullback in MACD
* EMA 50 below EMA 200
VWAP and RSI can be used for confluence.
WARNING:
- For purpose educate only - My mission is to debunk fake strategies with code to find THE ONE.
- Plots EMAs and other values on chart.
- This script to change bars colours.
Release Notes: Change the description tabs
MACD 5 iN 1 [Pro-Tool]introducing MACD Which has different indicators inside,
And not only that, five different strategies have also been included in this indicator.
Strategy №1:👉 MACD Crossover Signal Line
Strategy №2:👉 MACD Crossover + MACD Overbought Section (for ignore false Crossover signals)
Strategy №3:👉 MACD Crossover + Market Close should b greater tha MOVING AVERAGE
Strategy №4:👉 MACD Crossover + Market Close should b greater tha MOVING AVERAGE ZONE
Strategy №5:👉 MACD Crossover + RSI Close should b greater tha 50 Level (or whatever level you choose)
also 5 types of MOVING AVERAGE you can choose
1: Simple Moving Average ( SMA )
2: Exponential Moving Average ( EMA )
3: Weighted Moving Average ( WMA )
4: Volume Weighted Moving Average ( VWMA )
5: Relative Moving Average (RMA)
and you can customize MACD Colors + Widths + Signals and MACD lines, and also can Hide or Unhide Histogram / Cross Sign / MACD Zone Color
hope so you like it, 🥰
Investing and trading in cryptocurrencies is very risky, as anything can happen at any time.
***NOT FINANCIAL, LEGAL, OR TAX ADVICE! JUST OPINION! I AM NOT AN EXPERT! I DO NOT GUARANTEE A PARTICULAR OUTCOME I HAVE NO INSIDE KNOWLEDGE! YOU NEED TO DO YOUR OWN RESEARCH AND MAKE YOUR OWN DECISIONS! THIS IS JUST EDUCATION & ENTERTAINMENT! USE ALTCOIN DAILY AS A STARTING OFF POINT!
PSAR + MACD + EMA StrategyIndicators used:
MACD
EMA (default value 200)
PSAR
Entry Conditions for Long
- Price must be above the EMA 200
- PSAR dot below price
- Crossover on the MACD
Entry Conditions for Short
- Price must be below the EMA 200
- PSAR dot above price
- Cross under on the MACD
Stop Loss & Take Proft
Stop loss is set to go on the first formed PSAR dot from the entry
The take profit by default is set to 1.1 of the risk, this is changeable in the settings
Settings
- There is an option to change the backtest range,
- Options to customise MACD entry conditions
- Options to change the MACD, PSAR and EMA inputs
- Options to Plot Take profit/Stop loss as well as the other indicators
Channel Strategy 0921Channel Strategy.
English:
Conditions for buying: in the channel strategy, when the price of an asset touches the lower MA of the channel line, you need to buy in Long, then you need to wait for the price to turn in the direction we need to the upper MA of the channel line. When the price crosses the upper MA line, it is necessary to close all positions on the deal.
The strategy provides safety orders to average our price in order to get more profit at the exit from the trade.
This strategy also provides parameters such as:
1. MA Length
2. Source: different calculations of candlestick closing for the channel
3. Mult: indent of channel line
4. Coeff: channel width shift
5. Order Size: order selection: fixed order /% of the deposit amount
6. Base Order: the amount of the base order
7. Safety Order: amount of the safety order
8. Max Safety Orders: maximum number of safety orders
9. Price Deviation: price deviation for placing a safety order (% of the value of the initial order)
10. Safety Order: multiplier step of safety orders
In the strategy settings, we use 0.06% commission for the futures market.
Conditions for entering a trade and exiting trades:
Entry into a trade is always on a limit order with a commission of 0.02%
Deals are always closed on the market with a commission of 0.04%
This strategy is suitable for any pair of crypto assets with individual settings for a specific pair.
In this strategy, the settings are adapted for the MATICUSDTPERP TF 15M pair on the Binance exchange.
The strategy also works for Algo Trading via API keys via personal webhook signals.
Russian:
Условия для покупки: в канальной стратегии когда цена актива касается нижней MA линии канала нужно покупать в Long, далее необходимо ждать когда цена развернется в нужную нам сторону к верхней MA линии канала. Когда цена пересекает верхнюю MA линию необходимо закрыть все позиции по сделке.
В стратегии предусмотрены страховочные ордера для усреднения нашей цены, чтобы получить больше прибыль на выходе из сделки.
В данной стратегии также предусмотрены параметры такие как:
1. Длина MA
2. Source: разные подсчёты закрытия свечей для канала
3. Mult: отступ линии канала
4. Coeff: сдвиг ширины канала
5. Order Size: выбор ордера: фиксированный ордер / % от суммы депозита
6. Base Order: сумма базового ордера
7. Safety Order: сумма страховочного ордера
8. Max Safety Orders: максимальное количество страховочных ордеров
9. Price Deviation: отклонение цены для выставления страховочного ордера (% от стоимости начального ордера)
10. Safety Order: множитель шага страховочных ордеров
В настройках стратегии комиссию мы используем 0.06% для фьючерского рынка.
Условия входа в сделку и выхода из сделок:
Вход в сделку всегда по лимит ордер с комиссией 0.02%
Закрытие сделок происходит всегда по маркету с комиссией 0.04%
Данная стратегия подходит под любую пару крипто актива с индивидуальными настройками под определенную пару.
В данной стратегии настройки адаптированы под пару MATICUSDTPERP ТФ 15М биржа Binance.
Стратегия так же работает под Algo Trading через API ключи через персональные сигналы webhook.