• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 8:29am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 8:29am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

MQL4 code help 12 replies

Harvester 14 replies

MQL4 Language Most Recent Version is it updated beyond the tutorial on the mql4 websi 6 replies

MT4 Indicators Usage Tutorial/MQL4 Reference Documents 36 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 1
Attachments: C++ MQL4 Forex Harvester
Exit Attachments
Tags: C++ MQL4 Forex Harvester
Cancel

C++ MQL4 Forex Harvester

  • Last Post
  •  
  • 1 Page 23 4
  • 1 Page 23 4
  •  
  • Post #21
  • Quote
  • Jul 27, 2016 6:39am Jul 27, 2016 6:39am
  •  pascalx
  • | Joined Apr 2016 | Status: Member | 32 Posts
Quoting JensItzig
Disliked
FIXED API access must be granted from your broker. I understand why you are doing it, but i don't see that the reward will high enough for the effort you put in. Since you need to use an EA to communicate you are doomed and bound to MT4. Multithreading can only be achieved via multiple terminals (that's the only reason is see) but since you don't build a really big dashboard or multi pair EA you can achieve this also with MQ4. Since now i have found only a few things that can be not done by MQ4 (and mostly you can find a workaround). To show you...
Ignored
Yea there remains some logic on MQL side of course to redirect the requests from C++ to the MQL API functions. But once that is done, the entire trading logic can be in C++. I respect you for having such confidence in MQ Language and I am actually surprised people can create amazing things with it. But as I said, I don't like it and I don't want to use it.
 
 
  • Post #22
  • Quote
  • Jul 27, 2016 6:41am Jul 27, 2016 6:41am
  •  braintheboss
  • Joined Nov 2012 | Status: Coder | 8,520 Posts
Quoting JensItzig
Disliked
FIXED API access must be granted from your broker. I understand why you are doing it, but i don't see that the reward will high enough for the effort you put in. Since you need to use an EA to communicate you are doomed and bound to MT4. Multithreading can only be achieved via multiple terminals (that's the only reason is see) but since you don't build a really big dashboard or multi pair EA you can achieve this also with MQ4. Since now i have found only a few things that can be not done by MQ4 (and mostly you can find a workaround). To show you...
Ignored
I agree with you. MT4 performance issues can be easily resolve using MT5. MQL5 have similar performance than C++ and MT4 have expire date since MT5 supports hedge

Quoting pascalx
Disliked
{quote} Yea there remains some logic on MQL side of course to redirect the requests from C++ to the MQL API functions. But once that is done, the entire trading logic can be in C++. I respect you for having such confidence in MQ Language and I am actually surprised people can create amazing things with it. But as I said, I don't like it and I don't want to use it.
Ignored
Using DLLs you can transfer code to other platform. And using pipes or file mapping you can send all mql info like quotes without have rewrite all in your C++ side. If mql4 had success is because you can overpass the platform limits easily
Try don't lose pants never...
 
 
  • Post #23
  • Quote
  • Jul 27, 2016 6:53am Jul 27, 2016 6:53am
  •  JensItzig
  • Joined Sep 2013 | Status: Member | 362 Posts
Quoting braintheboss
Disliked
{quote} I agree with you. MT4 performance issues can be easily resolve using MT5. MQL5 have similar performance than C++ and MT4 have expire date since MT5 supports hedge
Ignored
I don't think that MT5 will kill MT4. What do we see the last years. MT adds the features from MT5 into MT4. The codebase is to massive for MT4 and there are as many reasons to switch to MT5 as to build a C++ bridge.

The only issue is the lack of multithreading and this is not solved in MT5 either. The few things that make MT5 superior over MT4 are that marginal. All the graphical features for indicator buffers can be easily build in MT4 (even better than the standard MT5 stuff). The additional event hooks, ok good for lazy programmers, but not a real improvement. Better backtesting features, since MT4/5 lacks using ticks this is also nearly worthless.

Quote
Disliked
Using DLLs you can transfer code to other platform. And using pipes or file mapping you can send all mql info like quotes without have rewrite all in your C++ side. If mql4 had success is because you can overpass the platform limits easily

