RELATIVE VALUE TRADE MANAGEMENT WEBHOOKThis script it's created to send open-close signals via webhook. It allows you to open a relative value position based in the relative graph. You can set the TP and SL levels and the script will send the signal to your exchange.
Due a pine limitations it is necessary apply the script in the 2 different actives and set the alerts. You can just do the relative analysis and then go to the first asset and set the script. Create your alert and then just go to the other asset and create the alert. It doesn't necessary to change anything in the script because the levels are the same.
It is also possible to do the analysis using the script, deploying the relative graph, but could be annoying sometimes due scales.
Positions will be placed at close always.
THIS IS IMPORTANT: I use Zignaly as a exhange so if you are using Binance or other YOU MUST CHANGE the code. If you know the JSON format that It requires would be easy.
Here is tips in all the important imputs. But let me explain the most important.
The MANDATORY fields are:
Ticker IDs: Here you must write the EXACT ID code for the active. Caps included.
Example : BINANCE:SUSHIUSDTPERP
It is also important select the correct market side. If you want to be long of ANY active you must write that ID in the LONG ID. For short positions is the same.
Time frame: Here you can select the time frame of the graph (not the current active graph, I mean the relative one.) The orders will be send using that time frame. I recommend to do the analysis in other window and then use the script to trigger the order in the time frame that you want.
Money management: In these fields you can select the qty that you will lose if the SL level is reach. Based in a determinated amount of currency or in a % of your capital.
Dates: It is important to select the start date. If the order is already open, we must look for the moment where the activation price was reached. If the order is unopened it is better to select the current date, so the order will be triggered when the entry level is reached.
Ids: If you have current open position you can set here that ID to send the correct order to the exchange.
To set the alert just call the function {{{strategy.order.alert_message}}}
Indicators and strategies
COT + ema + aux tickerPurpose: Create a script for backtesting the idea that COT can steer weekly Bias on Forex Market.
How does it works: the script use Commercials Delta Conctract, EMA of the selected ticker, EMA of 2 auxiliary tickers (e.g. correlated ticker) to generates buy and sell signals, it allows to include or not each of these.
If you use all the indicator, The buy or sell signals are generated following that rules:
(Example for buy signals on GBPCAD)
1) Commercials add net contract to GBP futures + remove net contract to CAD
2) EMA of GBPCAD is rising
3) EMA of 1st aux ticker is rising (or decline if select inv option)
4) EMA of 2nd aux ticker is rising (or decline if select inv option)
The scripts set the stop at low of the week for long orders and high of the week for shorts.
The exit strategy is to exit at first week of profit
How could you use it:
1) Choose your FX Ticker e.g. GBPCAD and set 1W TimeFrame
2) Select ticker in the strategy setting, remember to select the currency in right order, if you want to study GBP CAD 1st currency is GBP and 2nd CAD
3) Choose if you want to use EMA (and its period of calculation)
4) Choose if you want to use a aux ticker, the direction, and the relative ema period
What could be better;
1) you can just buy on begin of the week.
2) the exit strategy isn't best you can do
3) No level of delta contract is consider, its generate a buy signial also for 1 contract in the right direction
For any question, suggestion of improvemet, ideas, insult:) write to me
It all started from a script i find here on tradingview that extract COT data. Don't remember the name of that guy but Thanks a lot.
My English isn't perfect but i hope you can understand as well.
Swing Failure Reversal StrategyThis strategy is using Swing Failure Patterns as a reversion indicator.
The strategy automatically adapts itself to the timeframe of the current chart.
Swing Failure Pattern occurs when the price trend fails to set new highs in uptrend or meet new lows in a downtrend. This pattern helps traders decide when to enter and exit the market. Usually, traders enter in the downtrend i.e. lower price highs and lower price lows, and exit in the uptrend situation i.e. higher price highs and higher price lows. Thus, traders go against the current trend. This helps the traders take advantage of early trend reversal indicators.
Types of Failure Swing :
Failure Swing Top: This occurs when the stock price goes higher whereas the RSI fails to make a higher high and falls below the recent fail point. The Fail Point is where the RSI line is below the recent swing low. This Failure Swing indicates a short position.
Failure Swing Bottom: This occurs when the stock price gets lower whereas RSI fails to make a lower low and rises over the recent fail point. Fail point is the point where the RSI line is above the recent swing high. This Failure Swing indicates a long position.
DELAYED FIBOfibo delayed and real value wave design. Burada bandlar arası dalgalanmadan faydalanılmakta.
Strategy Crypto -- double your capitalBTCUSD -- 5 min
BUY POSITION
1 : The price is above the hull suite indicator
2 : The hull suite indicator is green
3 : The volume oscillator indicator is above 0
4 : A new blue candle should appear on the QQE MOD indicator
SELL POSITION
1 : The price is bellow the hull suite indicator
2 : The hull suite indicator is red
3 : The volume oscillator indicator is above 0
4 : A new red candle should appear on the QQE MOD indicator
Joker Trailing TP BotTrailing Take Profit is used by the traders to increase their gains when the prices moves in a favorable direction. Let’s have a look at what is Trailing Take Profit and how it works.
What Is a Trailing Take Profit?
Trailing Take Profit is a term largely used in crypto, whereas you may encounter the term Trailing Stop in traditional trading describing almost the same thing, So what’s the difference between Trailing Take Profit and Trailing Stop? Trailing Stop is a type of Stop Loss automatically moving in the same direction as the asset’s price. Trailing Take Profit is nothing else than Trailing Stop activated after initial Take Profit is reached.
The main difference between these two is that Trailing Take Profit takes the profit in any case (altough it might be later annihilated by Trailing Stop). Thus, Trailing Take Profit reduces the risks that might’ve occurred using Trailing Stop alone. Trailing Take Profit is bound to the maximum of Take Profit price instead of just a price increase/decrease.
As you might notice, the terms Trailing Take Profit and Stop Loss are quite similar. To avoid confusion, in this article we will be talking about Trailing Take Profit as defined above.
Trailing Take Profit only moves in one direction. It is designed to lock in profit and limit losses. The trailing profit only moves up (in case of a long strategy) once the price has surpassed previous high and a new high has been established. If the trailing take profit moves up, it cannot move back down, thus securing the profit and preventing losses.
Trailing Take Profit allows the trade to remain open and continue to profit as long as the price is moving in the investor’s favor. If the price changes direction and the change surpasses the previously set percentage the order will be closed.
How Does it Work?
For example if you buy BTC at the price of 10000, if you set a Take Profit at 11000 and a Trailing Take Profit at 5% :
If the price goes up to 10500, nothing happens because the Take Profit at 11000 has not been reached.
Then if the BTC price goes up top 11000, a Stop Order at 10450 will be set.
Then if the BTC price goes down to 10500, the Stop Order stays at 104500.
Then if the BTC price goes up to 12000, the Stop Order moves to 11400.
Then if the BTC price goes down to 11000, the Stop Order at 11400 is executed.
You see that without Trailing Take Profit, the buy order would have been sold at 11000. Thus, a trader would miss an earning opportunity at 11400.
Chande Kroll Stop今天和大家分享Chande Kroll Stop 回测, 信号采用了上限线和下限线共通反向趋势而决定买卖信号,如果有新的构思能提高买卖信号欢迎在留言区发表你的建议,祝你交易开心!
[Pt] Premarket Breakout StrategyThis is a 1 trade per day strategy for trading SPY or QQQ index. By default, this is designed for 1 min time frame. This was an experimental script that seems to be profitable at the time of publication.
How it works:
Pre-market high and low is defined per trading day between 9:00 to 9:30 EST.
Then we looking for the first breakout on either PM high or PM low.
- Breakout high = long trade
- Breakout low = short trade
If long trade, we wait until Stochastic RSI D signal line to hit a lower threshold (18 by default). Then we enter long when K crosses above D line.
If short trade, we wait until Stochastic RSI D signal line to hit an upper threshold (82 by default). Then we enter short when K crosses below D line.
Stop loss for long
- set to PM low if entry is above PM high + %ATR buffer
- or set to PM range + %ATR buffer
Stop loss for short
- set to PM high if entry is below PM low + %ATR buffer
- or set to PM range + %ATR buffer
Profit target is set to 2x the risk by default.
*Note: Different Stochastic RSI lengths should be used if trading 5 min time frame. See tooltip.
Happy trading~~!
NSRDMKVICthis is a test indicator that evaluate the market and entry and exit positions gain fortune
sonu1997full banchod
Information technology (IT) companies will kick off the first-quarter earnings season in July amid expectations they will post strong revenue growth, offset by pressure on profit margins exerted by higher. wage costs. IT companies including Infosys and HCL Technologies are unlikely to change their full-year guidance despite concerns of a recession in the US and Europe, analysts said.
Major IT companies typically announce their earnings for the three months ended June in the first fortnight of July, with Infosys and Tata Consultancy Services leading the pack.
The earnings season follows a tumultuous quarter marked by worries over the Russia-Ukraine war, accelerating inflation and tightening of interest rates by global central banks to cool it, supply-chain disruptions, and tumbling financial markets.
IT stocks have fallen the most among sectors, with the Nifty IT index correcting 29 percent from its high in January. Higher valuations and rising fears of an economic slowdown, even recession, in the US and Europe, the biggest markets for IT companies, weighed on the sector
Short Swing Bearish MACD Cross (By Coinrule)This strategy is oriented towards shorting during downside moves, whilst ensuring the asset is trading in a higher timeframe downtrend, and exiting after further downside.
This script can work well on coins you are planning to hodl for long-term and works especially well whilst using an automated bot that can execute your trades for you. It allows you to hedge your investment by allocating a % of your coins to trade with, whilst not risking your entire holding. This mitigates unrealised losses from hodling as it provides additional cash from the profits made. You can then choose to hodl this cash, or use it to reinvest when the market reaches attractive buying levels. Alternatively, you can use this when trading contracts on futures markets where there is no need to already own the underlying asset prior to shorting it.
ENTRY
This script utilises the MACD indicator accompanied by the Exponential Moving Average (EMA) 450 to enter trades. The MACD is a trend following momentum indicator and provides identification of short-term trend direction. In this variation it utilises the 11-period as the fast and 26-period as the slow length EMAs, with signal smoothing set at 9.
The EMA 450 is used as additional confirmation to prevent the script from shorting when price is above this long-term moving average. Once price is above the EMA 450 the script will not open any shorts - preventing the rule from attempting to short uptrends. Due to this, this strategy is ideal for setting and forgetting.
The script will enter trades based on two conditions:
1) When the MACD signals a bearish cross. This occurs when the EMA 11 crosses below the EMA 26 within the MACD signalling the start of a potential downtrend.
2) Price has closed below the EMA 450. Price closing below this long-term EMA signals that the asset is in a sustained downtrend. Price breaking above this could indicate a bullish strength in which shorting would not be profitable.
EXIT
This script utilises a set take-profit and stop-loss from the entry of the trade. The take profit is set at 8% and the stop loss of 4%, providing a risk reward ratio of 2. This indicates the script will be profitable if it has a win ratio greater than 33%.
Take-Profit Exit: -8% price decrease from entry price.
OR
Stop-Loss Exit: +4% price increase from entry price.
Based on backtesting results across a selection of assets, the 45-minute and 1-hour timeframes are the best for this strategy.
The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
The backtesting data was recorded from December 1st 2021, just as the market was beginning its downtrend. We therefore recommend analysing the market conditions prior to utilising this strategy as it operates best on weak coins during downtrends and bearish conditions, however the EMA 450 condition should mitigate entries during bullish market conditions.
Chirag Strategy SMA with StopLossThe Moving Average Crossover trading strategy is possibly the most popular trading strategy in the world of trading. This strategy is a good example of so-called traditional strategies. Traditional strategies are always long or short. That means they are never out of the market. The concept of having a strategy that is always long or short may be scary, particularly in today’s market where you don’t know what is going to happen as far as risk on any one market. But a lot of traders believe that the concept is still valid, especially for those of traders who do their own research or their own discretionary trading.
This version uses crossover of simple moving averages of length 10 and 13. This strategy is best suitable for NIFTY and BANKNIFTY under 15min candlestick for intraday and 1hour candlestick for long-term.
Fib and RSI Strategy PineconnectorUse on 1m only For best results
strategy check for RSI overbought or oversold when key Fib levels are hit
Optimisez to use with Pineconnector using alerts with {{strategy.order.alert_message}}
Feel free to comment or DM if you want to improve
Enjoy
Dual Fibonacci Zone & Ranged Vol DCA Strategy - R3c0nTraderWhat does this do?
This is for educational purposes and allows one to backtest two Fibonacci Zones simultaneously. This also includes an option for Ranged Volume as a parameter.
Pre-requisites:
First off, this is a Long only strategy as I wrote it with DCA in mind. It cannot be used for shorting. Shorting defeats the purpose of a DCA bot which has a goal that is Long a position not Short a position. If you want to short, there are plenty of free scripts out there that do this.
You must have some base knowledge or experience with Fibonacci trading, understanding what is ADX, +DI (and -DI), etc.
You can use this script without a 3Commas account and see how 3Commas DCA Bot would perform. However, I highly recommend inexperienced uses get a free account and going through the tutorials, FAQ's and knowledgebase. This would give you a base understanding of the settings you will see in this strategy and why you will need to know them. Only then should you try testing this strategy with a paper bot.
Background
After I had created and released "Fibonacci Zone DCA Strategy", I began expanding and testing other ideas.
The first idea was to add Ranged Volume to the Fibonacci Zone DCA strategy which I wanted for providing further confirmation before entering a trade. The second idea was to add a second Fibonacci Zone that was just as configurable as the first Fibonacci Zone. I managed to add both and they can be easily enabled or disabled via the strategy settings menu.
Things Got Real Interesting
Things got real interesting when I started testing strategies with two Fibonacci zones. Here's a quick list of what I found I was able to do:
Mix and match exit strategies. I could set the Fib-1 zone strategy to exit with a take profit % and separately set the Fib-2 zone strategy to exit when the price crosses the top-high fib border
Trade the trend. A common phrase amongst traders is "the Trend is your friend" and with the help of an additional Fib Zone, I was able to trade the trend more often by using two different Fib Zone strategies which if configured properly can shorten time to re-deploy capital, increase number of closed trades, and in some cases increase net profit.
Trade both bull market uptrends and bear market downtrends in the same strategy. I found I could configure one Fib Zone strategy to be really good in uptrends and another Fib Zone strategy to be really good in downtrends. In some cases, with both Fib Zone strategies enabled together in a single strategy I got better results than if the strategies were backtested separately.
There are many other trade strategies I am finding with this. One could be to trade a convergence or divergence of the two different Fib Zones. This could possibly be achieved by setting one strategy to have different Fibonacci length.
Credits:
Thank you "EvoCrypto" for granting me permission to use "Ranged Volume" to create this strategy
Thank you "eykpunter" for granting me permission to use "Fibonacci Zones" to create this strategy
Thank you "junyou0424" for granting me permission to use "DCA Bot with SuperTrend Emulator" which I used for adding bot inputs, calculations, and strategy
TheBigBangTraders BreakoutName: TheBigBangTraders Breakout
Category: Trend Follower
Operating mode: Spot
Trades duration: Intraday
Timeframe: 1H
Suggested usage: the purpose of this strategy is to help to investigate if the asset is sensitive to breakout approach.
Entry: Trigger point can be choose by the user between:
High of the N days ago
High of the N weeks ago
Exit: End of Day
Usage:
⁃ It can be useful to use this script to test the behaviour of a definite asset
⁃ This is a raw system that can be considered a base to realize a complete breakout strategy
Configuration:
- N/A
Backtesting
⁃ Exchange: BINANCE
⁃ Pair: ETHUSDT
⁃ Timeframe: !H
⁃ Fee 0.075%
⁃ Slippage 0
- Start : 2020-01-03
How you or we can improve? Source code is open so share your ideas!
BEST Strategy Template w/ Custom SL/TP Size - EducationalHello traders
I'm getting this question at least once per week: "how to define a custom exit quantity for my stop loss and a different one for my take profit"
Instead of answering every day the same question in my DMs, I've decided to publish an educational strategy template script using this
Features
- Select to use or not the SL and/or TP
- Define how many pips/USD the SL/TP should be set at from the entry
- Define what quantity percentage you want to close at SL and/or at TP (lines 301 to 320 in the code)
- Classical custom trailing stop where the SL is moved to breakeven once the TP is hit
- Get real-time backtesting stats based on the options you've selected
Update
You might not know it yet but from last week (or maybe the week before), the qty/qty_percent from the strategy.exit function refers now to the initial position size (and not the remaining position size like before)
For example:
strategy.exit("EX1", qty_percent = 50, stop = constant)
strategy.exit("EX2", qty_percent = 20, stop = constant)
What happened before
After "EX1" reaches SL levels, "EX2" exits 20% from the % of the remaining position size.
If the initial position size = 100 contracts
EX1 exits 50 contracts
EX2 exits 20% of 50 contracts = 10 contracts
What's happening now
After "EX1" reaches SL levels, "EX2" exits 20% from the % of the original position size.
If the initial position size = 100 contracts
EX1 exits 50 contracts
EX2 exits 20 (20% of 100 contracts) contracts
I think this is an improvement and I really enjoy this new behavior.
See you in a few days with another post :)
ALL THE BEST
Dave
RSITrendStrategyI don't know if there is any strategy based on RSI cross over. The strategy is designed based on RSI crossover, considering RSI(5) and RSI(11), with RSI(6) to identify highs & lows.
I used this strategy to trade in Nifty 50 & Nifty bank indices. Whenever there is long mentioned on chart, I go for buying call option with premium near to 300, and placing stoploss of 50 on candle closing basis, vice versa.
Target is open until short is mentioned on the chart. Sometimes, i used standard pivot points as well to mark my targets and also to trail my trades.
Buy and hold strategyA simple buy and hold strategy. A short or a long position can be chosen. The start date will determine the date where your position will start and end date is the date it will end. This works well as a baseline to your other existing strategies since buy and hold is just the simplest strategy available.
Strategy Multiple Orders + Statistics Template - EducationalHello traders
It's been a while
We're back in a bear market so I have a bit more time to publish new Pine scripts for the TradingView community
Special thanks to @fikira for his Multiple Orders script () and to @carnagecain for allowing me to publish this script we worked together on
I got widely inspired by @fikira's script for that one
This script is for educational purposes only - I wanted to show how we can add multiple TPs/SL + a table with custom statistics
In this Strategy template, users can define multiple take-profit and multiple stop-loss levels.
Basically, we have 4 trades per trend and each trade has its own SL/TP
Statistics
Stats are split per trade direction (Long, Short) and then consolidated
I put custom stats in that table such as:
- Probability of Win
- Probability of Loss
- Avg Profit/Loss per Trade
- APPT: (Probability of Win * Average Gross Profit) - (Probability of Loss * Average Loss)
- Number of times each TP/SL has been hit
I'm catching up with all recent pinescript features as we speak - more educational scripts template to come soon
Best Regards
Dave
Customizable OCC Non Repainting Scalper Bot v7.0bThis strategy is intended to be used on an automated trading platform and should be run on a one minute chart for fastest confirmations and signal relay to crypto automation platform. The strategy has been modded to only go long at this time to focus on profitability for one direction. The open long and close long text fields allow you to use your own webhook message for this purpose.
I have spent quite a bit of time and I figured I would put it out to the community to share the work and also get some feedback.
Ok, so let me say that I have done absolutely everything I can to make the strategy not repaint while still maintaining it's profitability. It has been a challenge so I am publishing this to the community to help test this.
What I have observed: the strategy will not repaint in real time. That is, if you have the chart open and keep it open, the signals are the same as the ones that are sent out by the strategy. In certain cases, when I reload the chart- the signals might be off from what was sent. In some ways, that is repainting, but it is repainting based on losing the real time data and recalculating from a different set of bars- since I am running it on a one minute chart then the start becomes different when you refresh.
To address repainting while keeping the strategy calculating as quickly as possibly I have altered the logic in the following ways:
I have made an assumption which might not work for everyone- at the first tick of the next bar, you can almost safefly assume in crypto that if you are looking at the previous bar for information, the open of the current bar was the close of the previous bar. This for the most part holds true in crypto with good liquidity. If you are trading a pair that jumps around due to low volume- this might not be the strategy to use. I might publish a different version with a different logic.
I have altered the security repaint to use isbarconfirmed, so at the very end of the bar (as soon as the bar is confirmed), we recalculate to the higher time frames. So as soon as the data is available, it is at that point that we can then safely calculate higher time frames. This is unique and experimental, but seems to do well at creating good signals for entry.
I have employed my own intervals by utilizing the resolution as an integer (used by the previous authors)- but in this case, I use the interval to take a snapshot of the higher time frame. With open close cross, the different moving averages can cause the repainting as they change to show the exact point of the cross. The interval feature I created minimizes this by utilizing the previous bar info until the interval is closed and then we recalculate the variants. You can use the interval offset feature to denote which minute is the one that starts and ends the interval. So for instance, Trading View uses minue 1 and minute 31 for 30 minute intervals. If you offset your 30 minute interval would start on minute 16 and do its calculations based on the last 30 minutes,
As with most of my scripts, I have started using filters and a "show data" feature that will give you the ability to see the values of indicators that you cannot plot in the overlay. This allows you to figure out how to filter losing trades or market conditions.
I have also added a trailing stop and created a fixed stop loss as seems to perform better than the original occ strategy. The original one seemed to repaint enough that it would close too quickly and not give the posiition enough time to become profitable. In certain cases where there was a large move, it would perform well, but for the most part the trades would not close profitably even though the backtest said that it did - probably due to the delay in execution and pinescript not having a confirmation on what the actual position price was.
This is still in beta mode, so please forward test first and use at your own risk.
If you spot repaint issues, please send me a message and try to explain the situation.
CCI High Performance long onlyThis strategy is based on the classic Commodity Channel Index and only works long.
The system enters the market when this indicator is very low ( CCI <-150 or user-defined threshold) and as soon as it regains strength (i.e. CCI> CCI of the previous candle) with a filter on the "strength" of the prices themselves (i.e. the closing of the candle that provides the signal must be higher than a certain difference - fixed at 0.25% - at the opening of the candle itself).
You exit the market when you either incur a stop loss or when the prices are above the upper band of the CCI.
This system is used to have a high number of profitable operations (well over 50%) with little effort in terms of number of bars, rather than wanting to capture the actual duration of a trend. It is therefore recommended for those who "suffer to see the potential losses".