Resources and libraries for programmers from MQL4 EA to PRT

Viewing 15 posts - 31 through 45 (of 46 total)
  • Author
    Posts
  • #47712 quote
    pieroim
    Participant
    Average

    How works the flow of PRT? When there is a new Ask/Bid price it execute the code from top to down?

    #47714 quote
    Despair
    Blocked
    Master

    This would be nice (every tick). PRT goes once through your code at the end of every candle. During a candle only pending stop or limit orders will be executed.

    #47715 quote
    pieroim
    Participant
    Average

    but this limitation only in backtesting or even in real mode? This is very frustrating if it is in real mode too..

    #47718 quote
    Despair
    Blocked
    Master

    Get used to it. 🙂 It is in real and in backtest like this.

    To make it even better PRT lacks command to for example sell on the close. If you run a strategy on daily bars this is especially annoying. Any market order you give will be executed at the open of the next candle.

    #47719 quote
    pieroim
    Participant
    Average

    arghh.. we have to make a petition! 😀

    #47720 quote
    Despair
    Blocked
    Master

    Let’s hope for the next update. Nicolas said there are many new features to come.

    #47739 quote
    pieroim
    Participant
    Average

    Good morning,

    I’mworking on a simple EA; in MQL4 for the debugging we have the “comment” and “Alert” instructions that allow us to see the values ​​that the variables take while EA works. What do we have like in PRT?

    #47751 quote
    juanj
    Participant
    Master

    You can use the Graph function.

    https://www.prorealcode.com/documentation/category/probacktest/page/2/

    GRAPH myvariable AS "my variable"
    #47785 quote
    pieroim
    Participant
    Average

    Hi juanj

    I have a problem with your ichimoku formula:

    TS = (highest[T](high)+lowest[T](low))/2 //Tenkan-Sen
    KS = (highest[I](high)+lowest[I](low))/2 //Kijun-Sen
    CS = close[I] //Chikou-Span
    SA = (TS+KS)/2 //Senkou-Span A
    SB = (highest[K](high)+lowest[K](low))/2 //Senkou-Span B

     

    the results differ too much from those from the PRT ichimoku indicator. In particular note CS’s position regard to kumo:

    PRT           your

    SA[3]     1.17841       1.17908
    SB[3]     1.17854       1.17908
    CS[30]  1.18022       1.17765

    is there a way to see the ichimoku code of the prt indicator?

    Maybe I’m wrong about something..

    #47789 quote
    juanj
    Participant
    Master

    Unfortunately, the code for the built-in Ichimoku is not available.However we know Chikou-Span is calculated as the current close 26 periods back, thus my calculation should be correct.

    However we know Chikou-Span is calculated as the current close 26 periods back, thus my calculation is correct.

    It could be that the difference is because of price differences between bid, ask and mid in ProOrder vs the Chart. Not always sure what price ProOrder uses in calculations.

    #47790 quote
    pieroim
    Participant
    Average

    ok, I have done a request if they give the code of the internal PRT indicator, if they don’t give it, can you write an ichimoku indicator so in the chart the EA has the same informations?

    Otherwise, is there a way to take values from the internal indicators? In MQL4 there are somo instructions to do so, I don’t know in PRT..

    #47796 quote
    pieroim
    Participant
    Average

    I first version of the semplified ichimoku EA is working, but without the perfect match of what I see on chart it is impossible to understand what to optimize ..
    I have to stop waiting to fix the problem with the indicator…

    #47882 quote
    Nicolas
    Keymaster
    Master

    The attached indicator is the real and same indicator as the internal Ichimoku indicator.

    Ichimoku-Kumo-Cloud.itf
    #47969 quote
    pieroim
    Participant
    Average

    Ok, the issue with the indicator is solved, now I can optimize the EA behaviour.

    When we open an order, I think that an indexed number is assigned to it like in a relational database. Is there a way to read this number? In practice the EA should be able to check if its order has been closed.. from an external event to the EA too.

    #47976 quote
    Despair
    Blocked
    Master

    The current bar is stored in BARINDEX. The index of the last trades you can refer to with TRADEINDEX(n). With trade index 0 being the last trade.

    The last part of what you wrote I didn’t understand. If a position of a strategy is closed by an external event (for example user interference) it will be stopped completely.

Viewing 15 posts - 31 through 45 (of 46 total)
  • You must be logged in to reply to this topic.

Resources and libraries for programmers from MQL4 EA to PRT


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
pieroim @pieroim Participant
Summary

This topic contains 45 replies,
has 5 voices, and was last updated by Nicolas
8 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/27/2017
Status: Active
Attachments: 1 files
Logo Logo
Loading...