Problem using MTF indicator in strategy

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #154741 quote
    ErkimanErkiman
    Participant
    Average

    I am doing alot of multiple timeframe indicators, but when I try to use them in a strategy PRT (V11) always gives me an error message.

    Does anyone know what the problem is?

    See attached pictures of simple test.

    Error-message.jpg Error-message.jpg Ind.jpg Ind.jpg BackTest.jpg BackTest.jpg
    #154746 quote
    VonasiVonasi
    Moderator
    Master

    Erkiman – for future reference when posting code please use the ‘Insert PRT Code’ button rather than posting screen shots. Other forum members cannot be expected to re-type all your code to test it for you! Code that has been inserted however can be copied and pasted by everyone.

    #154846 quote
    ErkimanErkiman
    Participant
    Average

    Sorry about that.

    Code now included.

     

    Indicator (MTF Test):

    TimeFrame (5 minutes)
    M5MA8 = Average[8]
    
    TimeFrame (1 minutes)
    M1MA8 = Average[8]
    
    Return M5MA8, M1MA8
    

     

    ProOrder:

    DEFPARAM CUMULATEORDERS = False
    
    myMTFTest, myMTFTest2 = CALL "MTF Test"(close)
    
    If myMTFTest Crosses Over myMTFTest2 Then
    Buy 1 Contract At Market
    EndIf
    
    SET STOP %LOSS 1
    SET TARGET %PROFIT 1
    
    #154849 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    What TF did you call it from?

    #154851 quote
    ErkimanErkiman
    Participant
    Average

    I call it from 1min TF.

    BackTest-1.jpg BackTest-1.jpg
    #155487 quote
    ErkimanErkiman
    Participant
    Average

    I am still not aible to call any of my MTF indicators in a strategy.

    Has anyone else experience this problem?

    #156222 quote
    NicolasNicolas
    Keymaster
    Legend

    Please send a technical report on your own and with this topic link in the message field (with explanation too), I will do the same and get an answer.

    #156285 quote
    NicolasNicolas
    Keymaster
    Legend

    There is indeed a problem when calling MTF indicators. The best way to deal with that is to use TIMEFRAME into the strategy and CALL indicators that use only a single timeframe (understand without the timeframe instruction).

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

Problem using MTF indicator in strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Erkiman @erkiman Participant
Summary

This topic contains 7 replies,
has 4 voices, and was last updated by NicolasNicolas
5 years, 9 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/21/2020
Status: Active
Attachments: 4 files
ProRealCode ProRealCode
Loading...