[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 614

 
Ali007:
Thank you very much!
How do I go through all open orders? What function should I use?OrderSelect?
They even wrote the code above .....
 
alsu:

Oh, thank you! ))))
 

Good afternoon!

I've encountered this problem, I need to set a point at a specified price. For this,I use:

ObjectCreate(names, OBJ_ARROW, 0, Time[0], 1. 31400);

ObjectSet(names, OBJPROP_ARROWCODE, 159);

But the point is not exactly where the price is, it's a bit different (it's just a few points higher). Why is it so? How can I put a point at the specified price?

 

can :

Special arrow codes that accurately indicate the price and time. Can be the following values:

Constant Value Description
1Upward pointing arrow with a prompt to the right(↱)
2Down arrow with guide to the right(↳)
3Left pointing triangle(◄)
4Symbol Dash (-)
SYMBOL_LEFTPRICE5Left price marker
SYMBOL_RIGHTPRICE6Right price marker

Special arrow codes cannot be used in custom indicators when setting arrow value for lines with DRAW_ARROWstyle.

 
You can use objects such as Ellipse, Trend Line...
 
FAQ:

can :

Special arrow codes that accurately indicate the price and time. Can be the following values:

Constant Value Description
1Upward pointing arrow with a prompt to the right(↱)
2Down arrow with guide to the right(↳)
3Left pointing triangle(◄)
4Symbol Dash (-)
SYMBOL_LEFTPRICE5Left price marker
SYMBOL_RIGHTPRICE6Right price marker

Special arrow codes cannot be used in custom indicators when setting arrow value for lines with DRAW_ARROWstyle.

Thank you, just what you need! The dash symbol (-) is just right!

 
Roll:
You can use objects like Ellipse, Trend line...

Thanks, looked at these options but seemed, so far, complicated for me.

 

Good evening.

What is the correct way to declare a variable for a period?

For example:

PER is a variable, PERIOD_M1 is a period.

PER=PERIOD_M1; - this is understandable, but how to declare extern ????? PER how?))

Thank you in advance.

 
ALex2008:

Good evening.

What is the correct way to declare a variable for a period?

For example:

PER is a variable, PERIOD_M1 is a period.

PER=PERIOD_M1; - this is understandable, but how to declare extern ????? PER how?))

Thank you in advance.


Instead of????? substitute int , i.e. in your example: extern int PER

Period is an integer value, you can use constants instead of digits

 
zxc:


Instead of????? substitute int , i.e. in your example: extern int PER

the period is an integer value, you can use constants instead of numbers

So, instead of PERIOD_M1, etc. you can just use an integer number that corresponds to the period, right? To be more specific, can we replace iOpen(NULL,PERIOD_M1,1) with iOpen(NULL,1,1) ?

Thank you!

Reason: