Download MetaTrader 5

Interview with Stanislav Starikov: Features of New MQL5 - page 6

To add comments, please log in or register
ukt
473
ukt  
stringo:

1. Preprocessing was introduced in the pure C for portability purposes between different platforms and compilers. Preprocessing causes some hardly detectable errors.

The answer is "No". Simplest #define only.

2. Ukt, I don't understand your suggestion about regexp. Do You mean regexp processing in the MetaEditor?

3. This is not a final statement. Maybe.

4. Both postfix and prefix will.

5. There will be a full implementation.

6. Yes, do statement while(expr); is implemented.

7. Yes, short circuit evaluation is implemented properly.

8. Yes, i=j=k=0; is implemented properly.

9. Constant strings are restricted up to 1 Mb.

There is no string type in the C and C++. There are just null terminated char (or wide char) arrays. You can use char arrays instead of our strings.

10. See 1. No conditional precompiling. Use functions IsTesting(), IsDebugging(), and so on.

11. Yes.

12. I agree. It is discussible.

Thank you Stringo for your reply. It would seem that most are 'doable' and lack of (1,10) not end of world ;)

1. "Preprocessing causes some hardly detectable errors."

For sure no one wants generated target code with slightest suggestion of errors.

If you can please give example(s)/expand on this "hardly detectable errors" ?

(ok, is academic of couse, but would be very interested in your expanded answer - should your work load permit :)

.

2. yes... please excuse my question - this is language thread - I forgot.

Where and when should I address my questions concerning MetaEditor ?

.

3. I would just add that ternary operator "?: " allows for complete transparency of code. "what you see is what you get"

- It makes for concise statement of design flow intent - as long as syntax not abused with excessive coding in true/false parts.

- It would seem that compiler components must already exist to allow reasonable pain free implementation of ternary operator.

- I have seen code on site which have iif type functions etc. Is of course ok but not anyway same as ternary for above observations, and of course is going to be more expensive in time/size...

.

