Visually separate day from eve sessions

It would be cool to have a way to visually separate reg trdng hours from after hours. TOS does it by shading the eve hours. Could we at least get a vertical separator based on the traditional opening and closing time for each product?

LOVE the latest release. Thank you

I want this too, there are several requests out there with similar topic, hopefull can be done with the new beta charts

1 Like

Would be nice to be able to customize the shading of the chart for market hours and after-market hours. Something like this…


, where the yellow shaded region is after-market hours and the grey is open market hours.

2 Likes

You can use Volume Profile under Free Indicators to have different background colors for the overnight and day sessions. You can just turn the bars to be colored black and they won’t show up.

4 Likes

Please add simple option to call out session breaks on charts and be able to select full-day session or break it into overnight and regular sessions.

2 Likes

When trading futures it would be helpful to easily see the price action after-hours.

Any chance such a feature is going to be released in the near future?

How even do I view extended hours?

Any update on this? I feel this is a necessary feature and would be very helpful. Please add!

just save this script to configure your sessions:

const predef = require("./tools/predef");

const { px, du, op, min } = require("./tools/graphics");


class sessions {

    init() {

        this.sessions = [
            { // londen session
                key: "london",
                timezone: "Europe/London",
                start_time: 700,
                end_time: 1700,
                fillStyle: {
                    color: "purple",
                    opacity: 20,
                }
            },
            {
                key: "new_york",
                timezone: "America/New_York",
                start_time: 930,
                end_time: 1700,
                fillStyle: {
                    color: "green",
                    opacity: 20,
                }
            },
            {
                key: "new_york_bullit",
                timezone: "America/New_York",
                start_time: 1000,
                end_time: 1100,
                fillStyle: {
                    color: "white",
                    opacity: 20,
                }
            },

            // {
            //     key: "tokio",
            //     timezone: "Asia/Tokyo",
            //     start_time: 1000,
            //     end_time: 1500,
            //     fillStyle: {
            //         color: "blue",
            //         opacity: 0,
            //     }
            // },
            // {
            //     key: "sydney",
            //     timezone: "Australia/Sydney",
            //     start_time: 1000,
            //     end_time: 1600,
            //     fillStyle: {
            //         color: "yellow",
            //         opacity: 0,
            //     }
            // },

            { // https://tradeday.freshdesk.com/support/solutions/articles/103000081072-can-i-trade-news-or-data-releases-
                key: "no_fly_zone_1",
                timezone: "America/Chicago",
                start_time: 1255,
                end_time: 1305,
                fillStyle: {
                    color: "red",
                    opacity: 50.0,
                }
            },
            {
                key: "no_fly_zone_2",
                timezone: "America/Chicago",
                start_time: 725,
                end_time: 735,
                fillStyle: {
                    color: "red",
                    opacity: 50.0,
                }
            },
        ];


    }

    changeTimezone(date, ianatz) {

        let utcDate = date;// new Date(date.toLocaleString('en-US', { timeZone: "UTC" }));
        let tzDate = new Date(date.toLocaleString('en-US', { timeZone: ianatz }));
        let offset = utcDate.getTime() - tzDate.getTime();
        let nd = new Date();
        nd.setTime(date.getTime() - offset);
        return nd
    }


    map(d, i, history) {
        let items = [];

        for (const session of this.sessions) {

            let startDate = d.timestamp() // UTC
            let nyDate = this.changeTimezone(startDate, session.timezone)

            let hr_min = nyDate.getHours() * 100 + nyDate.getMinutes();
            if (hr_min >= session.start_time && hr_min < session.end_time) {

                items.push({
                    tag: "Shapes",
                    key: session.key,
                    primitives: [
                        {
                            tag: "Rectangle",
                            position: {
                                x: du(d.index() - 0.5),
                                y: px(0),
                            },
                            size: {
                                height: px(1000),
                                width: du(1.0),
                            },
                        },
                    ],
                    fillStyle: session.fillStyle
                });
            }
        }



        return {
            graphics: {
                items: items,
                // global: true,
            },
        };
    }
}

module.exports = {
    name: "sessions",
    description: "sessions",
    inputType: "bars",
    calculator: sessions,
    tags: ["My Indicators"],
    params: {
    },
};

AFTER SAVING MY INDICATORS, ADJUST SESSION ARRAY TO YOUR LIKING:

Hello, can you please point me in the direction where to save the script in tradovate?