[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 591

 
TarasBY:

You want to "move the cart" for "Kucher's nose". With a low level of language skills, you need to start practicing with:

Take a ready working Expert Advisor, which is close to your strategy and upgrade it to suit your needs - this way you will understand and comprehend your actions faster.

Good luck!

P.S. AXIOMA: "Coachmen don't drive carts!!!"


I practically do... I look at other EAs, scripts... and build what I need :))
 
2012.12.07 16:14:28 attempt141 GOLD,H1: unknown symbol name 0 for OrderSend function

it was fine. does it depend on the terminal or the DC? or has something changed in the code?
 
gheka:
2012.12.07 16:14:28 attempt141 GOLD,H1: unknown symbol name 0 for OrderSend function

everything was fine. does it depend on the terminal or the DC? or something has changed in the code???

Without the code it's hard to answer... For example, before one brokerage company had gold ticker XAUUSD and it was explicitly written in the order open fi nd. At the same brokerage company the ticker is Gold, that's why there is an opening error: unknown symbol name 0 for order opening fi... And maybe they changed something in the code too... (changed). It doesn't depend on the terminal - it's doing your job and that's all.

 
Desead:

Can you advise if there is any slippage for stop and takeaway values when orders are reopened with a rollover? And how will the stop be set if the difference between the open price and the stop after the rollover is less than the stop levelled?

My task is as follows. If i have an open market order, i should check if it was opened with rollover and if it was, i should get the ticket of the previous order, that was closed. Maybe someone will tell me the search algorithm?

1. I select the first open order.
2. I look at the time of opening, if it is from 23:40 to 00:20 then I continue checking this order (40 minutes window is taken just in case, although it seems to be possible to take it from 23:50 to 23:59)
3. I memorize the ticket, stop and take
4.I check all closed orders using the history, where the comments contain the word "swap" and currency pairs match
5. I compare data on stops and takes, if they match, then here is the required order pair; if not, I return to step 1


Stops and Take Profit orders are already set pending orders but server statistics will show them linked to another order.

For the solution of your problem seehttps://www.mql5.com/ru/articles/1390 andhttps://www.mql5.com/ru/articles/1404. I think one of these articles has an example for your case (I can't remember exactly, I read it a long time ago, but I think the material will still be useful).

 
gheka:
2012.12.07 16:14:28 attempt141 GOLD,H1: unknown symbol name 0 for OrderSend function

it was fine. does it depend on the terminal or the DC? or has something changed in the code?

Try141 GOLD,H1: unknown symbol name 0 for OrderSend function means that the program tried to open an order 141 times but failed because it did not know the symbol with the name 0.
 
Is it possible to write a commentary on the lines like the one written when an order is placed (ticket number and order type)?
 
lottamer:

Please tell me what it means

while(true)

in the modifier script that I pasted into the EA?

and what is this strange check for

if(cmd==OP_BUY || cmd==OP_SELL) ?

Wouldn't it be better just to check for the presence of an open position?

if(cmd==OP_BUY || cmd==OP_SELL) This is a check for open position. while(true) is a loop which will be executed if there is an open position and will run as long as it exists or until the condition and the following operators beforebreak; (or return to exit the function)
 
Chiripaha:
Is it possible to write a commentary on the lines like the one written when an order is placed (ticket number and order type)?

Would you learn to ask the right questions? What lines? Power lines? Most people are not telepathic and cannot know what you mean unless you tell them.
 

and why do I have a string of conditions

if (cmd999==OP_SELL && Stoch_1>Stoch_2 && OrderProfit()>10)

is executed as TRUE even if OrderProfit is less than 10 (dollars) ?

After all, everything less than 10 dollars should be cut off?

 
rigonich:

Learn to ask the right questions, for Christ's sake. What lines? Power lines? Most people aren't telepathic and can't know what you mean unless you tell them.


I think he explained it well :)))))))))

I don't know how to do it :)))

Reason: