LibOrderReliable4

User avatar
ovisun
Trader
Posts: 63
Joined: Sun Mar 18, 2012 11:54 am
Location: Romania, Constanta

Re: LibOrderReliable4

Post by ovisun »

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.
Image
mbkennel
Trader
Posts: 29
Joined: Tue Dec 20, 2011 5:40 am

LibOrderReliable4

Post by mbkennel »

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.
"It is a capital mistake to theorize before one has data." Sir Arthur Conan Doyle.
"If your experiment needs statistics, you ought to have done a better experiment" Lord Rutherford.
och
Posts: 7
Joined: Fri Sep 14, 2012 8:19 am

LibOrderReliable4

Post by och »

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
You do not have the required permissions to view the files attached to this post.
och
Posts: 7
Joined: Fri Sep 14, 2012 8:19 am

LibOrderReliable4

Post by och »

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
madpipa
Trader
Posts: 62
Joined: Fri Oct 19, 2012 12:59 am
Location: Gold Coast, Australia

LibOrderReliable4

Post by madpipa »

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
lujza
Posts: 1
Joined: Fri Nov 06, 2015 3:11 pm

LibOrderReliable4

Post by lujza »

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:
User avatar
pascalx
Trader
Posts: 20
Joined: Mon Mar 28, 2016 2:40 pm

LibOrderReliable4

Post by pascalx »

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.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

LibOrderReliable4

Post by SteveHopwood »

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:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
pascalx
Trader
Posts: 20
Joined: Mon Mar 28, 2016 2:40 pm

LibOrderReliable4

Post by pascalx »

Ohh too bad. Ok I will look for the other code. Thanks.
FFFOOO
Posts: 2
Joined: Mon Jan 14, 2013 7:22 am

LibOrderReliable4

Post by FFFOOO »

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...
Post Reply

Return to “Coders Hangout”