• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 1:19pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 1:19pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Trading multipair triangles, no stoploss 77 replies

'Blessing' EA Modification Wanted 3 replies

Single, Few Pair Traders (1-4) vs. MultiPair Traders (8-20) 0 replies

Coding Request for Multipair MTF ADR Dashboard 2 replies

trying to make a multipair buy and sell script 6 replies

  • Trading Systems
  • /
  • Reply to Thread
  • Subscribe
  • 95
Attachments: Blessing Multipair EA
Exit Attachments
Tags: Blessing Multipair EA
Cancel

Blessing Multipair EA

  • Last Post
  •  
  • Page 1 23456 23
  • Page 1 234 23
  •  
  • Post #1
  • Quote
  • First Post: Edited Feb 4, 2020 4:15pm Jan 11, 2020 11:22pm | Edited Feb 4, 2020 4:15pm
  •  ursinho4711
  • Joined Nov 2019 | Status: Member | 1,121 Posts
My first thread in this forum, I am so excited...

The idea for this EA started in another thread:
https://www.forexfactory.com/showthread.php?t=792598

Therefore this EA is based on the wonderful EA called “Blessing 3 v3.9.6.09”.

The idea to try to build a multipair version came up in the above mentioned thread. After some brainstorming I began to like the idea. Though Blessing and multipair is kind of a contradiction. Blessing has so many parameters to finetune the EA exactly to your pair to trade, the time frame, your risk and and and.
But anyway it might be worth a try to find some “global settings” that work well for all pairs. Just adjusted to the time frame and other global parameters (risk, broker and and and).

What did I basically do?

  1. I took the latest source code from the original thread (“Blessing 3 v3.9.6.13”).
  2. … cleaned it from almost all display output
  3. … introduced a big struct that holds the variables for the pair to trade
  4. The start function is running a long “for to” loop over an array of the structs for the pairs to trade
  5. I took out the hedge function
  6. only one and fixed magical number to be able to monitor the trades via a dashboard
  7. ...moved the main part of the holiday check to the beginning of the start function


Sounds simple but gave me some headache as the debug options for bugfixing in MT4 are really poor, compared to a “real” compiler.
I can only perform backtesting with one pair at a time, which is not enough for a multipair EA. In realtime mode I can see whether it is working, but it is difficult to see if it is working in the right way.
Enough words written: please take a look at the code and feel free to give feedback. There are for sure still many open points that I would love to discuss here in this thread.
Especially when it comes to global settings (e.g. number of open trades) that might need to be moved into the struct.
And please play around with different set-files to see which settings come close to “one size fits all” (thx Grand Wazoo). As a good starting point I can recommend the collection from Richard96816, that can be found in this post:

https://www.forexfactory.com/showthr...4#post12628494
(thanks a million, Richard!)

→ for backtesting, the setting for „Use the 28 default pairs“ must be set to false and in the „comma separated own pair list“ only the symbol (e.g. XAUUSD) that is used in the tester has to be input.
→ for live testing (better on a demo first..) please do NOT use small timeframes and many pairs with only one entry condition. The EA will open, close, modify in such a high frequency, that your broker will close your account faster than you can click. Happened to me ;-)

Have fun!

REMEMBER

This is a code for learning and testing purposes only. Everything you do, you do on you own risk!

In no event I will be liable for any damages whatsoever.

Attached File(s)
File Type: txt BlessingV24beta-XUSUSDTest.set.txt   9 KB | 3,451 downloads
File Type: ex4 BlessingLite_3_v3.9.6.34_gamma.ex4   192 KB | 2,854 downloads | Uploaded Jan 26, 2020 9:41am
File Type: mq4 BlessingLite_3_v3.9.6.34_gamma.mq4   130 KB | 3,633 downloads | Uploaded Feb 4, 2020 4:14pm
  • Post #2
  • Quote
  • Jan 11, 2020 11:54pm Jan 11, 2020 11:54pm
  •  ajaykarkhane
  • | Joined Jun 2014 | Status: Member | 124 Posts
Thanks a lot for starting this journey with new thread
I have very little knowledge on coding part but from time to time I can test with the setup I am having and present the case here .
Thanks .. yes thanks to Richard also he has given lots of new ideas to use the old blessing code definitely in new way.
 