With DLL you don't become plattform or system independent. If you want to achieve this you must use something like Java or Smalltalk (when it's available for the different systems).
 
 
  • Post #24
  • Quote
  • Jul 27, 2016 6:59am Jul 27, 2016 6:59am
  •  JensItzig
  • Joined Sep 2013 | Status: Member | 362 Posts
I don't want to hijack the thread. That's just my thoughts about your project.

If you feel comfortable mit C++, then use it. I will watch the outcome.
 
 
  • Post #25
  • Quote
  • Jul 27, 2016 7:03am Jul 27, 2016 7:03am
  •  braintheboss
  • Joined Nov 2012 | Status: Coder | 8,520 Posts
Quoting JensItzig
Disliked
{quote} I don't think that MT5 will kill MT4. What do we see the last years. MT adds the features from MT5 into MT4. The codebase is to massive for MT4 and there are as many reasons to switch to MT5 as to build a C++ bridge. The only issue is the lack of multithreading and this is not solved in MT5 either. The few things that make MT5 superior over MT4 are that marginal. All the graphical features for indicator buffers can be easily build in MT4 (even better than the standard MT5 stuff). The additional event hooks, ok good for lazy programmers,...
Ignored
About Metaquotes interests they are forcing kill MT4 forcing brokers to use it. You have many news about this and CEO words too. It's not for tomorrow but will be fast. About MT5 is true is not perfect but it's big improvement comparing with MT4.

I disagree in your graphical features affirmation. Mt5 is easier. You only get a MT5 color buffer with 256 levels and try do it in MT4 About other features it's true not big difference but it's normal. It's a evolution not a new platform. At least the base. OOP was a big improvement and performance is a big step too. If you see indicators handles you will see the big difference with MT4 icustom.

But really the question is because somebody want wrap a platform if you don't like. If you want replace a platform then you create one new, not use the old. While he have connect to mt4 he will be dependent to that platform then I don't see the real advantage
Try don't lose pants never...
 
 
  • Post #26
  • Quote
  • Jul 27, 2016 7:55am Jul 27, 2016 7:55am
  •  JensItzig
  • Joined Sep 2013 | Status: Member | 362 Posts
Quote
Disliked
I disagree in your graphical features affirmation. Mt5 is easier. You only get a MT5 color buffer with 256 levels and try do it in MT4

It's easy. Look at my screenshots. The indicators are build full graphical, so i can use 16M colors plus alpha. The graphical improvements are fine (as is wrote) for inexperienced programmers. If you think a step further and build your own framework for MQL you don't need such stuff.

Instead building such things the developers of MT should thinking about the shitload of problems that comes form their bad design. First of all the lack of tickdata, that will be the biggest issue and is not solved with MT5. Next, I guess for a lot of MQ developers it has more value to be able to get a correct 24 SMA on H1 for 10:24 am @ 11:30 am (that's not possible because of the bad design). At the end of the day you must develop all stuff by your own when you need rock solid libraries (and that's what i have done the last 3 years only to be able to do the stuff i want to do with MT4).

Please tell me one thing! Why should be someone using iCustom? The only reason is to use indicators you don't developed by yourself (mostly stolen in my experience). If you the developer of such an indicator you build a class that can be used inside the indicator(s) and ea(s).
 
 
  • Post #27
  • Quote
  • Jul 27, 2016 8:23am Jul 27, 2016 8:23am
  •  braintheboss
  • Joined Nov 2012 | Status: Coder | 8,520 Posts
Quoting JensItzig
Disliked
{quote} It's easy. Look at my screenshots. The indicators are build full graphical, so i can use 16M colors plus alpha. The graphical improvements are fine (as is wrote) for inexperienced programmers. If you think a step further and build your own framework for MQL you don't need such stuff. Instead building such things the developers of MT should thinking about the shitload of problems that comes form their bad design. First of all the lack of tickdata, that will be the biggest issue and is not solved with MT5. Next, I guess for a lot of MQ developers...
Ignored
I think I explained wrong. In mt5 one plot can have many colors only setting a number color index. In mt4 you need a plot per color. This complex a lot the code and slower too. About icustom depends of project. Normally you use it like plugin. If you want use some indicators you don't need worry about dependencies and that things. You can check my thread. Finally I out all indicators of EA and use it separately. Was a chaos use it inside EA because a bug in one indicator can break app execution.

