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

 

Allis:
Allis:


If only I knew how to do it.... Removed from

//if (OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), price + koef*325*Point, 0))

if (OrderModify(OrderTicket(), OrderOpenPrice(), price + koef*325*Point, 0))

there are soooo many errors sprinkled in there....


What does it mean to limit the check? And you shouldn't have thrown OrderStopLoss(). It violated the number and sequence of parameters in OrderModify() function. Hence the errors.

 
PapaYozh:
a significant slippage is possible in a gap.
In such a situation, without knowledge of the logic of the TS it is difficult to give a correct answer. We can introduce an additional alert for such situations - if a position is closed below the value of a stop (buy) or above the stop (sell) - look for the nearest price change in the history and determine if there was a gap, and if so, display a message that the position was closed in a gap. If not - handle the situation differently... I repeat - it is difficult to advise something without knowledge of TS. But it is necessary to handle such situations.
 

Hello, could you tell me how to pull the closest number from an array to the smallest number you can find, say we have a certain array:

double Mass_data1[] = { 0.5,1.5,3.0,5.3,7.5,7.0};

and some number:

double CurrValue = 5.5;

I need to take out the nearest smaller number from 5.5, i.e. 5.3. Can you please tell me how to do this?

 
You loop through the elements of the array, and if they are not larger than the number you are looking for, you store it as a potential search result. If the next number is greater than the desired number, you interrupt the loop.
 
SepulcaWhat do you mean by limited to checking? And you should have thrown out OrderStopLoss() for nothing. It violated the quantity and sequence of parameters in function OrderModify(). Hence the errors.


Thank you for not leaving my requests for help without attention! Not everyone has patience for girls.

What I really need is for Sova not to change the SL of already open orders.

Because it works like this:

1. We open an order with a normal SL and TP according to the algorithm

2. A reply order, either limit or breakthrough, is placed at the SL level.

3. Then a planned processing of Force Majeure (sometimes it is not planned, due to communication failure) occurs, Sova deletes all the pending orders and places them again with still correct TP and SL.

4 And then Sova, for some reason, changes SL of open orders, apparently for some reason, considering them not correct....

5. Accordingly, the SL of the open order no longer corresponds to the return order, and then the mess started....

The goal is to either take away from Owl the ability to modify open orders, or at least prohibit the Scheduled Processing of Force Majeure.

 
MikeM:
You loop through the elements of the array, and if they are not larger than the number you are looking for, you store it as a potential search result. If the next number is bigger than the desired one, you break the loop.

Thank you, it seems clear, I'll try it now))
 
Allis:


Thank you for not ignoring my requests for help! Not everyone is patient with the girls.

I absolutely need Sova not to change the SL of already open orders.

I should not have changed the SL of an opened order because the situation is as follows:

1. We open an order with a normal SL and TP according to the algorithm.

2. A reply order, either limit or breakthrough, is placed at the SL level.

3. Then a planned processing of Force Majeure (sometimes it is not planned, due to communication failure) occurs, Sova deletes all the pending orders and places them again with still correct TP and SL.

4 And then Sova, for some reason, changes SL of open orders, apparently for some reason, considering them not correct....

5. Accordingly, the SL of the open order no longer corresponds to the return order, and then the mess started....

The goal is to either take away from Owl the possibility to modify open orders, or at least prohibit the Scheduled Processing of Force Majeure.


Not knowing the EA logic, I would expect that if there is one order, it has been closed by a SL, another one will be placed right away. So, there may not be more than one open order at any given time, right? If a force majeure event occurs and you re-placed any pending orders, then you are correct and, when setting new pending orders, you need to correct the open SL to match the opening price of the new pending order. Perhaps, recalculation of SL for modification of the open is not correct. Similarly, if used, with TP.
 
artmedia70:

Thank you ... :)

Mostly - I do it when I need a distraction from my code. Helps to get my thoughts in order.

I'll support you in your joy, I'm going to pour myself a Cinzano... To you and your happiness!!! :)

Would you be so kind as to splash!!!!!!!!!!!!

Cinzano! Une Momento ! !!!!!!

;-)

 
Sepulca:

I do not know the EA logic, but I want to suggest that if there is one order, it has closed through the SL, another one has been placed. So, there may not be more than one open order at any given time, right? If a force majeure event happens and you re-placed any pending orders, in which case everything is correct and when setting new pending orders, you need to correct the open SL to match the opening price of the new pending order. Perhaps, recalculation of SL for modification of the open is not correct. Similarly, if used, with TP.


No, the open order has an SL, and the order is not alone.

Each order at the level of its SL is followed by a counter-order, either limit or breakout. It is already there, instead of being opened from the market when the open order leaves at the SL.

And then as I described above...

I don't know the logic of the EA's operation.

 
Roman.:
I mean, that's my partner in crime! I mean that we are lucky and everything is fine and that I know how to make money on the Exchange!

Demo is all bullshit... Here's a screenshot from January 2, the demohttp://clip2net.com/s/2Iziy
Reason: