Reply

New MQL4 with #property strict

20 replies

JAIRO ZAMBRANO

Subscriber, customer, community, bbp_participant, sq-ultimate, 7 replies.

Visit profile

3 years ago #258529

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!

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

3 years ago #258531

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

0

JAIRO ZAMBRANO

Subscriber, customer, community, bbp_participant, sq-ultimate, 7 replies.

Visit profile

3 years ago #258535

Perfect! Thank you!

0

Saad Buqmisz

Customer, bbp_participant, 7 replies.

Visit profile

3 years ago #258562

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

 

regards,

0

JAIRO ZAMBRANO

Subscriber, customer, community, bbp_participant, sq-ultimate, 7 replies.

Visit profile

3 years ago #259928

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!

0

Enyx

Subscriber, customer, community, bbp_participant, 19 replies.

Visit profile

3 years ago #259968

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

 

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

3 years ago #259975

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

0

hankeys

Customer, bbp_participant, community, sq-ultimate, 487 replies.

Visit profile

3 years ago #259979

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 2014. 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.

0

Enyx

Subscriber, customer, community, bbp_participant, 19 replies.

Visit profile

3 years ago #259992

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

 

 

 

 

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

3 years ago #259998

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

0

Enyx

Subscriber, customer, community, bbp_participant, 19 replies.

Visit profile

3 years ago #259999

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

0

Enyx

Subscriber, customer, community, bbp_participant, 19 replies.

Visit profile

3 years ago #260001

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

 

0

Enyx

Subscriber, customer, community, bbp_participant, 19 replies.

Visit profile

3 years ago #260006

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

Enyx

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

3 years ago #260007

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

0

Enyx

Subscriber, customer, community, bbp_participant, 19 replies.

Visit profile

3 years ago #260008

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

0

Enyx

Subscriber, customer, community, bbp_participant, 19 replies.

Visit profile

3 years ago #260027

So.. Since I had some my custom indicator export code i have tested MT5 SqADX indicator with variable input params using all available data in MQ  (77MB testset).

Success test pass rate is 41%. It’s rounding issue.

Enyx

0

Viewing 15 replies - 1 through 15 (of 20 total)

1 2