About Metaquotes who used his products know are a crap with many bugs and missing features but... It's the most used platform. Then we have adapt to this
Try don't lose pants never...
 
 
  • Post #28
  • Quote
  • Jul 27, 2016 8:29am Jul 27, 2016 8:29am
  •  pascalx
  • | Joined Apr 2016 | Status: Member | 32 Posts
Quoting braintheboss
Disliked
{quote} If you want replace a platform then you create one new, not use the old. While he have connect to mt4 he will be dependent to that platform then I don't see the real advantage
Ignored
I don't know how that would work. You need to work with a broker, and brokers only support a limited amount of platforms. One of them is MetaTrader. If you build a platform from scratch, you have no broker to connect it to.

Quoting JensItzig
Disliked
{quote} Please tell me one thing! Why should be someone using iCustom? The only reason is to use indicators you don't developed by yourself (mostly stolen in my experience). If you the developer of such an indicator you build a class that can be used inside the indicator(s) and ea(s).
Ignored
Good point. Ideally with Market data you can write all indicators from scratch and would not need to use indicator functions. However, if the build-in indicators work correctly, there is probably not much reason to reinvent them.

You sound experienced man. Glad to see someone working 3 years on tools to get to the goal. That's the spirit.
 
 
  • Post #29
  • Quote
  • Jul 27, 2016 8:37am Jul 27, 2016 8:37am
  •  braintheboss
  • Joined Nov 2012 | Status: Coder | 8,520 Posts
Quoting pascalx
Disliked
{quote} I don't know how that would work. You need to work with a broker, and brokers only support a limited amount of platforms. One of them is MetaTrader. If you build a platform from scratch, you have no broker to connect it to. {quote} Good point. Ideally with Market data you can write all indicators from scratch and would not need to use indicator functions. However, if the build-in indicators work correctly, there is probably not much reason to reinvent them. You sound experienced man. Glad to see someone working 3 years on tools to get to...
Ignored
I understand you need use the data for can do work your app but I think you are duplicating the work. When you uses one platform, even for obligation, you have a payload for use something is developed for others. This payload it's many things will not make in way you like. My question is when you finish your project which tool will be the first you will develop? And what unique features will have for use your "platform"?
Try don't lose pants never...
 
 
  • Post #30
  • Quote
  • Jul 27, 2016 9:00am Jul 27, 2016 9:00am
  •  pascalx
  • | Joined Apr 2016 | Status: Member | 32 Posts
Quoting braintheboss
Disliked
{quote} I understand you need use the data for can do work your app but I think you are duplicating the work. When you uses one platform, even for obligation, you have a payload for use something is developed for others. This payload it's many things will not make in way you like. My question is when you finish your project which tool will be the first you will develop? And what unique features will have for use your "platform"?
Ignored
I am not sure if I understand you. There is no platform advantage per se, but the development environment will be much nicer and it will be easier to write good and maintainable code.
 
 
  • Post #31
  • Quote
  • Jul 27, 2016 9:26am Jul 27, 2016 9:26am
  •  braintheboss
  • Joined Nov 2012 | Status: Coder | 8,520 Posts
Quoting pascalx
Disliked
{quote} I am not sure if I understand you. There is no platform advantage per se, but the development environment will be much nicer and it will be easier to write good and maintainable code.
Ignored
But you can have same with a naked library. You don't need move all to C++ library. But finally this depends of needs of everyone. I don't know. I have my framework and that things but I try reuse all things I can inside MT4
Try don't lose pants never...
 
 
  • Post #32
  • Quote
  • Jul 27, 2016 9:30am Jul 27, 2016 9:30am
  •  JensItzig
  • Joined Sep 2013 | Status: Member | 362 Posts