1
  • Post #3
  • Quote
  • Jan 12, 2020 1:52am Jan 12, 2020 1:52am
  •  ursinho4711
  • Joined Nov 2019 | Status: Member | 1,121 Posts
Remember that post?
https://www.forexfactory.com/showthr...7#post12551567
Well, I used the settings and made a backtest from 01.Nov.2019 to 10.Jan.2020. 5 Minutes timeframe, for all 28 pairs. What can I say: that already looks like the winner to be tested on the Blessing-Multipair. Can't wait for Sidney open...
Here are the results:
Attached Image
 
5
  • Post #4
  • Quote
  • Jan 12, 2020 4:01am Jan 12, 2020 4:01am
  •  cescof
  • Joined Jun 2013 | Status: Member | 1,004 Posts
Quoting ursinho4711
Disliked
Remember that post? https://www.forexfactory.com/showthr...7#post12551567 Well, I used the settings and made a backtest from 01.Nov.2019 to 10.Jan.2020. 5 Minutes timeframe, for all 28 pairs. What can I say: that already looks like the winner to be tested on the Blessing-Multipair. Can't wait for Sidney open... Here are the results: {image}
Ignored
Thanks for new 3dand new blessing multipairs...
So if i understood the result above are backtested using the 5min set file from other 3d right?
What about set file you posted xususd... ?
And how many max pairs do you seggests to use to avoid broker limits?
Thanks
Regards
 
 
  • Post #5
  • Quote
  • Edited 5:05am Jan 12, 2020 4:28am | Edited 5:05am
  •  ursinho4711
  • Joined Nov 2019 | Status: Member | 1,121 Posts
Quoting cescof
Disliked
Thanks for new 3dand new blessing multipairs...
Ignored
Your welcome! And thank you for joining the thread!

Quoting cescof
Disliked
So if i understood the result above are backtested using the 5min set file from other 3d right?
Ignored
Right! I have a bunch of setfiles from the other Blessing thread. I picked that one for backtesting first, as it is alread used successfully on a live account (with the original blessing).

Quoting cescof
Disliked
What about set file you posted xususd... ?
Ignored
That is just a set-file example for backtesting with the MT4 strategy tester. One pair, no 28 default pairs.

Quoting cescof
Disliked
And how many max pairs do you seggests to use to avoid broker limits?
Ignored
The number of pairs is not the biggest problem: the entry conditions are much more important. The default setting has only the MA as entry indicator. This opens trades for almost every pair instantly. Good for testing, bad for trading ;-)

The set-file I used for backtesting is using Bollinger Bands. Does not open too many trades over the time, not even in the M5 time frame. You can see it in the statistics. Okay, that's backtesting on a demo account. Tonight I will start with forward testing on the demo account...

I should get some sleep as well...

************************edit********************************
here is the direct link to the "BLESS 5 MINUTES ALL PAIRS ONE DAY 50 DOLLARS.set":
https://www.forexfactory.com/attachm...9&d=1532217693
 
3
  • Post #6
  • Quote
  • Jan 12, 2020 5:08am Jan 12, 2020 5:08am
  •  mankindeg
  • | Joined Mar 2015 | Status: Member | 143 Posts
Do we have a setfile to test on monday?
 
 
  • Post #7
  • Quote
  • Jan 12, 2020 5:22am Jan 12, 2020 5:22am
  •  ursinho4711
  • Joined Nov 2019 | Status: Member | 1,121 Posts
Quoting mankindeg
Disliked
Do we have a setfile to test on monday?
Ignored
Basically you can use any testfile from older "original" blessing versions. Parameters that do not exist anymore will be omitted, new parameters that are not contained in older setfiles will use default settings.

As the default for BlessingLite Multipair is UseDefaultPairs = true, you just need to load any blessing setfile that you like and then get started...

*************edit**********
I will try that one tonight:
Attached File(s)
File Type: txt BlessingLiteV24-5Min-AllPairs.set.txt   2 KB | 1,700 downloads
 
2
  • Post #8
  • Quote
  • Jan 12, 2020 5:46am Jan 12, 2020 5:46am
  •  richard96816
  • Joined Nov 2018 | Status: Member | 564 Posts
Good show!

