[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

paintbar problem



PureBytes Links

Trading Reference Links

I am a new  TS user so my problem seems a bit elementary, but I'm stuck on
it nonetheless.

Say for example I want to create a simple intraday paintbar study which
shows the lunchtime session if the morning range is below a certain level:

inputs: morningrange(100),length(46);
vars: mrange(0);

if time = 1150 then mrange= highest(high,length)-lowest(low,length);

if time>1150 and time < 1400 and mrange < morningrange then
 plotpaintbar(high,low);

The above code reuslts in a paintbar on the first day of the chart (whether
conditions are satisfied or not) and nothing thereafter (regardless of input
values). Can someone please tell me what's wrong with it?