How To Auto Set Date RangeExample how to automatically set the date range window to be backtested from X days or weeks ago to present. Additional options are also included to manually set the date range or to show entire range available.
Normally when you change chart period it changes the number of days being backtested, which means as you increase the chart period (for example from 5min to 15min), you also increase the number of days traded. So you can not compare apples to apples for which period would yield best performance for your strategy.
By incorporating this code with your own strategy's logic (replacing buy and sell), it will allow you to compare results of different period backtests over the same duration of time.
Date Range: ALL uses entire history.
Date Range: DAYS uses number you set in # Days or Weeks
Date Range: WEEKS uses number you set in # Days or Weeks
Date Range: MANUAL uses manual dates you set in From and To fields
Much gratitude to @pinechrix for suggesting this improvement to me, and to @Gesundheit for pointing me in the right direction on the original example I published previously. Thank you both!
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
Backtest
Cyatophilum SuperTrend [BACKTEST]The SuperTrend Indicator and Strategy built upon Average True Range.
- Backtest Version -
>> READ HOW TO USE HERE <<
DepthHouse Trading System [Gods Envelope] Backtest StrategyCreated for Bitcoin!
*All testing has been done on the 1 Day time frame of BTC USD pairs.
Use at your own risk.
DepthHouse Trading System Basics
The Cloud:
The cloud is used in a very similar manner as the ichimoku cloud. A complete cross above or below the represents a macro trend change. The cloud then could be used as dynamic support and resistance zones.
By default there is no smoothing to the full cloud. If you wish to add smoothing, you can change the ‘Trend Base On’ option to ‘Modded Cloud Average’ to add price action and smoothing into the cloud’s calculations. The Modded Cloud can then be used in the same manner as the Full Cloud. Generally, the Full Cloud is more forgiving and has less Macro Trend changes. By default, this option is turned off. The support or resistance zone created will be shown on the info panel on the right.
Horizontal Levels:
A Horizonal zone is generated each time there is a micro level trend change. For example, as soon as a positive micro trend change occurs a green horizontal level will be plotted.
These levels then can be used as temporary support and resistance zones. The Horizontal Break Trading Strategy is entirely based on these levels. These levels are also shown on the info panel on the right.
The Envelope Itself: (by default this is off)
By selecting the Overbought and Oversold Ranges option, a cloud envelope will appear around the price action. This envelope represents the overbought and oversold ranges. If the price action should go into these zones, the info panel on the right will show ‘CAUTION’ beside the God Values as this signals that the pair is either overbought or oversold.
The God Values:
The God values are listed on the info panel on the right. These are the values created by the Godmode indicator. Generally, below 20 or above 80 it signals for caution as the price action has overextended itself.
The Back-Test Strategy Options:
⇅ - Child Fomo Positioning:
Child Fomo Positioning strategy is entirely based on the macro trend change with the center cloud. As soon as there is a complete candle close above or below the cloud and a trend change takes place. The back-test places a market order as soon as the next candle opens. By default, it then will not close this position until the price action fully crosses the cloud once again.
⇅ - Horizontal Break Trading:
Horizontal Break Trading Strategy is entirely based on the horizontal levels generated and the macro trend direction. For example, say the Macro Trend is up, and a green, positive horizontal level is formed. As soon as a complete candle closes above the upper level of the positive zone, a limit order is placed in hope that the price action comes back down and retests, filling the order. This long will not close then until a negative level is formed. As soon as a negative level is formed a stop/loss order is placed on the lower level of the horizontal support zone. It will then do the opposite in a bearish trend, and margin trading is turned on.
⇅ - Parent Positions :
Parent Positioning Strategy is based on the overall trend and the center cloud levels. This strategy has limit orders waiting on the level of the cloud that is closest to the price action. Therefore, using this strategy alone, the back-test system waits for the trend to be confirmed, and then follows the price action with limit orders waiting on the cloud to be retested. By default this order does not close until a Marco trend change occurs.
⇅ - Take 50% Partial Profits:
This options allows the back-test to take 50% profit or loss when one of the two options occur.
Horizontal Break: This would close 50% of the position in the same manner it would close a trade using the horizontal break trading system.
God Values: Once the price action enters the oversold or overbought clouds, it would then place a close order as soon as the price action exits the cloud.
⟲ - Backtest Year Start Date :
Start year of the back-testing. If set to ex. 2017, the back-test will not calculate any trades that took place before Jan. 1 of 2017.
⚖ - Margin Trading :
By default, margin trading is turned off. Simply switch this option to on the enable ‘Short Trading’ into the strategy back-test.
Notes: If you are back testing multiple strategies at the same time, you must increase the pyramiding to correspond to the number or strategies.
My Favorite Settings:
Margin = Off
Pyramiding = 2 [Settings → Properties → Pyramiding → 2 orders
Child Fomo Positioning = On
Horizontal Break Trading = On
Everything else off 😊
DISCLAIMER: Past performance does not guarantee future results.
Use at your own risk.
Cyatophilum Shooting Stars 1m [ALERTSETUP]A Scalping Script Setup for the 1m Timeframe, using the cheesy candle pattern "Shooting Stars" plus some Trend Detection, Stop Loss and Take Profit integrated system, allowing these nice backtest results.
Currently in continuous development / real time testing on BitMEX data.
Cyatophilum Shooting Stars 1m [BACKTEST]A Scalping Script for the 1m Timeframe, using the cheesy candle pattern "Shooting Stars" plus some Trend Detection, Stop Loss and Take Profit integrated system, allowing these nice backtest results.
Currently in continuous development / real time testing on BitMEX data.
MA Crossover_ No shortingThis script is intended for back testing MA crossover strategy specifically for Vietnam Market, which does not allow short selling and has a settlement period of T+3.
Gap Up Stats - Gap Strategie für Aktien! Was passiert eigentlich nach einem X% Gap? Diese Frage lässt sich nun einfach beantworten! Ändere die % und die Anzahl der Jahre, welche Du testen möchtest mit nur einem Klick. Die unterschiedlichen Werte zeigen Dir dann direkt, ob sich Deine Handelsthese mit den Statistiken der Aktie deckt.
In diesem Fall sehen wir, dass die Aktie über das letzte Jahr in allen Fällen unter dem Eröffnungspreis geschlossen hat. Der durchschnittliche Spike lag bei 16%. Damit ist ein Short die richtige Wahl und die potentiellen Level der Aktie können mit der Statistik vereint werden.
Bei Interesse ist dieses Skript bei uns erhältlich.
Viele Grüße
WirmachenTrader®
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!
Algorithm Builder (Signal version)Gentlemen traders
As promised, here's the Algorithm Builder (Signal Version) that is an alternative version of that previous indicator : Strategy-Builder-Crypto-Single-Trend-Plots/
This one was quite successful and already 11 person bought for me which is unbelievable. Thank you so much guys for your appreciation of my work
The script of this present post is still invite-only because it required years in the making (it's the fruit of all my errors and trials while trading for the past 7 years and when developing trading bots for traders professionally)
What's the Algorithm Builder?
Simply put, the indicator will detect the confluence/convergence of multiple unrelated indicators and alert you when the ones YOU selected will be in the same direction. (if you didn't understand this it's because I'm french)
For example, let's say you select a MM cross and MACD, whenever the MM cross will be green/bullish AND MACD green/bullish also, you'll get a nice .... wait for it..... green/bullish /diamond. Starting to see what I meant before now :)
Not sure if I should go as far as introducing the other example but let's go for it. Still, in the same spirit, a confluence of red/bearish MM cross and red/bearish MACD will give .... (finish the sentence and you'll get my appreciation. hint: the color of the diamond will be red)
So what's cool about it now ... or I should say even cooler... even more awesome (Barney Stinson, please hive five me for this tool...) is that it can be plugged in a single click to a complete Backtest engine
I inspired myself greatly from the Pinescripters Backtesting-Trading-Engine-PineCoders/ but had to make changes to adapt it to my tool.
It took me a few days of work and I'll share it also tomorrow so please stay tuned and give me a follow so that you'll be updated
In the Backtester itself, I added some features like :
- Stop-loss based on supertrend
- Hard Exit based on indicators used by the Algorithm Builder
I just made it more relevant for my indicator
Performance sir?
The period selected for the screenshot below is the last 3 months
Here's a preview of what you should expect tomorrow as well imgur.com
There isn't a BEST configuration for the tool. I made one that matches my psychology and capital. You'll have to find yours by playing with it or asking me for a bit of help if you're lost
Will require a bit of work but could be very worth it in the end :)
What's next sir?
I'm perfectly aware that the indicator doesn't give a lot of signals and that's because it's an entry-level version of all the Algorithm Builders I'm selling now and will be available on my website by end of August (along with the website itself)
More advanced versions already made allow to :
- get more entries
that one is the best addition, in my opinion, it multiplies the gains (and losses :P) as it allows some orders pyramiding and to reinforce a position if the trend is very strong. You won't have to do anything, just to wait for the alerts by email/sms from TradingView
- multiple take profit levels
- connected to systems like Autoview/ProfitView to automatize even more your trading and send those signals to your broker directly (I will strongly advise starting with a demo account for 1 week or 2 here, I don't want you to burn your capital if any unexpected bad event will happen)
- screener
If you're interested please message me. I can develop your custom indicator/strategy/backtest/automatic system or if you're ready the take the leap of faith and try this indicator or the more advanced versions
And before I get asked, yes this is the tool I use for my own trading as initially, I made it for me. Now sharing a bit of my work (and too much of my life) with the community
PS
____________________________________________________________
Feel free to hit the thumbs up as it shows me that I'm not doing this for nothing and will motivate to deliver more quality content in the future.
- I'm an officially approved PineEditor/LUA/MT4 approved mentor on codementor. You can request a coaching with me if you want and I'll teach you how to build kick-ass indicators and strategies
Jump on a 1 to 1 coaching with me
- You can also hire for a custom dev of your indicator/strategy/bot/chrome extension/python
- if you like my work and wants to buy me some coffee :
- BTC TipJar: 3MKDve7stWTe1io99oFxeQXvP8XB4zCQ8m
- LTC TipJar: MC5oeBAhw9BLqyi65TR3J1Lid8io9uHADw
Hull Trend with Kahlman Strategy BacktestA simple backtest version of a Hull Trend with Kahlman strategy
Average True Range BandsThis is a simple script to assist you in manual backtesting! Perfect for the NNFX crowd or anyone that enjoys manual backtesting.
Usage
1. Slap this bad boy on your chart.
2. Adjust period and multiplier (defaults are 14 period and 1.5x).
3. Put on the indicator/system you are testing.
4. Enter bar replay mode.
5. Drag your long/short position take profit and stop loss to the upper and lower bands.
(long/short positions are available on the left-hand toolbar)
6. Profit!
If you enjoy/use this script, drop me a follow and please note me in your code!
I'm *almost* always available for collabs and questions.
Cyatophilum Scalping Bot V2 [ADVANCED SETTINGS] [BACKTEST]Advanced Settings version of Cyatophilum Scalping Bot V2
For people who like tweaking settings =)
Ultimate Risk Management System 📈With this tool you can run multiple instances for Stop Loss, Take Profit, Trailing Stop or Trailing Take Profit.
Why use it?
> Some trading platforms don't offer special tools like Trailing Stop;
> In case they do, they don't have to know where you put your stops;
> TradingView offers high performance, you can see the tool working in real-time.
Main Features:
- Real-time;
- Long Order;
- Short Order;
- Stop Loss;
- Take Profit;
- Trailing Stop Loss;
- *Trailing Take Profit.
Disclaimer: This system may help you cut out your losses or lock in your profit, but it does not guarantee profit. Always use at your own risk.
Cyatophilum Scalping Bot V2 [BACKTEST]Improved version of Cyatophilum Scalping Bot
Default settings for BITMEX:XBTUSD
2% stop loss
2% trailing take profit
DayTrade - XBTUSD 5m [ALERTSETUP]Plug & Play indicator for BITMEX:XBTUSD in 5 minute timeframe for Manual or Automated Day Trading.
Built upon Cyatophilum Scalping Bot
Backtest below show results over 2 weeks, calculated with a 0.075 % commission fee and using 100% of equity on each trade from 10 000$ inital capital.
> Get access to the Cyatophilum Indicators <
Combo Backtest 123 Reversal & Breakout Range Short This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
Breakout Range Short Strategy
WARNING:
- For purpose educate only
- This script to change bars colors.
Ema BacktesterA simple, but useful script for backtesting purposes. Find the optimal Settings for your strategy.
tips are always welcome at: 38uGQJDDZDL6wX48x4gYTccPeQ3ZHVYmY4 (btc)
I hope you enjoy the script :)
Buy & Sell XRPBTC:BINANCE 1D Trading BotWith this indicator you can create Buy and Sell alerts to automate your trading.
Optimised for BINANCE:XRPBTC in a 1D timeframe.
> > > READ HOW IT WORKS < < <
The goal of trading XRP against BTC is to increase your amount of BTC. XRP is in the top 5 Coins of all time.
Built upon my generic indicator Cyatophilum Altcoins Trader , this Strategy creates buy and sell signals to can be used for manual or automated trading.
This strategy using a combination of Parabolic SAR and Tilson T3 Line , which is a strong tool to buy at the right time . An integrated 10% trailing stop loss will reduce the risk!
Sell and save your founds instead of simply holding over time.
Results below are calculated using 100% equity from a 10 000$ capital and a 0.05% commission fee on each trade.
> > > READ HOW TO USE < < <
> Get access to the Cyatophilum Indicators <
Combo Backtest 123 Reversal & Bill Williams. AO with Signal Line This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
This indicator plots the oscillator as a histogram where blue denotes
periods suited for buying and red . for selling. If the current value
of AO (Awesome Oscillator) is above previous, the period is considered
suited for buying and the period is marked blue. If the AO value is not
above previous, the period is considered suited for selling and the
indicator marks it as red.
You can make changes in the property for set calculating strategy MA, EMA, WMA
WARNING:
- For purpose educate only
- This script to change bars colors.
Buy & Sell - ETHBTC:BINANCE 4H Trading BotWith this indicator you can create Buy and Sell alerts to automate your trading.
Optimised for BINANCE:ETHBTC in a 4H timeframe.
> > > READ HOW IT WORKS < < <
The goal of trading ETH against BTC is to increase your amount of BTC. ETH is in the top 5 Coins of all time and its bull rallies are really fast and volatile so it's very important not to miss them!
Built upon my generic indicator Cyatophilum Altcoins Trader , this Strategy creates buy and sell signals to can be used for manual or automated trading.
The year 2019 started with the end of a bull run, and the script was able to catch 29% of profits. Then in Februrary, we saw another rally, but this one dropped fast and the script caught 4% of profits. Until then, two opportunities of trade triggered but ended up as a loss, as the bear market continued. In total, it made 33% of profit and 9.5% of loss . The fact that a bear market has be going on for +3 months is a good thing for what will happen next.
I think we all remember how 2018 was for ETH. It had the most insane rally of all time, another one in April-May then 6 months of bear market. Oh! by the way, did I say the script has an integrated trailing stop loss starting at 4%? Those are the green dots below the price.
I used TradingView's Strategy Tester with historical data starting from 2017-08. Results are calculted using 100% equity from a 10 000$ capital and a 0.05% commission fee on each trade.
See the results below.
> > > READ HOW TO USE < < <
> Get access to the Cyatophilum Indicators <
FREE BACKTEST STRATEGY BTC/USDT 15m Binance LONGA long only strategy for trading BINANCE:BTCUSDT in a 15m timeframe built upon Donchian Channels.
The script is already configured for this market /timeframe.
I built it using my generic version that you can request access by leaving a comment:
To get access to the alert setup version and automate the strategy, you need to purchase a subscription on my website .
Thanks for the feedback/support !
Cyatophilum PSAR Bot Trader V2 [BACKTEST]A strategy built upon Parabolic Stop And Reverse.
This new version includes my whole Trend Detector / Stop Loss / Takeprofit / Trailing System.