From theory to practice - page 773

 
Andrei:

So you can see that the ticket number is taking an old one.

No, I don't get it... Everything works fine - then the same thing... I have to recompile...

 
Alexander_K2:

No, I don't understand... Everything works fine - then the same thing... I have to recompile...

It's an error in extracting the ticket number. Do a printout of all the stages and you'll find it.
 
Alexander_K2:

No, I don't understand... Everything works fine - then the same thing... Have to recompile...

I understand there was an operation with a position (refilling, partial closing, etc.), the ticket changes. It's better to use magick. It doesn't change )))

 
Сергей Таболин:

I understand there has been an operation on a position (topping up, partial closing, etc.), the ticket changes. It is better to use a magick. It doesn't change )))

Nah, something happens when there's heavy tick flow and lots of positions open...

Hell if I know...

Had to read not all ticks but with "thinning" (can't do without it - looks like fate) and increase sample volume - will keep watching...

 
Alexander_K2:

Nah, something happens when there is an intense tick flow and many positions open...


It would be better to post some of the order handling code, then it would be easier to understand what the reason is.

 
Alexander_K2:

Nah, something happens when there's heavy ticking and lots of positions open...

Probably the wrong reading order...

 
Nonsense, guys - it won't stop my desperate push for happiness in the form of the precious Grail.
 
Alexander_K2:
Nonsense, guys - it won't stop my desperate push for happiness in the form of the precious Grail.
// это должно быть вначале программы?
void ClosePositions(string sy="", int op=-1, int mn=-1) {
  int i, k=OrdersTotal();

  if (sy=="0") sy=Symbol();
  for (i=k-1; i>=0; i--) {
    if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
      if ((OrderSymbol()==sy || sy=="") && (op<0 || OrderType()==op)) {
        if (OrderType()==OP_BUY || OrderType()==OP_SELL) {
          if (mn<0 || OrderMagicNumber()==mn) ClosePosBySelect();
        }
      }
    }
  }
}


//а это уже сама программа

ZZ=OrderClose(value1,value2,Bid,10);
   if(ZZ==TRUE)
    {
       (какие то действия)
    }
   if(ZZ==FALSE)
    {
      ClosePositions()
    }
Try inserting this function on order closures
 
Alexander_K2:

Fear not, my friend - physics is stronger than a lousy market. And you are thinking correctly (remembering our communication) - just add kurtosis to asymmetry and everything will be fine. Prepare your pockets.

Everything has been fine for a long time now... why add something?) Here we have a market we know that SB + sharp price spikes otherwise known as fat tails, that's all we have.
So you all here know ahead of time what will happen to the price, the price before and now and after will be about 98% random.
So why not take advantage of this knowledge?)
Even if you do find something, you won't make money fast and it will be very hard work anyway especially for brokers. Most of the normal brokers nowadays don't have normal terminals for work, + lots of restrictions on position opening, not to mention the commissions.

That's the truth - no matter what you do, it won't change...

 
Martin Cheguevara:
Try inserting this function on order closures

Thanks a lot, buddy. I owe you a Holy Grail. Did you dust your pockets?