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

 
demlin:
Yes Instr is, sorry I don't know what SRC is


And what about the code before the for loop... didn't you forget to write? -

Instr = Symbol();
 
since any questions are this one, give me a link or share the sound of the opening bell from the Nymex exchange
 
Roman.:


And then in the code before the for loop... didn't you forget to write? -

Instr=Symbol() I inserted in the init block of the EA, maybe that's the problem?
 
demlin:
I put Instr=Symbol() in my Expert Advisor's init block, maybe there is a problem with it?


Use my construction, you can insert your Instr instead of my usual Symbol () - yours is not correct, besides that you have no control over order selection...

 if (ticket>0)                                               // Если позиция открылась
                    {
                             while(OrderSelect(ticket,SELECT_BY_TICKET)==false)       // Если ордер выбран
                                 {
                                   Sleep(100);
                                 }
                                  double OpenPrice=OrderOpenPrice();
                                      
                                  
                    
                                if (orderType == OP_BUY) 
                                     {
                                       //здесь действия при бае
                                     }
            
                                if (orderType == OP_SELL) 
                                      {
                                        //здесь действия при селле
                                      }   
                            
                    }

I also in my owl - netting avalanche - this construction I use including for order trawl (as you need), besides that I traded owl on real - no problems in this matter - order selection, its trawl... There were no problems at all. Everything is clear and simple - just understand this construction, there's nothing complicated there - everything is classic...

In the loop, go through all orders in the market - find the right ones and trawl them - from the last to the first...

 
Roman.:


Use my construction, you can use your Instr instead of my usual Symbol () - yours is not right, besides this you don't have control over order selection...

I also use this design in my owl - netting Avalanche - also for order trawl (as you need), besides that I traded owl on real - there were no problems in this matter - order selection, order trawl... There were no problems at all. Everything is clear and simple - just understand this construction, there's nothing complicated there - everything is classic...

In the loop, go through all orders in the market - find the right ones and trawl them - from last to first...

Aha, thanks, I'll try to attach your construct. By the way, if it's no secret how is Avalanche, is there a martin there or am I confused?
 
demlin:
Yep, thanks, I'll try and bolt on your design. By the way, if it's no secret how is Avalanche, is there a martin there or am I confused?

Yeah, that's right. Till I took it off the real one. :-))) Refining... See from here to the end of this thread. Now I'm testing variants on demo.
 
One more question. The expression !OrderSelect(orderIndex, SELECT_BY_POS) what does it mean? I can't understand the !
 
demlin:
One more question. The !OrderSelect(orderIndex, SELECT_BY_POS) what does it mean? I cannot figure out the !

! - is a Boolean operation NOT

! false = true

! true = false

 
demlin:
One more question. Expression !OrderSelect(orderIndex, SELECT_BY_POS), what does it mean? I cannot figure out the !

!" - the expression means that if an order is not selected for a position in the list (F1), pressOrderSelect(orderIndex, SELECT_BY_POS) - and read it, we go to the next iteration of the cycle.

"The continue statement transfers control to the beginning of the nearest external while or for statement, causing the beginning of the next iteration. This operator is the opposite of break."

Same here

 if ((OrderSymbol() != Symbol()) || (OrderMagicNumber() != MagicNumber))
      {
         continue;
      }

So, if it is not our tool or not our magician, we should pass to the next loop iteration usingcontinue operator and not continue executing the current iteration...

Thus, it filters (recognizes) exactly those orders that are opened by this owl with its unique magic number and by its work symbol...

Then after the control block of an open (our...:-))))) position, it is subject to binding if the conditions for binding of exactly this (current) selected position in the market have been met...

After a trailing (or not), we proceed to the next iteration (order in the market), if it is available, and work with it.

 
semiromid:

Please don't answer me again. I can do it without you and learn everything!


I've read it, good luck.