Ea to Indicator

 

when I run it in tester the following code nicely draws me vertical lines, each day at the New York open. . I want to make it into an indicator

so when I'm looking at historical charts, I don't have to go blind trying to read the open time.

int start()
  {

   if(Hour()==8){
ObjectCreate(StringConcatenate(A,TimeCurrent()),OBJ_VLINE,0,Time[0],Ask);}
   

   return(0);
  }

I can't see why this won't work as an indicator, tried inserting IndicatorCounted(); but since there is no buffer could not see any point in it and it didn't work.

Other than that possibility I am stumped.

When loaded there are no errors, just a color choice dialog box.

Thoughts, ideas, opinions, wild guesses and the correct answer all deeply appreciated.

Keith

[Deleted]  

Hey Keith,

Here's an indicator that is close to what you're looking for. Maybe this will give you what you need - or form a basis to work from:

'Indicator of Trading Sessions'

- Tovan

 
tovan wrote >>

Hey Keith,

Here's an indicator that is close to what you're looking for. Maybe this will give you what you need - or form a basis to work from:

'Indicator of Trading Sessions'

- Tovan

Hey Tovan

That's better than perfect; works great for me as is and I can likely extend if for another project that I had in mind.

Many thanks

Keith