Discussion of article "How to Create Your Own Trailing Stop" - page 2

 
Hi ...

I am trying to develop an EA I am having problems with "OrderSend". I do not understand programming language very much, I've already tried a lot of solutions and I did not find ... But it does not work. The message

"return value of 'OrderSend' should be checked"

appears ... It contains no errors, however no position is open during tests ... When testing with the demo account I'm not having success. The test runs and no position is opened at any time.


Can someone help me by indicating the necessary adjustments I should make?

 I test it on

BOVESPA (Brazil)/ WINJ17/Demo Account/Metatrade 5

Can someone help me?

Thank's

 
MetaQuotes Software Corp.:

New article How to Create Your Own Trailing Stop is published:

Author: Дмитрий

 
Hello. The code makes orders but does not modify the stop loss. What changes to the code can i make to fix this error?
Files:
error.JPG  87 kb
 

Look like this is a dead discussion but I will put my comments in.


There are a couple of errors found during compiling that need to be resolved.

In the ZeroMemory request on line 116  the compiler says

         'ZeroMemory' - unexpected toke, probably type is mission?

         'mrequest' - declaration without type

This looks like the mrequest was not properly declared with a type......Not sure how to fix this.


Also,


       return value of "OrderSend" should be checked.   on line215 and 262


This looks like it might be returning a value it should not.


Any help in fixing these two issues would be most appreciated.

Chris

 
Hi folks, I changed OrderSend for the Trade object, much easier. Also the event is executed every second, there is no need for such a fast frequency. I changed it to every 60 seconds and it improves drastically the performance.
Reason: