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
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
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