Function to convert unix time to a datestamp string.
This Script is a Convenience Script Module for calculations based or started on a fix time / date. (In difference to bar_index-based where the reference point is shifting from bar to bar, thus is dynamic). Purpose examples: - Comparison by start date - Time driven studies or strategies - Measuring from Date of Interest The script also contains a date input...
World Clocks - something for fun Happy New Year! ps: in case no update on the charts then the clock will not update too and will lag or stop till a new update is received
Hello Pine Scripters, Sometimes we need to run some processes in the scripts on last N bar but currently we don't know bar_index value of realtime bar or number of remaining bars before we reached it. So most of us use "start date" as input and run some processes after "start date". This experimental script finds last Nth bar approximately. As you can see in...
Plots Mercury Retrograde cycles from start to end. What is Mercury Retrograde? Mercury Retrograde is when the planet Mercury appears to be traveling in reverse or backwards across the night sky with respect to the stars, the zodiac, and other bodies in the celestial canopy. It happens when Mercury goes in between the Earth and the Sun. Basically, Mercury is...
This has been done before in different ways, however, my goal is to publish a single, simplified copy/paste version of the idea so you can quickly and easily incorporate it into your strategy backtesting. You can designate weekdays, weekdays + weekends for 24/7 markets, and also session range. So, you trade bitcoin? It works. CME futures? It works. You are a...
Year-to-Date (YTD) return describes the return so far this year. It refers to the amount of profit made by an investment since the first day of the current year to the present day. Investors and analysts use YTD returns information to assess the performance of investments. Additionally, the tool allows you to set custom (up to 6) levels to trigger alerts.
Example how to backtest specific date(s) which can be useful for testing seasonality strategy ideas such as "Sell in May", etc. If using Daily period with wild card dates it will not trade on 1st day of month. If market is closed will trade on next open day. Works only with Daily or lower timeframes. When using on Daily timeframe set dates 1 day earlier to...
Example 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...
C320up Strategy Tester Start Time This is a little snippet you can paste into your Strategy to set the testing start date and time. It is not a Strategy per se, though is an example with the timestamp script included. Instructions are fairly straight forward, and are listed in the script. If for some reason you also wanted an end date, that too is possible....
Version 0.9 beta: - Takes heavy performance showing history expiry dates
Shows the CBOE and CME settlement dates as horizontal lines, with the option to show a 7 day warning in the background. This should hopefully give ample warning. I intend to update the script as new dates become available but please PM if I've forgotten.
Example 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...