CryptOli 3 MAs long/short Backtest// this is an educational Script - basicly its very simple - you can see how minimal changes impact results, thats why i posted it
// Credits to Quantnomad to publish tons of free educational script
// this Script is based on Quantnomads Ultimate MA Indicator
// HA - Option for calcultion based on HA-Candles (very famous recently)
// Source Input - Option (Candletype for calculation, close, ohlc4 ect.) --- there are huge differences --- try it by your own
Educational
BLANK Strategy + TSL + Backtestrange- I often see ppl struggeling do the first own strategy
- this is an example, for a smooth start
- EDIT it to your needs ( DELET my EXAMPELS and add your INPUTS/CONDITIONS)
- i added also a Backtestrange, so you can test your Strategy in different marketphases
- also added a trailing-stop-loss
[Tutorial][RS]Working with ordersa small tutorial to explain how to work with orders, comments in the script.
How To Set Backtest Date RangeExample how to select and set date range window to be backtested. Normally when you change chart period it changes the number of days being backtested which means as you increas 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 returns for your strategy. Now you can. Incorporate this code replacing buy and sell with your strategy, then simply input the From and To dates in Format -> Inputs, and then change the chart period to view updated results.
NOTE: There is a limit in backtesting to 2000 orders, so please be aware of this when setting your date ranges. If you set your range too high, you may be exceeding this limit on some periods and not on others, so this would yield incorrect comparison of returns per period. If you see in your backtesting results that you are nearing this limit for one of your periods you are testing, then reduce the date range to a smaller number of days.
Enjoy!
(Thanks to @Gesundheit "Adeel" for pointing me in the right direction on this!)