yesterday open

 

looking for a simple indicator to show a vertical line at yesterday open candle. tried search but did not find one.

thanks

 

F8 -> Common Tab -> check "Show period separators" may help you

shows daily vertical line from M1 til H1

 
meikel wrote >>

F8 -> Common Tab -> check "Show period separators" may help you

shows daily vertical line from M1 til H1

Hi Meikel,

Thanks for this, not what I was trying to do. What I am trying is to learn the time entries in the code for the object create.

For example when I draw a horizontal line I use two time references based on bars or what ever I designate Time[] to be. I understand that and usually draw them as a trend line such as a pivot. ObjectCreate("p_Line", OBJ_TREND,0,Time[0],p,Time[15],p);... Now a VLine as I understand it will only use the first time frame for reference. But anything I try to do outside of Time[0] or whatever bar I chose, will not show up. ObjectCreate("y0_Line", OBJ_VLINE,0, yesterday_open,0);

Referencing the yesterday_open iOpen(NULL,PERIOD_D1,1); does not work. I have tried to use datetime as a reference and also object property time 1 . The line does show in the chart reference as being created, but the date shows 1/1/1970. So obviously I have a lot to learn about the time and date functions.. but I am getting there slowly.

My original thought for the request was to see if a simple line indicator existed so I could look at the code and see the errors I am making.. I have searched several forums and have not found one. My next thought was to try using an array to create it, see what I can do there, but I wanted to learn the basic object create method first.

Thanks and happy Holidays

Tom

 

Hi Tom

Look at iTime(), it returns the datetime value of the bar with the given shift. If you know the bar number of the bar where you want the VLINE you can use iTime() for the datetime paramenter in ObjectCreate().

Cheers

Jellybean

Reason: