MTF – indicator used in autotrading only works with limited periods

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #155495 quote
    FinningFinning
    Participant
    Veteran

    Hi all, this could go in indicators, correct me if I’m wrong and put it there – but I use it in probacktest.

    I am having a problem with this indicator here:

    timeframe (3 month)
    QO = open
    
    timeframe (1 month)
    MO = open
    
    timeframe (1 week)
    WO = open
    
    timeframe (1 day)
    DayO = open
    
    timeframe (default)
    if close>QO and close>MO and close>WO and close>DayO then
    num=1
    else
    num=0
    endif
    
    return num

    The above works fine – if I have up to 3,000 units selected.

    If I go over 3,000 units, the following error is displayed – see pic.

    If i put the code into probacktest to use as a condition, it doesn’t throw an error and I can test on 100k units – the error only comes up when it is displayed as a separate indicator, as per above.

    How can I get this indicator to work – would be good to have.

    Thanks,

    Finning.

    error.jpg error.jpg
    #156170 quote
    NicolasNicolas
    Keymaster
    Legend

    I have no problem with that code. What is the timeframe used and instrument please?

    #156180 quote
    FinningFinning
    Participant
    Veteran

    Hi Nicolas,

    I just tried to re-run the code and got the same error.

    I tried it on AUDUSD mini, timeframe 1 hour, 100k units.

    Thanks,

    Finning.

    #156188 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    It works on US Tech 100 Cash (1€), but not on US Tech 100 Cash (100$).

    It seems to be working on most Indeces, Gold,…. but not on currencies.

Viewing 4 posts - 1 through 4 (of 4 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

MTF – indicator used in autotrading only works with limited periods


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Finning @finning Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 12/29/2020
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...