assume market open at 09:15:00
inputs: Price( Close ), Displace( 0 );
variables: Open_today(0);
if time_s>091500 and time_s<=161500 then begin
if time_s[1]<091500 and time>=0915000 then open_today=open;
end;
condition1 = Displace >= 0 or CurrentBar > AbsValue( Displace ) ;
if condition1 then
Plot1[Displace]( open_today, " Open ") ;
I use the above code for generating an open line in range bar chart, however nothing show up. Did I miss something for generating the open line?
Plot open line in range bar chart
-
- Posts: 61
- Joined: 25 Jul 2013
- Has thanked: 18 times
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: Plot open line in range bar chart
count the zerosassume market open at 09:15:00
inputs: Price( Close ), Displace( 0 );
variables: Open_today(0);
if time_s>091500 and time_s<=161500 then begin
if time_s[1]<091500 and time>=0915000 then open_today=open;
end;
condition1 = Displace >= 0 or CurrentBar > AbsValue( Displace ) ;
if condition1 then
Plot1[Displace]( open_today, " Open ") ;
I use the above code for generating an open line in range bar chart, however nothing show up. Did I miss something for generating the open line?
Code: Select all
if time_s[1]<091500 and time>=0915000 then open_today=open;
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Plot open line in range bar chart
Time returns time in HHmm format while Time_s returns the time with seconds (HHmmss).count the zerosassume market open at 09:15:00
inputs: Price( Close ), Displace( 0 );
variables: Open_today(0);
if time_s>091500 and time_s<=161500 then begin
if time_s[1]<091500 and time>=0915000 then open_today=open;
end;
condition1 = Displace >= 0 or CurrentBar > AbsValue( Displace ) ;
if condition1 then
Plot1[Displace]( open_today, " Open ") ;
I use the above code for generating an open line in range bar chart, however nothing show up. Did I miss something for generating the open line?
Code: Select all
if time_s[1]<091500 and time>=0915000 then open_today=open;
So I think the code example either needs to be:
Code: Select all
if time_s[1] < 091500 and time_s >= 91500 then open_today=open
or:
Code: Select all
if time_s[1]<091500 and time >= 915 then open_today=open