You might want to create a settable minimum delay between trades to fix the over-trading problem. That's a common feature on multi-pair EAs.

You could save the time from the most recent open of each pair, then compare with current time each attempt to open another trade. Only allow new opens to succeed if elapsed time is greater than some externally set value.

Good luck!
 
1
  • Post #9
  • Quote
  • Jan 12, 2020 10:28am Jan 12, 2020 10:28am
  •  ursinho4711
  • Joined Nov 2019 | Status: Member | 1,121 Posts
Quoting richard96816
Disliked
Good show!
Ignored
Thanks for the feedback Richard! That's the way I hope this thread will continue...

Quoting richard96816
Disliked
You might want to create a settable minimum delay between trades to fix the over-trading problem. That's a common feature on multi-pair EAs. You could save the time from the most recent open of each pair, then compare with current time each attempt to open another trade. Only allow new opens to succeed if elapsed time is greater than some externally set value.
Ignored
The challenge is not only over-trading, it is also the "over-modifying". Moving TP, moving buy/sell/limits/stops: all this has to be monitored. I will wait and see how the EA will behave tonight, with the bollinger band indicator compared to the MA. In the backtest even on the M5 timeframe bollinger is much more calm...

Quoting richard96816
Disliked
Good luck!
Ignored
Thanks... but luck is not the only thing I need: my idea was to use this thread as an open source community. Everybody can and should take a look at the source code and see where it can be improved or find these small bugs... if someone knows how to transfer the code into mq5 quickly, this would be advantageous for debugging. Setting breakpoints in the strategy tester would already save hours during development.

Okay, next to-do would be the delay parameter and something like this (setting from a dashboard EA):
Attached Image
 
1
  • Post #10
  • Quote
  • Jan 12, 2020 11:30am Jan 12, 2020 11:30am
  •  kofix11
  • | Joined Dec 2011 | Status: Member | 746 Posts | Online Now
Quoting ursinho4711
Disliked
Remember that post? https://www.forexfactory.com/showthr...7#post12551567 Well, I used the settings and made a backtest from 01.Nov.2019 to 10.Jan.2020. 5 Minutes timeframe, for all 28 pairs. What can I say: that already looks like the winner to be tested on the Blessing-Multipair. Can't wait for Sidney open... Here are the results: {image}
Ignored
Thanks for your effort! Looks interesting.
 
 
  • Post #11
  • Quote
  • Jan 12, 2020 1:54pm Jan 12, 2020 1:54pm
  •  pantera1
  • | Joined Mar 2018 | Status: Member | 50 Posts
The EA works fine in the Strategy Tester but when I try to install it on a live chart, my MT4 won't let me. Accordingly, the following error message appears in the Journal:

"2020.01.12 10:29:02.624 'BlessingLite_3_v3.9.6.24_beta' is not expert and cannot be executed"
 
 
  • Post #12
  • Quote
  • Jan 12, 2020 2:29pm Jan 12, 2020 2:29pm
  •  ursinho4711
  • Joined Nov 2019 | Status: Member | 1,121 Posts
Quoting pantera1
Disliked
The EA works fine in the Strategy Tester but when I try to install it on a live chart, my MT4 won't let me. Accordingly, the following error message appears in the Journal: "2020.01.12 10:29:02.624 'BlessingLite_3_v3.9.6.24_beta' is not expert and cannot be executed"
Ignored
Which build are you using? Did you put the EA in the right folder?

I used the mq4 file in different broker installations, all build 1220. No problems. Compiles without error.
 
 
  • Post #13
  • Quote
  • Jan 12, 2020 2:30pm Jan 12, 2020 2:30pm
  •  Paolino
  • | Joined Mar 2018 | Status: Member | 80 Posts
Quoting pantera1
Disliked
The EA works fine in the Strategy Tester but when I try to install it on a live chart, my MT4 won't let me. Accordingly, the following error message appears in the Journal: "2020.01.12 10:29:02.624 'BlessingLite_3_v3.9.6.24_beta' is not expert and cannot be executed"
Ignored

I initially encountered the same issue with other Blessing versions and solved changing int start() method with void OnTick().
See here:
https://www.forexfactory.com/showthr...4#post12673354