Quoting braintheboss
Disliked
{quote} I think I explained wrong. In mt5 one plot can have many colors only setting a number color index. In mt4 you need a plot per color. This complex a lot the code and slower too. About icustom depends of project. Normally you use it like plugin. If you want use some indicators you don't need worry about dependencies and that things. You can check my thread. Finally I out all indicators of EA and use it separately. Was a chaos use it inside EA because a bug in one indicator can break app execution.
Ignored
I got you even in the first step. I only need one buffer as reference for all informations and needs (this also prevent that someone uses my indicator via iCustom). Lazy calculations, more flexibility, use of alpha is included and still not available in MT5 (maybe the change form RGB to ARGB for buffers or add a buffer for alpha).

Using indicators as "plugins" via iCustom is nothing than a dirty hack. You end up calculation much to many data, the overhead is not worth the simplicity. Dependencies are not an issue because you can include them into the indicator you want to use. You mentioned the big step when OO was intoduced, so why you don't use it and make your base for indicators and the eas solid (every developer using c++, java, smalltalk what do this).

Quote
Disliked
Good point. Ideally with Market data you can write all indicators from scratch and would not need to use indicator functions. However, if the build-in indicators work correctly, there is probably not much reason to reinvent them.

The build in indicators don't work correctly in different situations. Think about this scenario: A stochastic indicator that plots the M15 stochastic on M1 chart. Only using PERIOD_M15 instead PERIOD_CURRENT will not do the thing, because of the bad design of the timeframe data. If you want to have correct working indicators you are doomed to implement all of them in the correct way even when there is a standard indicator (you can use them only in the case when the higher period end it candle also). Make a test and write such an indicator and let it run several hours and then open a fresh chart with the same indicator and you will clearly see the difference. This is the reason that most of the users talking about that MTF indicators are "repainting". It's obviously no repainting it only the bug those indicators are implemented by MT.
 
 
  • Post #33
  • Quote
  • Jul 27, 2016 9:45am Jul 27, 2016 9:45am
  •  braintheboss
  • Joined Nov 2012 | Status: Coder | 8,520 Posts
Quoting JensItzig
Disliked
{quote} I got you even in the first step. I only need one buffer as reference for all informations and needs (this also prevent that someone uses my indicator via iCustom). Lazy calculations, more flexibility, use of alpha is included and still not available in MT5 (maybe the change form RGB to ARGB for buffers or add a buffer for alpha). Using indicators as "plugins" via iCustom is nothing than a dirty hack. You end up calculation much to many data, the overhead is not worth the simplicity. Dependencies are not an issue because you can include...
Ignored
Simplicity vs flexibility. You takes one depending project needs. Normally indicators have enough with plots. Don't need alpha or others things and mt5 have more flexible plots. About more control with indicators I explained you before. I had EA with both approaches and I know how works every way. Finally I decided do the things more simple. Really I can survive with icustom limits

About OOP why you think I'm not using? I'm C++ expert. Templates are my favorite feature. I use all features give me MQL. But one thing is make a helper library ( mine have more 300 files) an other is search the excellence. I want something for code fast and easy. I will not code something is available at platform if cover my needs
Try don't lose pants never...
 
 
  • Post #34
  • Quote
  • Jul 27, 2016 9:49am Jul 27, 2016 9:49am
  •  pascalx
  • | Joined Apr 2016 | Status: Member | 32 Posts
Quoting braintheboss
Disliked
{quote} But you can have same with a naked library. You don't need move all to C++ library.
Ignored
What is a naked library?

Quoting JensItzig
Disliked
{quote} The build in indicators don't work correctly in different situations. Think about this scenario: A stochastic indicator that plots the M15 stochastic on M1 chart. Only using PERIOD_M15 instead PERIOD_CURRENT will not do the thing, because of the bad design of the timeframe data. If you want to have correct working indicators you are doomed to implement all of them in the correct way even when there is a standard indicator (you can use them only in the case when the higher period end it candle also). Make a test and write such an indicator...
Ignored
Would you mind explaining why this issue happens exactly? I don't know much about the indicators and I am curious to hear why it is broken. It may help me in the future to avoid doing the same mistake.
 
 
  • Post #35
  • Quote
  • Jul 27, 2016 9:52am Jul 27, 2016 9:52am
  •  braintheboss
  • Joined Nov 2012 | Status: Coder | 8,520 Posts
