stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

LibOrderReliable4
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=525
Page 3 of 3
Author:  ovisun [ Mon Feb 10, 2014 10:26 am ]
Post subject:  Re: LibOrderReliable4

Hi,
Sorry, was my mistake, in xMeter I changed TP-moving to 5000, now changed to 10 and the updating of TP is OK. I put the blame on LibOrderReliable instead of myself.

Best Regards,
Ovidiu.
Author:  mbkennel [ Sun Mar 02, 2014 8:17 am ]
Post subject:  LibOrderReliable4

Hi slipshod, thanks for the updates on my code.

I would like to bequeath the maintenance of LOR to somebody here who is likely to be using it frequently. As you've noticed, I haven't been around much lately. In any case, I certainly intend this forum to be the 'reference' version.

I've been working on my day job & such, and also, honestly, I haven't been confident in the success of any FX strategy I've seen---though I have not looked far. What is actually working these days?

My personal interests and intuition is that we should be doing what the quants have been doing for 20 years and apparently works, i.e. statistical arbitrage. The thread by Mediator on this looked quite intriguing but the R-Empty4 integration was an awful hack---because Empty4 is a hack.
Author:  och [ Tue Mar 25, 2014 9:37 am ]
Post subject:  LibOrderReliable4

Hi guys,
I just update Empty4 to 625 yesterday and I am getting crasy and crasy and crasy!
I just post a very simple example of a script to open an order using libOrderReliable4 library.
I put also the files as you know :
1. libOrderReliable4.mqh need to be in MQL4/include and
2. libOrderReliable4.mq4 in MQL4/Libraries
3. then Test_EnterTrade in MQL4/scripts

libOrderReliable4.mqh, libOrderReliable4.mq4 (with warnings...) and Test_EnterTrade compile correctly... but when I tried to execute I have the following error : Cannot find 'OrderSendReliable' in 'LibOrderReliable4' any idea?

Regards,
och
Author:  och [ Tue Mar 25, 2014 11:36 am ]
Post subject:  LibOrderReliable4

och » Tue Mar 25, 2014 11:37 am wrote:Hi guys,
I just update Empty4 to 625 yesterday and I am getting crasy and crasy and crasy!
I just post a very simple example of a script to open an order using libOrderReliable4 library.
I put also the files as you know :
1. libOrderReliable4.mqh need to be in MQL4/include and
2. libOrderReliable4.mq4 in MQL4/Libraries
3. then Test_EnterTrade in MQL4/scripts

libOrderReliable4.mqh, libOrderReliable4.mq4 (with warnings...) and Test_EnterTrade compile correctly... but when I tried to execute I have the following error : Cannot find 'OrderSendReliable' in 'LibOrderReliable4' any idea?

Regards,
och
All,
I found it!
We just need to add the keyword 'export' in the mq4 file for all function we need to include into the mqh file...

Code: Select all

int OrderSendReliable(string symbol, int cmd, double volume, double price,
                      int slippage, double stoploss, double takeprofit,
                      string comment, int magic, datetime expiration = 0,
                      color arrow_color = CLR_NONE) export
{
Regards,
och
Author:  madpipa [ Mon Apr 21, 2014 5:51 am ]
Post subject:  LibOrderReliable4

Matt - I endorse the sentiments of others here & say Thanks! :hi: I am fairly new to writing EAs but was lucky to find your invaluable work. It has already saved me much heartache!

Slipshod - thanks for your work in adding some more twists. I do, however, have a problem. I agree with you that sometimes there were too many verbose comments being sent back by the commands, especially when I was sending back info from my EAs to try & debug errors.

This is obviously a 'newb' question :oops: , but how do I implement the O_R_SetVerbosity function?
All else seems to be setup correctly. My test EA is using OrderReliable to place trades & not returning any errors. So now I want to play with the various settings to see what level is the best for forward testing an EA.

Thanks to you both for your great work.

Cheers,
Mick
Author:  lujza [ Tue Nov 10, 2015 12:50 am ]
Post subject:  LibOrderReliable4

Hi,
i'm a newbie to this library, and i want to share how to install and use it for my fellow newbies.
I use official LibOrderReliable 4.1 downloaded from page 1 of this thread http://www.stevehopwoodforex.com/phpBB3 ... 525#p12002 :good:
I have tested official LibOrderReliable 4.1 above on Empty4 build 902 and it works great ! :smile:
This is for Empty4 build 600 or later.

I _STRONGLY_ suggest using a demo account and thoroughly tested your EA, before using it on live account. :geek:

Preparation:
------------

1. Open Empty4, login to a trade account (demo or live).
On Empty4 top menu, click Tools, click Options.
click "Expert Advisors" tab, tick "Allow Automated Trading", click OK.

2. on Empty4 top menu, click File, click "Open Data Folder".
on Windows File Explorer:
Copy "LibOrderReliable4.mqh" to MQL4\Include subfolder.
Copy "LibOrderReliable4.mq4" to MQL4\Libraries subfolder.

3. Exit and restart Empty4. This is neccessary to automatically compile the "LibOrderReliable4.mq4" library.

Code Writing:
-------------

4. Open your custom EA MQ4 source code, and add
--------------------------------
#include <LibOrderReliable4.mqh>
--------------------------------
anywhere on top section of your custom EA.

then you can use functions such as OrderSendReliable().
don't forget to check MKT functions, I personally prefer OrderSendReliableMKT2Step() over OrderSendReliable().

5. Recompile, and voila your EA is already using LibOrderReliable ! Congrats ! :yahoo:

Final Notes:
---------------

Everytime you change login account (eg from demo account to live account or vice versa) don't forget to redo Step 1 above.
Otherwise your EA's automated live trading might stop working.


That's all.
I wish you a great experience using this LibOrderReliable 4.1 on Empty4 build 600+ ! :cheer:
Author:  pascalx [ Fri Apr 01, 2016 11:23 pm ]
Post subject:  LibOrderReliable4

Much thanks for this. I am beginner in MQL and was already wondering how reliable the orders are and what kind of error checking I would need to do in case an order is not placed or closed. This code hopefully saves a lot of headache! Thanks again.
Author:  SteveHopwood [ Fri Apr 01, 2016 11:25 pm ]
Post subject:  LibOrderReliable4

pascalx » Fri Apr 01, 2016 11:23 pm wrote:Much thanks for this. I am beginner in MQL and was already wondering how reliable the orders are and what kind of error checking I would need to do in case an order is not placed or closed. This code hopefully saves a lot of headache! Thanks again.
It does not any more, and that is not Matt's fault. The Cretins at Crapperquotes excelled themselves when they broke his library. Check in with my shell codes to find out how I combat their lunacy.

:xm:
Author:  pascalx [ Sat Apr 02, 2016 9:59 am ]
Post subject:  LibOrderReliable4

Ohh too bad. Ok I will look for the other code. Thanks.
Author:  FFFOOO [ Wed Jul 20, 2016 7:02 am ]
Post subject:  LibOrderReliable4

HI lujza

Thanks for detailed information.

I got an error that "import not closed...on LibOrderReliable4.mqh" when compiled
MTE V5 Build 1351 (Empty4 V4 Build 988).

But it was fixed insert "#import" to the last of script for closing import function.

Everything fine now.
JM2C...
All times are UTC Page 3 of 3