Discrepancies on MA crossings between ProBuilder and ProOrder

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #100537 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    I made this code:

    DEFPARAM CumulateOrders = false
    MinLookBack =  3                                                 //crossing must have occured at least these bars before PullBack
    MaxLookBack =  10                                                //crossing must have occured at most these bars before PullBack
    MA50 = average[50,0](close)
    x = close crosses over ma50
    IF x OR (close > MA50 AND low < MA50) THEN //when a pullback occurs...
       IF summation[MinLookBack](x[1]) = 0 THEN
          IF summation[MaxLookBack](x[MinLookBack + 1]) AND Not OnMarket AND close > open THEN
             BUY 1 CONTRACT AT MARKET
             SET STOP pLOSS 50
             SET TARGET pPROFIT 200
          ENDIF
       ENDIF
    ENDIF
    graph minlookback
    graph maxlookback
    graph x
    graph barindex
    MA50 = average[50,0](close)
    RETURN close CROSSES OVER MA50

    On May 15th, at 17:00 GRAPH (ProOrder) visualized variable X as being 1, while the indicator (ProBuilder) had not returned any crossing at that time.

    x-6.jpg x-6.jpg
    #100541 quote
    NicolasNicolas
    Keymaster
    Legend

    Week-end data included or not?

    #100555 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Not included, if I include them then everything is fine.

    An issue reamains: if ProOrder considered that crossing, even with no weekend data included, why ProBuilder didn’t?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Discrepancies on MA crossings between ProBuilder and ProOrder


Platform Support: Charts, Data & Broker Setup

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by robertogozzirobertogozzi
7 years, 3 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 06/13/2019
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...