RePaNoCHa V4 [Backtest]This is the Backtest version of the previous one.
It's important to correctly set the "TICKS / PIPS CORRECTION" parameter in each different chart.
Enjoy!
Stoploss
SUPERTREND ATR WITH TRAILING STOP LOSS## THIS SCRIPT IS ON GITHUB
## MORE BACKTEST
SuperTrend is a moving stop and reversal line based on the volatility (ATR).
The strategy will ride up your stop loss when price moviment 1%.
The strategy will close your operation when the market price crossed the stop loss.
The strategy will close operation when the line based on the volatility will crossed
The strategy has the following parameters:
+ **ATR PERIOD** - To select number of bars back to execute calculation
+ **ATR MULTPLIER** - To add a multplier factor on volatility
+ **INITIAL STOP LOSS** - Where can isert the value to first stop.
+ **POSITION TYPE** - Where can to select trade position.
+ **BACKTEST PERIOD** - To select range.
## DISCLAIMER
1. I am not licensed financial advisors or broker dealers. I do not tell you when or what to buy or sell. I developed this software which enables you execute manual or automated trades multiple trades using TradingView. The software allows you to set the criteria you want for entering and exiting trades.
2. Do not trade with money you cannot afford to lose.
3. I do not guarantee consistent profits or that anyone can make money with no effort. And I am not selling the holy grail.
4. Every system can have winning and losing streaks.
5. Money management plays a large role in the results of your trading. For example: lot size, account size, broker leverage, and broker margin call rules all have an effect on results. Also, your Take Profit and Stop Loss settings for individual pair trades and for overall account equity have a major impact on results. If you are new to trading and do not understand these items, then I recommend you seek education materials to further your knowledge.
**YOU NEED TO FIND AND USE THE TRADING SYSTEM THAT WORKS BEST FOR YOU AND YOUR TRADING TOLERANCE.**
**I HAVE PROVIDED NOTHING MORE THAN A TOOL WITH OPTIONS FOR YOU TO TRADE WITH THIS PROGRAM ON TRADINGVIEW.**
## NOTE
I accept suggestions to improve the script.
If you encounter any problems i will be happy to share with me.
+ Authors: @exit490
+ Revision: v1.0.0
+ Date: 5-Aug-2019
+ Pinescript version: 4
## LICENSE
Copyright 2019 Mauricio Pimenta / exit490
SuperTrend with Trailing Stop Loss script may be freely distributed under the (../LICENSE).
TRAILING STOP LOSS TO LONG AND SHORT##THIS SCRIPT IS ON GITHUB
This TradingView strategy it is designed to integrate with other strategies with indicators.
It performs a trailing stop loss from entry and exit conditions.
In this strategy you can add conditions for long and short positions.
The strategy will ride up your stop loss when price moviment 1%.
The strategy will close your operation when the market price crossed the stop loss.
Also is possible to select the period that strategy will execute the backtest.
The strategy has the following parameters:
+ **INITIAL STOP LOSS** - Where can isert the value to first stop.
+ **POSITION TYPE** - Where can to select trade position.
+ **BACKTEST PERIOD** - To select range.
## DISCLAIMER
1. I am not licensed financial advisors or broker dealers. I do not tell you when or what to buy or sell. I developed this software which enables you execute manual or automated trades multiple trades using TradingView. The software allows you to set the criteria you want for entering and exiting trades.
2. Do not trade with money you cannot afford to lose.
3. I do not guarantee consistent profits or that anyone can make money with no effort. And I am not selling the holy grail.
4. Every system can have winning and losing streaks.
5. Money management plays a large role in the results of your trading. For example: lot size, account size, broker leverage, and broker margin call rules all have an effect on results. Also, your Take Profit and Stop Loss settings for individual pair trades and for overall account equity have a major impact on results. If you are new to trading and do not understand these items, then I recommend you seek education materials to further your knowledge.
**YOU NEED TO FIND AND USE THE TRADING SYSTEM THAT WORKS BEST FOR YOU AND YOUR TRADING TOLERANCE.**
**I HAVE PROVIDED NOTHING MORE THAN A TOOL WITH OPTIONS FOR YOU TO TRADE WITH THIS PROGRAM ON TRADINGVIEW.**
## NOTE
I accept suggestions to improve the script.
If you encounter any problems I will be happy to share with me.
+ Authors: @exit490
+ Revision: v1.0.0
+ Date: 03-Aug-2019
+ Pinescript version: 4
## LICENSE
Copyright 2019 Mauricio Pimenta / exit490
Trailing Stop Loss script may be freely distributed under the MIT license .
STOP-LOSS-RSI with Edge-Preserving Filter Strategy V2Modified RSI strategy with entry and exit points.
I have allowed for High and Low risk for anyone interested in using it (NO GUARANTEES. DO YOUR OWN RESEARCH).
I will later consider incorporating the standard RSI for exit points. I am sure returns will increase based on current test runs :)
Returns look good based on the strategy result.
Move Up StopsThis script creates a stop loss level and then moves it up in 5% increments as prices increase.
Basically, it checks to see if the lowest low of the last 7 days is above a certain level. If yes, it sets the stop at that level. It then checks for the next highest level and keeps going until the price is not above a level. Those variables are then set to the level below them.
Trailing stops are notorious for skewing backtest results. This script avoids that problem. Also, some exchanges do not offer trailing stops, so this script gives you a signal to let you know its time to manually move your stops up.
I will be using this for swing trades involving both crypto and stocks.
BitMex Trailing Stop StrategyThis script is designed for those who want to use BitMex's trailing stop. It's not meant to be used as entry exits, but rather to get an idea of how wide the trailing stop needs to be. I suggest you backtest with different values. The script can also be integrated into an existing strategy which does give entry/exits to act as its stop loss.
Babypips: Inside Bar Momentum StrategyThe strategy contained in this post comes courtesy of babypips (.com), an excellent resource for all thing forex related. If you are new to trading, the site is definitely worth checking out!
Code commentary and an introduction to Inside Bars are available for this post on the Backtest-Rookies (.com) website.
Note: If you are interested in custom development services, please check out our services page on the Backtest-Rookies site.
Strategy Overview
Inside Bar Momentum Strategy.
Inside Bar Detection
Position sizing based on stoploss distance ( Note: Based on equity and assumes that the account currency is the counter currency.
Stop buys for entries
Takeprofit / Stoplosses for exits
Control Stopbuy, Takeprofit and Stoploss targets with inputs
Control Backtest start/end dates
Toby Crabel's narrow range with historical volatility1. Find bar with the smallest narrow range for a chosen period. Use hvol for filter.
2. Place stop-order for long position at previous high and stop-order for short at previous low to catch breakout in any direction.
3. Take profit on the next bar.
Linda Raschke's Holy GrailAnother script based on Linda Raschke's strategy with the same name from her book about swing trading.
Stupid strategyStrategy with simple stop-loss and take-profit in percentage. If last trade was a successful one then repeat it. If not successful - do a reversal trade.
XPloRR MA-Trailing-Stop StrategyXPloRR MA-Trailing-Stop Strategy
Long term MA-Trailing-Stop strategy with Adjustable Signal Strength to beat Buy&Hold strategy
None of the strategies that I tested can beat the long term Buy&Hold strategy. That's the reason why I wrote this strategy.
Purpose: beat Buy&Hold strategy with around 10 trades. 100% capitalize sold trade into new trade.
My buy strategy is triggered by the fast buy EMA (blue) crossing over the slow buy SMA curve (orange) and the fast buy EMA has a certain up strength.
My sell strategy is triggered by either one of these conditions:
the EMA(6) of the close value is crossing under the trailing stop value (green) or
the fast sell EMA (navy) is crossing under the slow sell SMA curve (red) and the fast sell EMA has a certain down strength.
The trailing stop value (green) is set to a multiple of the ATR(15) value.
ATR(15) is the SMA(15) value of the difference between the high and low values.
The scripts shows a lot of graphical information:
The close value is shown in light-green. When the close value is lower then the buy value, the close value is shown in light-red. This way it is possible to evaluate the virtual losses during the trade.
the trailing stop value is shown in dark-green. When the sell value is lower then the buy value, the last color of the trade will be red (best viewed when zoomed)(in the example, there are 2 trades that end in gain and 2 in loss (red line at end))
the EMA and SMA values for both buy and sell signals are shown as a line
the buy and sell(close) signals are labeled in blue
How to use this strategy?
Every stock has it's own "DNA", so first thing to do is tune the right parameters to get the best strategy values voor EMA , SMA, Strength for both buy and sell and the Trailing Stop (#ATR).
Look in the strategy tester overview to optimize the values Percent Profitable and Net Profit (using the strategy settings icon, you can increase/decrease the parameters)
Then keep using these parameters for future buy/sell signals only for that particular stock.
Do the same for other stocks.
Important : optimizing these parameters is no guarantee for future winning trades!
Here are the parameters:
Fast EMA Buy: buy trigger when Fast EMA Buy crosses over the Slow SMA Buy value (use values between 10-20)
Slow SMA Buy: buy trigger when Fast EMA Buy crosses over the Slow SMA Buy value (use values between 30-100)
Minimum Buy Strength: minimum upward trend value of the Fast SMA Buy value (directional coefficient)(use values between 0-120)
Fast EMA Sell: sell trigger when Fast EMA Sell crosses under the Slow SMA Sell value (use values between 10-20)
Slow SMA Sell: sell trigger when Fast EMA Sell crosses under the Slow SMA Sell value (use values between 30-100)
Minimum Sell Strength: minimum downward trend value of the Fast SMA Sell value (directional coefficient)(use values between 0-120)
Trailing Stop (#ATR): the trailing stop value as a multiple of the ATR(15) value (use values between 2-20)
Example parameters for different stocks (Start capital: 1000, Order=100% of equity, Period 1/1/2005 to now) compared to the Buy&Hold Strategy(=do nothing):
BEKB(Bekaert): EMA-Buy=12, SMA-Buy=44, Strength-Buy=65, EMA-Sell=12, SMA-Sell=55, Strength-Sell=120, Stop#ATR=20
NetProfit: 996%, #Trades: 6, %Profitable: 83%, Buy&HoldProfit: 78%
BAR(Barco): EMA-Buy=16, SMA-Buy=80, Strength-Buy=44, EMA-Sell=12, SMA-Sell=45, Strength-Sell=82, Stop#ATR=9
NetProfit: 385%, #Trades: 7, %Profitable: 71%, Buy&HoldProfit: 55%
AAPL(Apple): EMA-Buy=12, SMA-Buy=45, Strength-Buy=40, EMA-Sell=19, SMA-Sell=45, Strength-Sell=106, Stop#ATR=8
NetProfit: 6900%, #Trades: 7, %Profitable: 71%, Buy&HoldProfit: 2938%
TNET(Telenet): EMA-Buy=12, SMA-Buy=45, Strength-Buy=27, EMA-Sell=19, SMA-Sell=45, Strength-Sell=70, Stop#ATR=14
NetProfit: 129%, #Trade
HiLoHi Everyone,
Do you guys know how can I add an exit strategy to this hilo.
I would like it to exit either with hilo invertion (already does) or with profit/loss (it doesn't work)
Thank you