Perhaps it could be useful to update source code naming according to new MT4 Build 600+ compliance.
Best regards.
Discipline and winning attitude
 
1
  • Post #14
  • Quote
  • Jan 12, 2020 2:39pm Jan 12, 2020 2:39pm
  •  ursinho4711
  • Joined Nov 2019 | Status: Member | 1,121 Posts
Quoting Paolino
Disliked
{quote} I initially encountered the same issue with other Blessing versions and solved changing int start() method with void OnTick(). See here: https://www.forexfactory.com/showthr...4#post12673354 Perhaps it could be useful to update source code naming according to new MT4 Build 600+ compliance. Best regards.
Ignored
Jipp, I was reading about that as well. Anyone knows why it works fine on all my new 1220 build installations?

Remember: when you change to OnTick(), you have to change also all the return calls!
 
1
  • Post #15
  • Quote
  • Jan 12, 2020 2:40pm Jan 12, 2020 2:40pm
  •  detector
  • Joined Dec 2017 | Status: Member | 3,710 Posts
Quoting pantera1
Disliked
The EA works fine in the Strategy Tester but when I try to install it on a live chart, my MT4 won't let me. Accordingly, the following error message appears in the Journal: "2020.01.12 10:29:02.624 'BlessingLite_3_v3.9.6.24_beta' is not expert and cannot be executed"
Ignored
Just to verify, I placed the EA on to a live chart with no issues, not tried ST but the assumption would be, no issues, (MT4 version 4 build 1220) still testing the older version of blessing.
Ursinho, well done and good luck on the new threadD
I don't need to be good at the game, only good enough to beat my opponent,
 
1
  • Post #16
  • Quote
  • Jan 12, 2020 2:45pm Jan 12, 2020 2:45pm
  •  pantera1
  • | Joined Mar 2018 | Status: Member | 50 Posts
Just to confirm; I am using build 1220 and the EA is in the correct folder. I had been using Blessing_3_v3.9.6.13_beta without any issues.
 
1
  • Post #17
  • Quote
  • Jan 12, 2020 2:49pm Jan 12, 2020 2:49pm
  •  ursinho4711
  • Joined Nov 2019 | Status: Member | 1,121 Posts
Quoting pantera1
Disliked
Just to confirm; I am using build 1220 and the EA is in the correct folder. I had been using Blessing_3_v3.9.6.13_beta without any issues.
Ignored
Any messages when you compile it in the Meta-Editor? I will change the code to OnTick when my daughter goes to sleep (probably not before midnight ;-)) )
 
1
  • Post #18
  • Quote
  • Jan 12, 2020 2:54pm Jan 12, 2020 2:54pm
  •  Paolino
  • | Joined Mar 2018 | Status: Member | 80 Posts
Quoting ursinho4711
Disliked
{quote} Jipp, I was reading about that as well. Anyone knows why it works fine on all my new 1220 build installations? Remember: when you change to OnTick(), you have to change also all the return calls!
Ignored
Yes, I forgot to write that to maintain backward compatibility with Blessing code I renamed int start() to int DoStart() called by void OnTick():

void OnTick()
{
int retValue = DoStart();
}

int DoStart() // ex start()
{
...
Discipline and winning attitude
 
1
  • Post #19
  • Quote
  • Jan 12, 2020 3:03pm Jan 12, 2020 3:03pm
  •  pantera1
  • | Joined Mar 2018 | Status: Member | 50 Posts
No warnings or errors when I compile the .mq4

Attached Image
 
1
  • Post #20
  • Quote
  • Jan 12, 2020 3:19pm Jan 12, 2020 3:19pm
  •  ursinho4711
  • Joined Nov 2019 | Status: Member | 1,121 Posts
Quoting pantera1
Disliked
No warnings or errors when I compile the .mq4 {image}
Ignored
See if that one works, I changed everything to OnXXX...
Attached File(s)
File Type: ex4 BlessingLite_3_v3.9.6.25_beta.ex4   186 KB | 1,088 downloads
File Type: mq4 BlessingLite_3_v3.9.6.25_beta.mq4   126 KB | 1,449 downloads
 
4
  • Trading Systems
  • /
  • Blessing Multipair EA
  • Reply to Thread
    • Page 1 23456 23
    • Page 1 234 23
1 trader viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023