Not logged in
Viewing 15 posts - 1 through 15 (of 21 total)

Forums>StrategyQuant>General Discussion>New MQL4 with #property strict

  • #258529 |
    Customer
    6 Posts

    Good day,

    I’m wondering about this “MQL4 with #property strict”, which I include in the code but compiling is always with errors. Can you explain how can this be fixed? I mean, to have a code with this new condition of “#property strict”.

    Thank you!

    #258531
    tomas262
    Administrator
    1821 Posts

    Hello,

    we plan to add support for the strict property so you will be able to offer your strategies and possibly upload into MQL market as well. The target to make this available is the next build 129 or the build after. We hope to make it ready into one of these builds

    #258535
    Customer
    6 Posts

    Perfect! Thank you!

    #258562
    Customer
    6 Posts

    Great news
    Excellent, you always offer the new and the special. Keep it up and always we will support.

     

    regards,

    #259928
    Customer
    6 Posts

    Good afternoon,

    I was checking the new release but I see that the #property strict is still pending.

    I am wondering if I´m doing something wrong or if it is not included in the new version.

    Thank you!

    #259968
    Customer
    18 Posts

    Hello, I agree it’s a relevant request. It’s not only about strict but as I remember some indicators are using old MT coding structure.

    Is there a formal feature request?

    Enyx

     

    #259975
    tomas262
    Administrator
    1821 Posts

    Hello,

    the implementation is being worked on now. You will be able to provide the special version of the strategy code that meets requirements into the MQL market

    #259979
    Customer
    788 Posts

    will it be also for PROFI license or only for ULTIMATE?

    You want to be a profitable algotrader? We started using StrateQuant software in early 2016. For now we have a very big knowhow for building EAs for every possible types of markets. We share this knowhow, apps, tools and also all final strategies with real traders. If you want to join us, fill in the FORM. 1500+ final SQX strategies for members running on demo accounts to verify the edge DEMO ACCS. We provide also strategies for indices - DAX, DOW JONES, NASDAQ, SP, UK, because we have realtick data from our brokers.

    #259992
    Customer
    18 Posts

    Hello Tomas,

    Thank you.

    If I need to extend a little bit the topic.

    Some other competitive products (like FXB) has a very well defined OOB indicator structure which makes indicator coding logical and easy. Also exported expert advisor code is well structured and easier to debug. Currently only Trading options are kind of close to this approach.

    Here is how I would imagine idea situation:

    1) SQX indicators are OOB based

    2) SQX expert code is OOB based

    3) An OOB based SQX indicator template which follows SQ custom Java code structure. Let’s not forget a custom indicator need to be implemented both in MQL and Java. I have already such codding attempt I will be happy to share with SQ team. Benefits are numerous. Easy exchange of code between Java implementation and MQL. Same structure. Less coding, bugs and easier testing. It also allows to reuse/include components in both platforms. That’s what OOB is for..

     

    Java code:

    @Override
    protected void OnBarUpdate() throws TradingException {
    this.Calls++;

    calcLow.onBarUpdate(Input.Low.get(0), CurrentBar);
    calcHigh.onBarUpdate(Input.High.get(0), CurrentBar);

    int trend = 0;

    double clow = calcLow.getValue(0);
    double chigh = calcHigh.getValue(0);
    double cc = Input.Close.get(0);

    if ((cc >= clow) && (cc <= chigh)) {
    // In channel
    trend = 0;
    } else {
    if (cc < clow) { trend = -1; }
    if (cc > chigh) { trend = 1; }
    }

    // Return normalized result
    Lower.set(0, calcLow.getValue(0,0,true));
    Upper.set(0, calcHigh.getValue(0,0,true));
    Trend.set(0, trend);
    }
    }

    MQL Code:

    for(int idx=ix_start; idx<=ix_end && !_StopFlag; idx++)
    {
    calcLow.onBarUpdate(low[idx],idx);
    calcHigh.onBarUpdate(high[idx],idx);
    UpdateExternalBuffers(idx);

    int trend = 0;

    double clow = calcLow.getValue(0,0,true);
    double chigh = calcHigh.getValue(0,0,true);
    double cc = close[idx];

    if ((cc >= clow) && (cc <= chigh)) {
    // In channel
    trend = 0;
    } else {
    if (cc < clow) { trend = -1; }
    if (cc > chigh) { trend = 1; }
    }

    Enyx

     

     

     

     

    #259998
    Mark Fric
    Administrator
    1182 Posts

    Enyx, I’m not sure I follow. What to yo umean by OOB? Object oriented?

    SQX indicators in Java are object oriented, do you mean their MQL4/5 versions?

     

    It is subjective, but I’d say structure of Java code for indicators in SQ is simple to understand, it is simpler than in MQL.

    The reason why MQL code of custom indicators in SQ is sometimes not object oriented is simply that some of them are not ours – we reimplemented them in Java for SQ, but MQL is original.

     

    I don’t see big point in reimplementing them in object oriented design in MQL, my opinion is that object oriented design for simple indicators is unnecessary overhead.

     

    But I’m open for discussion and to hear your arguments :-)

     

    Mark
    StrategyQuant architect

    #259999
    Customer
    18 Posts

    Hello Mark,

    1) I have to agree your point is (mostly) valid for existing indicator code base. On the other side (as long as i remember) SQX MQL code base for MT4 and MT5 is mostly different. So we have 3 code bases – SQX Java snippet, MT4 code, MT5 code. How do we ensure all these work in all cases (including edge ones)? There is option for “validation” but let’s say it’s not trivial usage and at least in the past test suite for internal indicators was not passing completely.

    Manual testing of a generated expert and crosschecking with MT is such a painstaking effort. And yes it’s not even possible for MT4 multi tf/symbols. Multiply this for a big portfolio…

    So it leaves some doubts on the table. Valid or not may be a subjective factor but results must be identical in simulation and real trading. Identical code base would make whole process more controlled. In trading you can trust but you have to validate. So here is my point that it’s worth to unify SQX code base. Is it trivial effort? Nope, but it’s worth in any aspect.

    2) Yes, I mean object oriented approach. It’s not a question if Java snipped or MQL code is simpler but effort and cost of supporting both code bases. And I would not agree it’s trivial for both platforms as I develop custom indicators. Do I need to provide evidence to justify my point ?

    Enyx

    #260001
    Customer
    18 Posts

    And i’ve quickly executed indicator testing on latest release 129dev6- Stochastics, Fibo, Pivots do NOT pass SQ’s own internal validation. Does it make my point now more valid ?

     

    Enyx

     

    • This reply was modified 11 months ago by Enyx.
    #260006
    Customer
    18 Posts

    For completeness. Unless I am wrong there is SQ provided test suite only for MT4.  Or I am wrong ?

    Enyx

    #260007
    Mark Fric
    Administrator
    1182 Posts

    we’ll look at the test differences.

     

    For completeness. Unless I am wrong there is SQ provided test suite only for MT4.  Or I am wrong ?

     

    the testing suite compares data, and you can export indicator data also from Tradestation/MultiCharts. I have to check if we have a function or example for this, honestly I don’t know now.

    Mark
    StrategyQuant architect

    #260008
    Customer
    18 Posts

    Mark,

    Let’s ignore my yelling for the moment.

    Vendor need to guarantee built-in indicator functionality for MT4/MT5 and ensure validation tests are completed and passed for all supported platforms.

    And of course ideally have for an official script (MT is easy) generating bunch of test cases in different time-frames and parameter ranges  and then easy to follow instruction to cross validate these. I don’t care if it’s 20000 tests to be executed in an hour unless it’s semi-automatic.

    May be an sqcli function for quick self-check ?

    Addendum: Build-in snippets (and indirectly user ones) have already metadata definitions (ranges, type, etc). Ever though about extending this a bit and generating automatically test sets ?

    Enyx

Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic.