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

 
evillive:
Fix the code, you can't see it from here, so it can't be helped.

No, I don't think so. They're happy to help here.
 
artmedia70:
No, I don't see why not. They are happy to help here.


I'm getting bored sending everyone there, let the telepaths find it themselves.
 
Leo59:
I can't figure out what's wrong? In the tester everything works, but on the real and demo, when I try to open an order, I get "Error 0". GetLastError() returns "0" which means no error. What does it mean?


You have to call GetLastError() immediately after OrderSend() and assign the value to a variable. Then, when the error message is displayed, output the value of the variable.

 
Integer:


GetLastError() must be called immediately after OrderSend() and the variable value must be assigned. Then, when the error message is displayed, output the value of the variable.


So, the value of the variable returned by GetLastError() is "0". Is this the question?
 
Leo59:

So the value of the variable returned by GetLastError() is "0". Is that the question?

No. Only the error value is output. either publish the code or contact Jobs
 
At the same time, the log shows:
2014.02.25 13:37:27.484 '36047089': order buy 0.01 EURJPY opening at 0.000 sl: 140.454 tp: 141.754 failed [Invalid S/L or T/P]

What is wrong with a Stop=30p and Take=100?

I have just got off the phone with my friend and he told me he had the same problem. I cannot explain it, it disappeared on its own. I cannot let it go like that. What to do?
 

Hi.

How to find the first bar on the M15 on Monday of last week ?

 
Leo59:
At the same time, the log shows:
2014.02.25 13:37:27.484 '36047089': order buy 0.01 EURJPY opening at 0.000 sl: 140.454 tp: 141.754 failed [Invalid S/L or T/P]

What is wrong with a Stop=30p and Take=100?

I have just got off the phone with my friend and he told me he had the same problem. I cannot explain it, it disappeared on its own. I cannot let it go like that. What to do?

Well, they've finally thought of something sensible to write.

If you do not know how to place stop-losses in Alpari, then you may mislay them. OrderModify() will help.

 
gince:

Hi.

How do you find the first bar on the M15 on Monday of last week ?


And the first is always the first, on any TF. Offset before it:

       int shift=iBarShift(NULL,0,iTime(NULL,PERIOD_W1,1));
 
evillive:

Well, at last they have thought of writing something sensible.

So you can't place stops on alpari right away, only after opening, that's their peculiarity. OrderModify() to the rescue.



Yesterday you could, but today you can't. This is strange.
Reason: