Problem using MTF indicator in strategy

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #154741 quote
    Erkiman
    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
    Vonasi
    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
    Erkiman
    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
    robertogozzi
    Moderator
    Master

    What TF did you call it from?

    #154851 quote
    Erkiman
    Participant
    Average

    I call it from 1min TF.

    BackTest-1.jpg BackTest-1.jpg
    #155487 quote
    Erkiman
    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
    Nicolas
    Keymaster
    Master

    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
    Nicolas
    Keymaster
    Master

    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.

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 Nicolas
5 years, 1 month ago.

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