[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 90

 
As I was writing, I realised.
 
PapaYozh:


Add to the code:

and analyse.

Sorry, didn't understand what happened. Again, error 130 almost everywhere. OpenFrv Up=80.98 SL=79.62 TP=81.21 Should open, but it's not.... Or here is another print - OpenFrVup=80.83 SL=79.47 TP=81.06 I put stop normalization

SL = NormalizeDouble(SL,opDigits);
TP = NormalizeDouble(TP,opDigits);
ОткрФрвниз = NormalizeDouble(ОткрФрвниз,opDigits);
Doesn't help.

On currency pairs - ok, on dollar index - no.........

 

Can you tell me if "magic" is importantor if "MAGIC" (lowercase and uppercase) can also be used?

Thank you in advance.

 
nemo811:

Can you tell me if "magic" is importantor if "MAGIC" (lowercase and uppercase) can also be used?

Thank you in advance.

:)

You can call it Papa Rome.

 
sergeev:

:)

You can call it Papa Rome.


Got it. I'm learning. Don't get any ideas... :))))
 
volshebnik:

Sorry, didn't realise what had happened. Again, error 130 almost everywhere. OpenFrUp=80.98 SL=79.62 TP=81.21 Should open, but it's not.... Or here is other print data - OpenFrv Up=80.83 SL=79.47 TP=81.06 I put in stop normalization

Not helping.

On currency pairs - normal, on the dollar index - no.........


ERR_INVALID_STOPS 130 Stops too close or incorrectly calculated or non-normalized prices in the stops (or in the opening price of a pending order). An attempt may only be repeated if the error occurred due to an out-of-range price. It is necessary to refresh the data after a delay of 5 seconds or more using the RefreshRates function and try again. If the error persists, it is necessary to stop all trading attempts and change the program logic.

Add a line

Print(" STOPLEVEL=", MarketInfo(Symb,MODE_STOPLEVEL));

and see what you have there.

 
PapaYozh:


ERR_INVALID_STOPS 130 Stops too close or incorrectly calculated or non-normalised prices in the stops (or in the opening price of the pending order). An attempt can only be repeated if the error occurred due to a price being out of date. It is necessary to refresh the data after a delay of 5 seconds or more using the RefreshRates function and try again. If the error persists, it is necessary to stop all trading attempts and change the program logic.

Add a line

and see what you have there.

RefreshRates=79.215 SL=77.855 TP=79.445 STOPLEVEL=200

OpenFr Up=78.065 SL=76.705 TP=78.295 STOPLEVEL=200

 

ERR_INVALID_FUNCTION_PARAMVALUE 4051 Invalid function parameter value

Excuse me, where should I look for this?

OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES );
OrderClose( ticket, Lots, Bid, 5, 0 ); Alert ("OrderClose error", GetLastError()); -wrote Ask, Bid, I was screaming in real time, started to hit at some price,

Lots as it screamed, so I scream ?????? and what is wrong7 Ticket screamed inite.

 

Dear forum users, help with the code

if (Close[0]<line1+p1&&Close[0]>line1-p1) ObjectCreate("m", OBJ_ARROW,0,time1,line1);

How to find the time of the bar by condition, ie what should stand in place of (time1=D'00:00';). The price crosses the line and the arrow should be drawn on the bar that crossed the line.

 
Alexandr24:

Dear forum users, help with the code

How to find the time of the bar by condition, ie what should stand in place of (time1=D'00:00';). The price crosses the line and the arrow should be drawn on the bar that crossed the line.


You can put Time[0] instead of time1, but it will be in real time mode. And if you want to throw to "history" then how can you find the time of the bar which crossed the line?
Reason: