Indicator for 'no trading times' built into price chart

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #65140 quote
    segie
    Participant
    Senior

    Good day,

    I need help creating a code for ‘no trading times’ on the 5 min price chart.

    The time periods I’m looking at is every last 15min of every  hour.  e.g 09h45- 10h00,   10h45-11h00,  11h45- 12h00 etc… These are the ‘no trading times’ for the day

    Ideally I would like my candle sticks to change to the colour ‘white’ during these time periods. So for example, on the 5min chart, the 09h45, 9h50, 9h55 candles will appear the colour white.

    Open to other suggestions as well. Any help will be appreaciated

    Regards,

    Segie

    #65171 quote
    Nicolas
    Keymaster
    Master

    Add this indicator on your price chart and candlesticks between scheduled times will be plotted in light gray color. The ‘notrading’ variable can be extended with other schedules, I let you add them.

    notrading = (time>094500 and time<=100000) or (time>104500 and time<=110000) or (time>114500 and time<=120000)
    
    if notrading then 
    r=200
    g=200
    b=200
    else
    if close>open then
    r=0
    g=255
    b=0
    elsif close<open then 
    r=255
    g=0
    b=0
    endif
    endif
    
    drawcandle(open,high,low,close) coloured(r,g,b)
    
    return
    #65267 quote
    segie
    Participant
    Senior

    This is perfect. Thank you!

    Currently working on an indicator for novice traders.

    Is there a code to programme the ‘Sell’ and  ‘Buy’ icons on the top right corner of a chart?

    When there’s a Buy signal  on the system the ‘Sell’ icon becomes unavailable. And only the ‘Buy’ icon is available

    vice verca for a Sell signal

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Indicator for 'no trading times' built into price chart


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
segie @segie Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by segie
7 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/12/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...