Programming

 

hi!

I am trying to program an indicator which i can plot in my chart and it tells me if the market is either open or close.

It consists in a rectangle, either green labelled open or red labelled close.

I made the next coding but somehow I'm finding the 2 same errors constantly which are: "unexpected end of program" about the first line and : '{' -unbalanced parentheses" about line 49.

I'll let the code bellow hoping someone can help me.

...

Improperly formatted code removed by moderator. Please EDIT your post and use the CODE button (Alt-S) when inserting code.

Code button in editor

Hover your mouse over your post and select "edit" ... 

...

 

Almost everything has already coded for MT4/5!  Learn to search before trying to code:

https://www.mql5.com/en/search#!keyword=session&module=mql5_module_codebase

 
Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893