Strategy Myth-Busting #10 - InsideBar+EMA - [MYN]This is part of a new series we are calling "Strategy Myth-Busting" where we take open public manual trading strategies and automate them. The goal is to not only validate the authenticity of the claims but to provide an automated version for traders who wish to trade autonomously.
Our 10th one we are automating is the " 75% Win Rate High Profit Inside Bar Trading Strategy - What If You ... " strategy from " Trade Pro " who claims to have backtested this manually and achieved 11,063% profit with a 75% winrate over 100 trades. I was unable to emulate these results consistently accommodating for slippage and commission but even so, the results look promising. I was only able to achieve this win-rate with some multiple take profit staggering. Even so the markdown is above where I would normally consider comfortable (>20%).
If you know of or have a strategy you want to see myth-busted or just have an idea for one, please feel free to message me.
This strategy uses a combination of 2 open-source public indicators:
Inside Bar Ind/Alert by CMA
EMA (built-in)
Trading Rules
4 hour candles
Stop Loss at EMA Line with TP Target 1.5x the risk
Long Entry when these conditions are true
inside bar and bullish
Bar close's above 50 ema
Price action rises above high of inside bar .
Short Entry when these conditions are true
inside bar and bearish
Bar close below 50 ema
Price action falls below low of inside bar
Indicadores e estratégias
[XRP][1h] Chanu Delta inspired — Breakeven StrategyHello, this is my first TV contribution. I usually don't publish anything but the script is a quick review of an other contributor (Chanu Delta V3 script )
I reverse engineered this indicator today as I wanted to test it on other contracts. The original version (which aims to be traded on BTC) has been ported to XRP (as btc and xrp prices are narrowly correlated) then modified with a couple of what I believe are improvements:
- No backtest bias even with `security` function.
- Extra backtest bias validation, always trading on next bar as Crossover/under bias is confirmed
- Backtest with 2 ajustable TP, ajustable equity and breakeven option
- The current version is not design to use pyramiding as it would require extra logic to monitor the lifecycle of the position in the context of a study.
- Commented alerts examples with variables available in script scope so you can use them in alerts (just replace strategy with indicator and remove backtest related code block).
- Trade filling assumption set to 10, fees to 0.02 as the are default bybit maker fees and I advice to enter with trailing orders using a max of 2 ticks as offset to lower fees rather than a market order!
- Backtest and Alerts happen on barclose.
- No repaint guaranteed.
There are a thousand ways to improve it (adx/bb based dynamic TP/SL, order lifecycle, pyramiding...) but it seems to be a cool starting point.
Don't forget to have fun!
Trend Hunter v4This strategy follows the Trend Hunter training strategy taught at InvestIshare.
Entries are made based predominantly on the price action being above/below the Ichimoku Cloud with the ATR based super trend being used as a trailing stop loss.
Additional trend tracking tools can be toggled on / off to improve the wind rate on some time frames, with additional options available to limit entries if certain conditions are met.
If you would like access to this indicator, send me a DM on the Investishare Discord in the Trend Hunters channel.
The default parameters are set for BTC on the 2 HR time frame
[fpemehd] SSL Baseline StrategyHello Guys! Nice to meet you all!
This is my third script!
This Logic is trend following logic, This detects long & short trends based on SSL Hybrid Baseline.
This fits to the longer time frame like 4hr and 1d.
### Long Condition
1. close > SSL Hybrid baseline upper k
- Baseline is the ma of close price. (You can choose ma type and length)
- Upper k is the upper Keltner Channel.
### Short Condition
1. close < SSL Hybrid baseline lower k
- Baseline is the ma of close price. (You can choose ma type and length)
- Lower k is the lower Keltner Channel.
### Etc
1. Added Stoploss based on highest high or lowest low with lookback.
2. Strategy Template is based on @kevinmck100 template. Thank you!
Ultimate Moving Average Strategy CreatorHave you ever wanted to create your OWN strategy, but don't have coding experience? Well now you can.
With simple settings, but millions of potential strategies and combinations, this indicator / strategy lets YOU make ALL the rules.
Start by choosing up to 4 moving averages from all the various types - Simple, Exponential, Hull, Volume-Weighted, etc. Choose the period and choose price source.
Now the fun part.
You select your values to compare and how to compare them. Want to test if the Fast Moving Average crosses over the Slow Moving Average? No problem. Want to add an additional test to check the closing price is greater than the Fast Moving Average? Done.
With additonal options to set take profit % and stop loss %, as well as a date range and the option for 'Long Only' positions, you can instantly see the results of any strategy in the strategy tester, then simply make an adjustment and refine the criteria without having to know or understand any of the complex coding and scripting.
I have tried many popular moving average strategies, but irrespective of the results, the thing that stood out to me was how inflexible they were. If it was designed to test a triple crossover, that's all it could do. With this indicator, literally anything is possible and modifying the parameters couldn't be easier.
Ichimoku Breakout Kumo SWING TRADER (By Insert Cheese)A simple strategy for long spot or long futures (swing traders) based on a basic method of Ichimoku Kinko Hyo strategies.
The strategy is simple:
- Buy when the price breaks the cloud
- Close the trade when the price closes again inside the cloud.
The parameters that work best on this strategy are 10,30,60,30 and 1 for Senkou-Span A
but you can try classic Ichimoku parameters (9,26,52,26,26) or whatever you want like (7,22,44,22,22), (10,30,60,30,30) and others.
-1D chart
I have removed everything from the interface except the cloud to make it visually more aesthetic :D (but if you want to see all the ichimoku indicator you can put in again into the chart)
I have also added several functions for you to do your own backtesting:
- Date range
- TP AND SL method
- Includes long or short trades
The strategy starts with 500 $ and use 100% for trade to make the power of the compounding :P
Remember that this is for only educational porpouse and you must to do your own research and backtested on your usually market..
I hope you like it enjoy and support this indicator :)
Donate (BEP20) 0xC118f1ffB3ac40875C13B3823C182eA2Af344c6d
Average Directional Index v2This script uses another method of obtaining the price with each tick. The combination of gap settings and price data provide a good ADXx plot that does not repaint by default.
Crypto BTC Correlation Scalper Gaps StrategyThis strategy is based on the gaps theory.
In this case we have the BTC futures from CME, which acts in a way similar to stocks, and we can have gaps present between close/open session, and also sometimes between same candle due to huge movements intra candle.
At the same time I have combined this with a daily moving average, to help out a bit with the trend, since we are looking at small timeframe like 1-15/30min .
On top of that we have a reverse option, where long = short and viceversa, which can be used with against BTC pairs .
Rule are simple:
For long, we have a long gap and the close of the correlated candle is above daily sma
For short, we have a short gap and the close of the correlated candle is below daily sma
For exit:
For exit, we take the highest highest values for short entry TP, meaning we get the different from the HH and rest the current open candle distance, and use that distance as a TP.
At the same time for long entry, we take the lowest low value and rest current close of the candle to that value, and we get the TP.
Can also be applied this logic for SL aswell but from the test I have found out that exiting based on a reverse condition(when tp is not being hit), gives better results/dd overall.
If you have any questions, please let me know !
LarryWillians - Simple StrategyA simple and classic strategy on market, created by LarryWillians using a EMA9.
The brute model use a Cross from closing price on EMA9. But occurs many false entries.
In other to correct this kind of thing, I add a SMA21 to confirm the trend and decrease numbers of false trades.
The strategy waits to break the last High (for buy) a position.
As a strategy requires a Risk Mannager, I created a simple way to trailing this, as well a Take Proft and Stop Loss in %.
Is not the best strategy but, is one of the most famous on financial markets. I did my adaptive version as simples as it is :)
Strategy Myth-Busting #8 - TrendSurfers+TrendOsc - [MYN]This is part of a new series we are calling "Strategy Myth-Busting" where we take open public manual trading strategies and automate them. The goal is to not only validate the authenticity of the claims but to provide an automated version for traders who wish to trade autonomously.
Our 8th one is an automated version of the " 653% Gain Magical 1 Minute Scalping Strategy Tested 100 Times | Become Consistently Huge Profit " strategy from " Fxaccurate US " who claims to have achieved 653% profit scalping GOLD on the 5 minute timeframe. As you can see from the backtest results below, I was unable to substantiate anything close to that that claim on any timeframe or symbol. Myth 10000% busted.
If you know of or have a strategy you want to see myth-busted or just have an idea for one, please feel free to message me.
This strategy uses a combination of 2 open-source public indicators:
Trend Surfers - Premium Breakout + Alerts by TrendSurfersSignals
Mawreez' Trend Oscillator Indicator by Mawreez
Trading Rules:
1 min - 15 min candles
Stop loss middle between high and low Risk 1:2
Long Condition
Trend Surfers Trailing stop line goes below (Crosses) lowest low
Bullish Candle (red)
Mawreeze Trend Oscilator Indicator is green
Short Condition
Trend Surfers Trailing stop line goes above (Crosses) highest high
Bearish Candle (red)
Mawreeze Trend Oscilator Indicator is red
TomSeb StrategyRSI & MACD based. The parameters can be fine tuned to suit the symbol. 0 and 2 are default parameters which work for most symbols.
EMA 5,15,35,89,200 BY NUTPlots exponential moving average on four timeframes at once for rapid indication of momentum shift as well as slower-moving confirmations.
Displays EMA 5, 15, 35, 89 and 200... default colors are hotter for faster timeframes, cooler for slower ones
ขอบคุณครับ
Estocastoco Lento - DTOperacional criado pelo Jean Lira - Trader.
Basicamente busca uma situação de confirmação de exaustão com o indicador estocastico.
Na primeira barra de reversão do movimento, e com o sinal forte do estocastico Lento, no periodo de 5.
Gerenciamento de risco com e sem parcial.
MA Simple Strategy with SL & TP & ATR FiltersHello Guys! Nice to meet you all!
This is my second script!
This Logic is trend following logic, This detects long & short trends by comparing the value of MAs.
This fits to the longer time frame.
### Long Condition
1. Compare 4 MAs (you can chose MA Type)
- Shortest MA (MA 1)
- Shorter MA (MA 2)
- Normal MA (MA 3)
- Longer MA (MA 4)
2. If MA 1 > MA 2 > MA 3 > MA 4, then Enter Long Position
- ‘The arrangement of MAs in descending orders’ is the proxy of the long trend.
### Short Condition
1. Compare 4 MAs (you can chose MA Type)
- Shortest MA (MA 1)
- Shorter MA (MA 2)
- Normal MA (MA 3)
- Longer MA (MA 4)
2. If MA 1 < MA 2 < MA 3 < MA 4, then Enter Short Position
- ‘The arrangement of MAs in ascending orders’ is the proxy of the short trend.
### Close Condition
1. When trend Changes
- When (MA 1 > MA 2 > MA 3 > MA 4) breaks or (MA 1 < MA 2 < MA 3 < MA 4) breaks.
2. When the price hits the stoploss
3. When the price hits the take profit level (basically 50% of qty will be closed)
### Etc
1. Trend filter (ATR should be bigger than SMA of ATR)
- If the volatility of price is to small (ATR), then there could be false signal. To filter this out, I used the condition ‘ATR should be larger than SMA of ATR’.
2. Stoploss
- Enabled Stoploss based on ATR, Percent, Risk-Reward Ratio,
- Enabled Trailing Stoploss.
3. Choose MA Type
- You can choose MA Type
+ Thanks for the stoploss template @jason5480
MA Simple Strategy with SL & TP & ATR FiltersHello Guys! Nice to meet you all!
This is my second script!
This Logic is trend following logic, This detects long & short trends by comparing the value of MAs.
This fits to the longer time frame.
### Long Condition
1. Compare 4 MAs (you can chose MA Type)
- Shortest MA (MA 1)
- Shorter MA (MA 2)
- Normal MA (MA 3)
- Longer MA (MA 4)
2. If MA 1 > MA 2 > MA 3 > MA 4, then Enter Long Position
- ‘The arrangement of MAs in descending orders’ is the proxy of the long trend.
### Short Condition
1. Compare 4 MAs (you can chose MA Type)
- Shortest MA (MA 1)
- Shorter MA (MA 2)
- Normal MA (MA 3)
- Longer MA (MA 4)
2. If MA 1 < MA 2 < MA 3 < MA 4, then Enter Short Position
- ‘The arrangement of MAs in ascending orders’ is the proxy of the short trend.
### Close Condition
1. When trend Changes
- When (MA 1 > MA 2 > MA 3 > MA 4) breaks or (MA 1 < MA 2 < MA 3 < MA 4) breaks.
2. When the price hits the stoploss
3. When the price hits the take profit level (basically 50% of qty will be closed)
### Etc
1. Trend filter (ATR should be bigger than SMA of ATR)
- If the volatility of price is to small (ATR), then there could be false signal. To filter this out, I used the condition ‘ATR should be larger than SMA of ATR’.
2. Stoploss
- Enabled Stoploss based on ATR, Percent, Risk-Reward Ratio,
- Enabled Trailing Stoploss.
3. Choose MA Type
- You can choose MA Type
Suchit RSI CCISuchit RSI CCI strategy uses the Relative Strength Index and Commodity Channel Index levels and their movement for buy and sell calls
Morning Scalp StrategyThe Morning Scalp Strategy combines the 50EMA with the Stochastic Momentum Index. The morning period is when penny stocks usually have the highest volatility, so the strategy works between 10:00 AM and 12:10 PM.
***It opens only long positions. The ideal timeframe for this scalping strategy is 5 minutes on low-price stocks. The stock should spike in the morning with momentum and Volume.
***Look for a daily or intraday support area, close to the open position, to increase the confidence in the play
The components are:
- EMA50: Exponential Moving Average (EMA50)
- Stochastic Momentum Index (SMI)
Rules:
- Period: 10:00 AM and 12:10 PM
- if SMI Crossover and SMI < 0, open a position
- If close < EMA50, close the position
- Profit target: To be decided by the user, default value = 10% above the entry price
If you have any questions, let me know!
Faytterro Estimator StrategyWhat is "Faytterro Estimator Strategy"?
"Faytterro Estimator Strategy" is strategy of faytterro estimator. if you want to know more about faytterro estimator:
What it does?
It trades according to the signals given by faytterro estimator and some additional restrictions.
How it does it?
Using the faytterro estimator and the following variables, it gives buy and sell signals in different sizes at ideal points.
How to use it?
The "source" part is used to change the source of faytterro estimator.
The "length" is the length of the fayterro estimator.
"Minimum entry-close gap" is the minimum distance between two transactions opened in opposite directions. For example, if you opened long at 20 500 and "Minimum entry-close gap" is 400, you will not receive a sell signal before the price goes above 20900.
If "minimum entry-entry gap" is the minimum difference between two transactions opened in the same direction. For example, if you open long at 20500 level and the "minimum entry-entry gap" is 400, you will not receive a "buy" signal before the price goes below the 20100 level.
"strong entry size" determines the size of strong signals. The size of ordinary signals is always 1.
note: default values for btc/usdt 1 hour timeframe.
Fake StrategyTHIS IS A FAKE STRATEGY. PLEASE DO NOT USE THIS FOR TRADING.
Just publishing this to display how easily you can fake backtest results in the strategies. However, there are ways to identify the scams. Let's discuss about major red herrings in a strategy. How to identify them and stay away from them.
Any strategy which proclaims significantly high win rate (such as this) are not practical and can only be achieved via following means
Significantly high risk compared to reward
Trades are set in such a way that profits are taken in small movement whereas stops are significantly farther. By doing this, win rate will surely increase. But, will be picking pennies by risking plenty of capital. General trait of such strategies can be identified by comparing average trade and max drawdown . These kind of strategies will have significantly higher drawdown even though the number of losses are less. For example, 1 losing trade leading to drawdown of 10+% whereas every winning only contributes 0.25%.
We can also see this kind of behaviour in option selling strategies such as 0 and 1 DTE option selling strategies. Here too probability of winning can be pretty high (north of 90%). But, on every winning, you make 1-2% of your capital however on remaining trades, you will lose your complete capital - which leads to overall losing position.
Inducing repainting through code
This strategy is an excellent example of how repainting can be induced via code using request.securities method. There are plenty of ways a strategy or code can be made to repaint. Tradingview user manual has lots of information about repainting. Feel free to read through if you have extra time. If you look at this code, it is very simple to induce repainting in a strategy to make it look like an infinite money printing machine.
High Leverage and lack of usage of margin
Using leverage in pine can show false results. This is because, the strategy engine will not stop when equity goes below 0% until the trade is closed. But, that does not happen in real life. This is the reason why using leverage along with high risk and low reward trades can show false results overall making it look like the strategy is unbeatable. But, when you try to use that in real time, it is likely that account will be blown out.
To understand leverage conditions, please have a look at the strategy property fields - Order Size, Pyramiding, Commission, Slippage, Margin Long/Short.
Curve fitting
If the author claims that strategy will only work on particular set of instrument and particular timeframe, then the strategy is not real. It is curve fitting. Knowingly/Unknowingly author has moulded his strategy to fit what has happened in the past. This is general issue even non malicious author go through. It is very much essential to test the strategy across various set of instruments and timeframes to understand the real capability. Use back-testing as test cases. More test cases you have, more bug free your strategy will be. There are many methods to understand curve fitting and perform better testing of the strategy in hand which can be studied and implemented by authors.
Significantly short trades - a sign of lack of strategy
A strategy built using pine in general work on close of candle. So, all the calculations generally happen upon close of the candle. You can force intra-bar calculations using bar magnifier. But, that is not equivalent to tick data. Due to this reason, I consider any trade happening within a bar (Meaning open and close within the same bar) as not reliable. This is because, it is not possible for strategy back-tester to know whether entry condition is satisfied first or exit in a completely foolproof way. Bar magnifier can help reduce this issue - but will not eradicate this problem completely. If there are lots of trades in a strategy - which are closing within the same bar, this is very likely that the strategy backtest results are not reliable.
Hope this helps at least some people to understand the scams and stay away from it.
Open High Low StrategyThis is a very simple, yet effective and to some extend widely followed scalping strategy to capture the underling sentiments of the counter whether it will go up or down.
What is it?
This is Open-High-Low (OLH) strategy.
As you already aware of Candlestick patterns, there is patterns called as Marubozu patterns where the sell wick or buy wick either ceases to exists (or very small). This is exactly in the same principle.
In OLH strategy: The buy signal appears when the Open Price is the Low Price. It means if you draw the candlestick, there is no bottom wick. So after the opening of the candle, the demand drives the price up to the level, some selling may or may not come and closes in green. This indicates a strong upward biasness of the underlying counter.
Similarly, a sell signal appears when the Open price is the High Price. It means there is no upper wick. So there is no buying pressure, since the opening of the candle, sellers are in force and pulls down the price to a closing.
This strategy generates the signal at the close of the candle (technically barstate.isconfirmed). Because until the bar is real-time there is no option to know the final closing or high. So you will see the bar on which it generates the buy or sell signal is actually indicates the previous bar as OLH bar.
To determine the Stop-Loss, it uses the most widely known SL calculation of:
For buy signal, it takes the low of the last 7 candles and substract the ATR (Average True Range) of 14-period.
For sell signal, it takes the high of the last 7 candles and add it to the ATR (Average True Range) of 14-period.
One can plot the SL lines as dotted green and red lines as well to see visually.
Default Risk:Reward is 1:2, Can be customizable.
What is Unique?
Of course the utter simplistic nature of this strategy is it's key point. Very easy and intuitive to understand.
There are awesome strategies in this forum that talks about the various indicators combinations and what not.
Instead of all this, in a 15m NSE:NIFTY chart, it generates a good ~ 47% profit-factor with 1:2 Risk Reward ratio. Means if you loose a trade you will loose 1% of account and if you win you will gain 2%. Means 3 trades (2 profits and 1 loss) in a trading session result 3% overall gain for the day. (Assuming you are ready with 1% draw down of your account per trade, at max).
Disclaimer:
This piece of software does not come up with any warrantee or any rights of not changing it over the future course of time.
We are not responsible for any trading/investment decision you are taking out of the outcome of this indicator.
Moving Average Displaced Envelope & ATRTS Moving Average Displaced Envelope. These envelopes are calculated
by multiplying percentage factors with their displaced expotential
moving average (EMA) core.
How To Trade Using:
Adjust the envelopes percentage factors to control the quantity and
quality of the signals. If a previous high goes above the envelope
a sell signal is generated. Conversely, if the previous low goes below
the envelope a buy signal is given.
Average True Range Trailing Stops Strategy, by Sylvain Vervoort
The related article is copyrighted material from Stocks & Commodities Jun 2009
ATR TS used by filter for MADE signals.
WARNING:
- For purpose educate only
- This script to change bars colors.
Tick StrategyTick Strategy:
Questions many pine coders/traders have is, How to enter/exit trade as soon as trade condition is met i.e. do not wait till candle completion to enter/exit the trade. This strategy will help you to understand one of the way to achieve it.
This is an educational strategy to demonstrate, how one can trade based on tick data. This being a strategy based on tick data, it can be tested only on real time candles. This strategy will not take any trades on historical candles and cannot be used for back testing. All the strategy trades taken on real time candles will disappear (repainting) once chart is refreshed and new trades will be entered on real time candles.
The strategy will do nothing during off market hours and will not take any trades.
The strategy has been designed based on rules/inputs below:
1. Count the ticks from start of a candle till end of candle
2. Bifurcate ticks as up-ticks and down-ticks. If tick price is above previous tick price the tick is considered as up-tick and vice versa
3. Count the successive up-ticks and successive down-ticks
Strategy rules:
1. Track candle type (green or red) continuously on each tick (green candle is when latest tick price > previous tick price)
2. Take a long trade if work in progress (WIP) candle is green candle and we get successive up-ticks equal to user input ticks for trade
3. Take a short trade if work in progress (WIP) candle is red candle and we get successive down-ticks equal to user input ticks for trade
4. Exit the trade when we get successive ticks equal to user input ticks in opposite direction
5. Optionally for trade entry, user can decide whether to calculate successive up-ticks/down-ticks from beginning of candle or successive up-ticks/down-ticks anytime during the candle formation
6. Optionally for trade exit/square off, user can decide whether to apply exit rules on the entry candle or only from subsequent candle
Strategy setting:
1. '' – This is just to describe when trades are entered. This parameter is not used for any calculation
2. 'No of successive ticks to enter the trade' – User input to decide, number of successive ticks for trade entry
3. 'Count successive ticks for trade only from start of candle' – check this to count successive ticks only from beginning of a candle
4. 'Exit if succussive ticks in opposite direction' - User input to decide, number of successive ticks in opposite direction for exiting the trade
5. 'Apply exit criteria on entry candle' – check to allow exit of trade on the entry candle, if un-checked, trade will not be exited on the entry candle i.e. opposite direction ticks will be counted from subsequent candle
Information below will be displayed continuously on the chart:
1. Candle no – Candles are counted from start of the trading session. This is current candle being formed on the chart
2. Candle now – This shows either ‘Green’ or ‘Red’ based on type of candle being formed
3. Tick count – This is current tick number being processed. Tick number starts from 1 for each new candle
4. Up-tick count – Number of up-ticks during formation of current candle
5. Down-tick count – Number of down-ticks during formation of current candle
6. Successive up-ticks – Current successive up-tick count
7. Successive down-ticks – Current successive down-tick count
8. Up-tick volume – Volume associated with up-ticks
9. Down-tick volume – Volume associated with down-ticks
10. Up-tick volume % - This is % of volume associated with up-ticks
11. Total volume – Candle volume till now. (Some times you might observe small difference between total volume and the volume shown by volume indicator. The difference could be because of refresh rate of your screen)
12. Candle completion % - This shows current candles completion %. This is candle progress from start of candle till close of candle