12. I would say that concern is the "either / or " nature of this area:

  • Either document completely what the EA computing environment/state is at code level when init() is called by Terminal (and if needed: specified according to reason(s) call made)
  • Whereby programmers are warranted a certain code/data segment state eg, as if relaunch after compile, tbh - init means "to set to a starting point" and programs generally only have one starting/entry point where it is, again - understood to mean a 100% clean slate startup. Unless perhaps an analogue to UninitializeReason() - eg, InitializeReason() maybe? But seems more confusing and trouble then possible benefits.
  • or (assuming my research is reasonably correct) we continue as now
  • With "some hardly detectable errors." buried and not immediately obvious for those programs using state memory
  • BUT completely documented with a "Beware" sticker on it ;)

    I am a need to know type, nothing more. If am told the " or " clause above - is ok, I at least know and is now up to me to find solution.

    My greatest joy is supply of good well thought out complete structured language,api docs.

    why? because I then 'know' exactly how my use of language and api will work and therefor what will happen and... I mess up - is my issue, not need rant/rave at MetaQuotes ;)

    .

    OK... is good you indicate "It is discussible."

    Please give start point where talking can begin - I have shown my research and given an imho: "either / or " nature of this area.

    I do not understand why platform behaves as I have demonstrated - it seems binary issue given my current understanding.

    Please expand on your thoughts.

    .

    .

    Your reply would indicate that product is shaping up as some great news indeed!

    I hope you are enjoying development of what appears to be much improved/expanded product.

    ?

    Is possible to learn Team's general timetable for language publication (at least)? (or for that matter, any parts of project's currently projected release date targets :)

    Thank you.

    ukt
    473
    ukt  
    /*
    .
    13. What follows might be pure fiction or perhaps contains one or more grains of 'possibly true'
        - only designers can answer this.
    .
    1. Two of the seven UninitializeReason()'s: (3) REASON_CHARTCHANGE, (5) REASON_PARAMETERS 
        have been 'discovered' to not cause static memory clearance because:
        Why?
        A. It is possible open orders can exist whatever reason causes Terminal to call deinit()
        B. Reasons: CHARTCHANGE and PARAMETERS 'might not' be considered severe enough to warrant EA loosing it's current state completely.
    .
    2. The other 5 reasons 'might' be considered severe and therefore EA must be 100 percent restarted.
        ie, they are enough of an EA environment change to warrant static memory clearance eg, result if REASON_RECOMPILE
        (0) REASON_SELF_INITIATED_EXIT,
        (1) REASON_REMOVE
        (2) REASON_RECOMPILE
        (4) REASON_CHARTCLOSE,
        (6) REASON_ACCOUNT
    .
    3. To summarize above:
        A. It is possible open orders can exist whatever reason causes Terminal to call deinit()
        B. Reasons: CHARTCHANGE and PARAMETERS 'might not' be considered severe enough to warrant EA loosing it's current state completely.
        C. The other 5 reasons 'might' be considered severe and therefore EA must be 100 percent restarted.
    .
    4. 1..3 above may in some part explain design thinking.
    .
    5. Perceived implications of 1..3
        Some assumptions:
        A. init() is where code goes that 'sets up' EA runtime environment (from programmer's perspective) eg, open disk files, 
            initialise datums which reflect attributes of chart EA started on,issue startup messages,check security,...
        B. deinit() is where code goes that 'unsets/closes down' EA runtime environment (from programmer's perspective) 
            eg, issue closedown messages, close disk files, close open orders,
            ensure trading environment shutdown gracefully, that no trades left open,...
        C. start() may or may not be aware of the first time it is called by Terminal - is specific to design.
        D. although A and B above list assumptions which are felt to be important, it is recognized that one or both may be empty of code.
        Using above assumptions:
        init()
        1. IF complete restart indicated: reasons 0,1,2,4,6 THEN eg, 6.A
        2. IF partial restart indicated: reasons 3,5 THEN eg, log what is happening and if appropriate for partial restart,
            do operations according to design etc.
        .
        deinit()
        1. IF complete shutdown indicated: reasons 0,1,2,4,6 THEN eg, 6.B
        2. IF partial shutdown indicated: reasons 3,5 THEN eg, log what is happening and if appropriate for partial restart,
            then do operations according to design etc.
    .
    6. it appears that there is a symmetry in 6.init() and 6.deinit()
        A. however symmetric in appearance, the words initialize and deinitialize completely loose their baseline meaning.
            A greyness in their definition has been introduced.
    .
    In Summary:
    7. Could above possibly have been in the designers minds?
    8. IF 7. THEN why was this never relayed to the platform users?
    9. IF 7. THEN abundent documents with precise reasons for this would have been absolutely necessary.
    10. IF 7. THEN good and clear examples to support 9. would have been an additional requirement.
    11. What currently exists are a few lines of documentation describing UnitializationReason() and it's return values.
        There is no true hint as to what might actually have been [at the time] valid design issues.
    12. As an outsider to the MT platform design I can only make hypothetical statements.
        BUT... my gut feeling is that there could well be some shred of truth in what is outlined above.
    .
    Finally:
    To facilitate the making of comments to any section above it is proposed to suggest the following annotation method:
    - This complete post is item 13 in respect to previous posts with numbered sections.
    - For comments referencing numbered sections 1..12 in this post, it is requested that they be referenced as 13.1, 13.2,..,13.12
    .
    Thank you
    .
    */

    Regarding "It is discussible." - the user base is waiting... :)

    bima
    24
    bima  

    ok! some SIMPLE question

    who is the target customer for mt5?  TRADER or PROGRAMER

    i respect and belive what Codersguru say AS A PROGRAMMER, need to protect his art work just like mt5 developer protect their own

    i also respect Soros as A TRADER, need to protect his investment  secret as mt5 developer protect their own [source code, some thing like that...]

    so as  TRADER can you  make simple program something like this

    //== get from chinese stock &/ forex program 10jqka

    DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
    DEA : EMA(DIFF,M);
    MACD : 2*(DIFF-DEA);

    Zero : 0;

    //==or make  you can make it more simple then this, since mt5 is yours


    ini some chinese program you 10jqka

    the world most powerfull chinese free forex program with lack of man machine interface and  alot of bug, but just like i say most powerfull [btw MT4 IS NOT FREE, IT FREE FOR DEMO]

    1] you can drag n drop you indicator  to any windows [some kind like fxaccuchart, maybe they have same kind oem relation]

    2] you can chose  to  make indicator just like tabs  [event it aint good enought, but you can keep 6 or more indicator  tabs thats cool for me]

    3] there is alot unique thing,  somekind like "only chinese got it"


    in fxaccuchart program used by fxsol 

    1] make  MA  line  not only thicksness but also type, in mt4 when you chose  mothe thick you can get any type/style MA 

    2]  many kind of chart,  easy of reading the price, just  left click  all informasion on that line will apear

    Suyanto Kim
    8
    Suyanto Kim  
    bt062:

    ok! some SIMPLE question

    who is the target customer for mt5?  TRADER or PROGRAMER

    i respect and belive what Codersguru say AS A PROGRAMMER, need to protect his art work just like mt5 developer protect their own

    i also respect Soros as A TRADER, need to protect his investment  secret as mt5 developer protect their own [source code, some thing like that...]

    so as  TRADER can you  make simple program something like this

    //== get from chinese stock &/ forex program 10jqka

    DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
    DEA : EMA(DIFF,M);
    MACD : 2*(DIFF-DEA);

    Zero : 0;

    //==or make  you can make it more simple then this, since mt5 is yours


    ini some chinese program you 10jqka

    the world most powerfull chinese free forex program with lack of man machine interface and  alot of bug, but just like i say most powerfull [btw MT4 IS NOT FREE, IT FREE FOR DEMO]

    1] you can drag n drop you indicator  to any windows [some kind like fxaccuchart, maybe they have same kind oem relation]

    2] you can chose  to  make indicator just like tabs  [event it aint good enought, but you can keep 6 or more indicator  tabs thats cool for me]

    3] there is alot unique thing,  somekind like "only chinese got it"


    in fxaccuchart program used by fxsol 

    1] make  MA  line  not only thicksness but also type, in mt4 when you chose  mothe thick you can get any type/style MA 

    2]  many kind of chart,  easy of reading the price, just  left click  all informasion on that line will apear

    Suyanto Kim
    8
    Suyanto Kim  

    Please Add Multi Currency Back Tester at new version MQL5, sometime i try develop multi currency strategy,

    Now still can't backtest Multi Currency Strategy at MQL4.

    Ian Smith
    1595
    Ian Smith  
    The corresponding currencies strategy probably requires tick data anyway, you're likely better off doing that directly off an ECN feed. If you're doing it non-scalper, the problem is mostly divergence over time. If you want to do that in backtest on a longer timeframe, export the M1 data to CSV and then use the CSV file parser to write an indicator that correlates ticks. Should be about 15-30 lines of code and voila, multicurrency backtesting. Just remember to read the CSV file in init() and not in start() and your perfomance should be decent too.
    ukt
    473
    ukt  

    corrections to post above: 2008.05.13 16:39 - that post cannot be edited.

    below should be read as part of previous post, the numbers in red below are what I should have entered originally

    5. Perceived implications of 1..3
    Some assumptions:
    A. init() is where code goes that 'sets up' EA runtime environment (from programmer's perspective) eg, open disk files,
    initialise datums which reflect attributes of chart EA started on,issue startup messages,check security,...
    B. deinit() is where code goes that 'unsets/closes down' EA runtime environment (from programmer's perspective)
    eg, issue closedown messages, close disk files, close open orders,
    ensure trading environment shutdown gracefully, that no trades left open,...
    C. start() may or may not be aware of the first time it is called by Terminal - is specific to design.
    D. although A and B above list assumptions which are felt to be important, it is recognized that one or both may be empty of code.
    Using above assumptions:
    init()
    1. IF complete restart indicated: reasons 0,1,2,4,6 THEN eg, 5.A
    2. IF partial restart indicated: reasons 3,5 THEN eg, log what is happening and if appropriate for partial restart,
    do operations according to design etc.
    .
    deinit()
    1. IF complete shutdown indicated: reasons 0,1,2,4,6 THEN eg, 5.B
    2. IF partial shutdown indicated: reasons 3,5 THEN eg, log what is happening and if appropriate for partial restart,
    then do operations according to design etc.
    .
    6. it appears that there is a symmetry in 5.init() and 5.deinit()
    A. however symmetric in appearance, the words initialize and deinitialize completely loose their baseline meaning.
    A greyness in their definition has been introduced.

    Ian Smith
    1595
    Ian Smith  

    I've noticed some variables are retained when switching Timeframes and they aren't supposed to be retained! Recalculating them in start() is a horrible performance hit, especially in backtest. More and more I'm creating code specific to backtesting just so I can be 'safe' about MT4 not doing init() deinit() etc on live trading, and then decent performance during backtesting. I would like init() and deinit() to always work please. A possibly workaround is to expose more events, or to allow us to look up which shutdown reason was used on the next start() so our code can adapt within start() and reference init() and deinit() from within start() where necessary.


    Also, Retail Forex is almost dead in the US. https://forum.mql4.com/12691 Is MT5 going to adapt so that it is not illegal in the US?

    ukt
    473
    ukt  

    or to allow us to look up which shutdown reason was used on the next start()

    https://docs.mql4.com/check/UninitializeReason

    https://docs.mql4.com/constants/uninit

    .

    see also: Page 5 'Interview with Stanislav Starikov: Features of New MQL5' post: 2008.05.11 15:21

    see also: Page 6 'Interview with Stanislav Starikov: Features of New MQL5' posts: 2008.05.13 16:39 and 2008.05.16 22:55

    .

    and: '2 questions on EA and ClientTerminal interface'

    ukt
    473
    ukt  

    Hello Support Team

    Either your are overworked or "12. I agree. It is discussible" was typo?

    Look forwards to some dialogue....

    To add comments, please log in or register