[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 432

 
Can anyone explain up to which point in the OrderSelect function the order is selected, what interrupts its selection, why can't it be selected 1 time at the start of START?
 

Hello all, dear colleagues, can you tell me why


Comment(MarketInfo("EURUSD",MODE_STOPLEVEL));


returns 0 ?

 
Pyro:

Hello all, dear colleagues, can you tell me why



returns 0 ?

I would also like to ask this question .... I join
 

Hello,

I'm looking for help.

I have never drawn a line before.

If anyone can tell me where I'm going wrong.

Thanks.

For t2, you can set any hour under 22.

//if(TimeCurrent()>t2 && ObjectFind("bottom") && ObjectFind("top"))
//ObjectMove("bottom "+t2, 0, t2, p2);
ObjectFind("bottom"); ObjectFind("top");
ObjectCreate("top "+t2, OBJ_HLINE,0,t1,p1);
ObjectCreate("bottom "+t2, OBJ_HLINE,0,t2,p2);
ObjectSet ("bottom "+t2, OBJPROP_STYLE, STYLE_SOLID);
ObjectSet ("bottom "+t2, OBJPROP_COLOR, DeepSkyBlue);
ObjectSet ("top "+t2, OBJPROP_COLOR, DeepSkyBlue);
//if(TimeCurrent()==20)ObjectsDeleteAll(2, OBJ_HLINE);
if(TimeCurrent()==22)ObjectsDelete("top "+t2);
if(TimeCurrent()==22)ObjectDelete("bottom "+t2);
//if(TimeCurrent()==22)ObjectDelete("top");
//if(TimeCurrent()==22)ObjectDelete("bottom");

All that is commented tried.

 
Pyro:

Hello all, dear colleagues, can you tell me why



returns 0 ?


I always have zero. The dealer doesn't limit the distance to set the stops.

Check in the "Symbol Properties" what they write or on the DC's website, maybe you have Stoplevel = 0.

 
Fam:
Can anyone explain up to which point in the OrderSelect function the order is selected, what interrupts its selection, why can't it be selected 1 time at the start of START?

It is the order that is selected that interrupts the selection of another order.
 
DhP:


I always have zero. The dealer doesn't limit the stop setting distance.

Look at what they write in the "Character Properties" or on the DC's website, maybe you have a Stop Level = 0.


I don't know, it's not 0, I even use

double PipsMull=0.0001;

Ask+PipsMull+MarketInfo(Symbol(),MODE_STOPLEVEL)*Point

if it is very close to the level where I want to place the order

 
mario065:

Hello,

I'm looking for help.

I have never drawn a line before.

If anyone can tell me where I'm going wrong.

Thanks.

For t2 you may set any hour below 22.

ObjectFind("bottom"); ObjectFind("top");
ObjectCreate("top "+t2, OBJ_HLINE,0,t1,p1);
ObjectCreate("bottom "+t2, OBJ_HLINE,0,t2,p2);
ObjectSet ("bottom "+t2, OBJPROP_STYLE, STYLE_SOLID);
ObjectSet ("bottom "+t2, OBJPROP_COLOR, DeepSkyBlue);
ObjectSet ("top "+t2, OBJPROP_COLOR, DeepSkyBlue);

if(TimeCurrent()==22)ObjectDelete("top "+t2);
if(TimeCurrent()==22)ObjectDelete("bottom "+t2);

The last two code lines will not work!

I quote the help:

datetime TimeCurrent( )
Returns the last known server time (the time of the last quote) as the number of seconds elapsed since 00:00 1 January 1970.
Write a simple script with just one line:

Alert(" TimeCurrent = ", TimeCurrent());

And look what number this alert tells you. This will actually show you that from 00:00 on January 1, 1970 to the present time, a lot more than 22 seconds have passed!

 
drknn:

The last two lines of code will not work!

To quote the help:

datetime TimeCurrent( )
Returns the last known server's time (the time of last quote) as the number of seconds elapsed since 00:00, January 1, 1970.
Write a simple script with just one line:

Alert(" TimeCurrent = ", TimeCurrent());

And look what number this alert tells you. This will actually show you that from 00:00 on January 1, 1970 to the present moment, far more than 22 seconds have passed!


But I've tried it this way too

if(TimeCurrent()>(t2+8*3600))ObjectDelete("top");

I specify time of line forming + time to delete line in seconds.

Doesn't work.

 
sergeev:

his selection interrupts the selection of another order.


Thank you, because I always wrote this command in the code as a precaution.

Also, can you tell me what are the best methods to look for logical errors? For example, I insert Alert and look at the log, maybe there are more civilized methods? Or any more convenient tricks.

Reason: