How to code rectangle

 

Hi,

I want to code indicator with static rectangles, who will be like template for every chart i want.

The question is, How to code rectangle, from date to date with high and low price within this period?

ObjectCreate
(0,"name",
OBJ_RECTANGLE,
0,D'01.01.2018',
"lowest price from the period",
D'01.02.2018',
"highest price from the period");
 
Ebrat Skeldan:

Hi,

I want to code indicator with static rectangles, who will be like template for every chart i want.

The question is, How to code rectangle, from date to date with high and low price within this period?

First you have to find these values and then set them in ObjectCreate. 

For one day D'01.01.2018' you can use simply value High and Low for day bar by use CopyHigh and CopyLow functions

Reason: