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

 

Gentlemen officers! I'm writing the advisor "Lieutenant Rzhevsky". He won't paint himself, the bastard. This and that...Somehow...

And there's not much left: an ear, a shoulder and the back of his head a bit...

So, when modifying an order, OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()-3*Point,OrderTakeProfit(),0,CLR_NONE); I only change SL and, although the order is modified correctly,

The log says Order Modify error1 . So there is no error. But something is wrong... Can you tell me, if you don't mind me asking, what is it?

I owe the champagne!


 
CYBOPOB:

Gentlemen officers! I'm writing the advisor "Lieutenant Rzhevsky". He won't paint himself, the bastard. This and that...

And there's not much left: an ear, a shoulder and the back of his head a bit...

So, when modifying an order, OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()-3*Point,OrderTakeProfit(),0,CLR_NONE); I only change SL and, although the order is modified correctly,

The log says Order Modify error1 . So there is no error. But something is wrong... Can you tell me, if you don't mind me asking, what is it?

I owe the champagne!



Normalize the new stop value.
 
MauzerVII:

Now the error is 130, I don't understand why. Who can tell me where I'm going wrong.


You are probably using unacceptably small StopLoss and TakeProfit values, but this is just a guess. There is not enough information.
 
Question for Professionals: We need to pull data from the last closed
order, to keep count of order numbers is not possible because
I have a few EAs working and all of them put and close
Every EA has its own wizard.
The question is about the data from the last closed order in the terminal?
 
MauzerVII:

Now the error is 130, I don't understand why. Who can tell me where I'm going wrong.

Don't normalise the stops inside OrderSend. Do this before RefreshRates and then substitute. Print these values to be sure they are correct. By the way, learn to open a position without a stop, as there are brokerage companies which do not accept orders with stops. After setting one, modify the stops - it will pass.

Very small slippage = 2. The example gives 3 and that's on 4-digit quote. If you set such an EA on 5-digit quote, the slippage will be 0.2 points. There will definitely be errors.
 
vasabu2012:
Question for Professionals: We need to pull data from the last closed
order, to keep count of order numbers is not possible because
I have a few EAs working and all of them put and close
Every EA has its own wizard.
The question is about data from the last closed order in the terminal?

You will find it in Kim's Useful Functions!
 
tara:

Normalize the new value of the stop.

did not help OrderModify(OrderTicket(),OrderOpenPrice(), NormalizeDouble(OrderOpenPrice()-3*Point,Digits),OrderTakeProfit(),0,CLR_NONE);

If I set zero, it sets TP to zero and constantly swears

 

Guys, I don't know Kim, maybe someone knowledgeable could answer in this thread.

I'd really appreciate it!

 
Question for Professionals: We need to pull data from the last closed
order, to keep count of order numbers is not possible because
I have a few EAs working and all of them put and close
Every EA has its own wizard.
The question is about the data from the last closed order in the terminal?
 
vasabu2012:

Guys, I don't know Kim, maybe someone knowledgeable could answer in this thread.

I'd really appreciate it!


Look up on the right side of the search! Write it there and that's it!