Quoting pascalx
Disliked
{quote} What is a naked library? {quote} Would you mind explaining why this issue happens exactly? I don't know much about the indicators and I am curious to hear why it is broken. It may help me in the future to avoid doing the same mistake.
Ignored
Its a personal way to call libraries with auxiliar code. Not main code. Its like a helper.
Try don't lose pants never...
 
 
  • Post #36
  • Quote
  • Jul 27, 2016 10:14am Jul 27, 2016 10:14am
  •  JensItzig
  • Joined Sep 2013 | Status: Member | 362 Posts
Quote
Disliked
Simplicity vs flexibility.

You started with the comparison which system has the bigger balls. 256 additional colors via buffer is not a groundbreaking feature it can be done also with MT4 (and even better), thats my argument. And you must agree that 1 buffer is more simple than 2 buffers.

Quote
Disliked
About more control with indicators I explained you before.

No you don't! Regarding the dependency, you include your class file and that's it. It's the same work as #resource your indicator or even worse hope that the system will find it @ runtime (via name convention in the filesystem). For me more a nightmare then real dependency management.
Then the "perfect" interface definition when you use iCustom. Errors in calling the interface are only found during runtime, no compiletime checks.
 
 
  • Post #37
  • Quote
  • Jul 27, 2016 10:26am Jul 27, 2016 10:26am
  •  pascalx
  • | Joined Apr 2016 | Status: Member | 32 Posts
Jens if you ever happen to want to code in C++, please drop me a note. You appear to be valuable. I am from Germany too btw.
 
 
  • Post #38
  • Quote
  • Jul 27, 2016 11:29am Jul 27, 2016 11:29am
  •  braintheboss
  • Joined Nov 2012 | Status: Coder | 8,520 Posts
Quoting JensItzig
Disliked
{quote} You started with the comparison which system has the bigger balls. 256 additional colors via buffer is not a groundbreaking feature it can be done also with MT4 (and even better), thats my argument. And you must agree that 1 buffer is more simple than 2 buffers. {quote} No you don't! Regarding the dependency, you include your class file and that's it. It's the same work as #resource your indicator or even worse hope that the system will find it @ runtime (via name convention in the filesystem). For me more a nightmare then real dependency...
Ignored
Buffer colors was just example. Not important if you use 2 or 100. Its easier with MT5.

MQL miss some features like namespaces. When you use same name conventions for your aplications this missing feature make add calsses a problem. That I wanted tell with dependencies inside project
Try don't lose pants never...
 
 
  • Post #39
  • Quote
  • Jul 27, 2016 11:42am Jul 27, 2016 11:42am
  •  pascalx
  • | Joined Apr 2016 | Status: Member | 32 Posts
Quoting braintheboss
Disliked
{quote} MQL miss some features like namespaces.
Ignored
Does MQL5 actually support multiple inheritance, referencing/dereferencing, multiple template arguments and typedefs?
 
 
  • Post #40
  • Quote
  • Jul 27, 2016 11:47am Jul 27, 2016 11:47am
  •  braintheboss
  • Joined Nov 2012 | Status: Coder | 8,520 Posts
Quoting pascalx
Disliked
{quote} Does MQL5 actually support multiple inheritance, referencing/dereferencing, multiple template arguments and typedefs?
Ignored
Evidently MQL is a simple version of C++. But really you need all that features for make indicators? How many projects are enough big in MT for need full spec features?
Try don't lose pants never...
 
 
  • Platform Tech
  • /
  • C++ MQL4 Forex Harvester
  • Reply to Thread
    • 1 Page 23 4
    • 1 Page 23 4
0 traders 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