Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 786

 
Leonid123456:

Hello. There is a virtual stop. Which closes part of the lot at a certain distance from the price. How to make it close each time the price moves further bystep1 pips. That is, if the price moves one morestep1 point, it will close again and so on...

Simply, when part of the order is closed, place Ask in the variable SL_VirtualBuy which should be at the level of global variables.
 
AlexeyVik:
Just put Ask in the SL_VirtualBuy variable which should be at the level of global variables when closing part of the order.
Thank you!
 
AlexeyVik:

The problem is different. In your drawings, there is no unambiguity. Between MIN2 in the first figure and MIN2 in the second figure I see at least five similar lows. How do you explain that these minima have to be ignored?

Otherwise as I suggested at first CopyLow and from the resulting array ArrayMinimum and ArrayMaximum. Then change from which bar and how much to copy and again look for maximum and minimum.

Thank you! I'll think how to do it.
 

Good afternoon.

Please advise. I am opening a position:

extern int       Magic = 20781;

... ... ... ...

ti=OrderSend(Symbol(),OP_BUY,Lot,Ask,3,NormalizeDouble(Bid-StopLoss*Point,Digits),
                       NormalizeDouble(Ask+TakeProfit*Point,Digits),"Номер .... ", Magic,0,Green);

How can I set the position comment to display theMagic value after the word number?

I.e. in this case: Number 20781

 
Rita:

Good afternoon.

Please advise. I am opening a position:

How can I set the position comment to display theMagic value after the word number?

I.e. in this case: Number 20781.

StringConcatenate would help.

StringConcatenate("Номер .... ", Magic)
 
I have a question, how to do the following: go through all orders that are currently in place, select orders with my magician and if the order is one and it is a limit order (buy_stop or sell_stop), then delete it. Please advise.
 
AlexeyVik:

StringConcatenate will help.


StringConcatenate("Номер " Magic, Magic)
and you'll be happy.
 
woin2110:

and you'll be happy.
How can you be happy with a compilation error?
 
woin2110:
I have a question, how to do the following: go through all orders that are currently in place, select orders with my magician and if the order is one and it is a limitpending (buy_stop or sell_stop), then delete it. Please advise.
In the loop increment the counter on every "own" pending and remember the ticket, if the counter after the loop = 1 then delete the order with that ticket.
 
AlexeyVik:
What kind of happiness is there in a compilation error?

Well, that's the only way

StringConcatenate("Номер ", Magic)

and it should show up without a comma:Number 20781