MULTI TIME FRAME

Viewing 10 posts - 1 through 10 (of 10 total)
  • #242720

    Hi can anyone advice me on the correct way to code multi timeframes ?

    The issue I’m have every time the code is triggered it only takes in to account the smaller  TF . Could it be that the 10 minute TF takes in to account c1 and c2 rather than them working in sync with each other ( what I want is provided the 4h TF (c1)  is correct then it will go ahead and activate the trade on the smaller TF (c2)

    any help will be very much appreciated.

     

     

    #242721

    I want is provided the 4h TF (c1)  is correct

    As your code is written, anytime c1 = indicator1 > 0 during a 4 hour bar, then C1 will be True / 1.
    So C1 may be coincident with C2 6 times per hour at the end of each 10 minute bar (assuming your Chart is running on 10 min Timeframe?).

    If you want C1 to be checked ONLY at the end of each 4 hour bar, then you need to use …
    Timeframe(4h, updateonclose)
    ignored, indicator1 = CALL “Storyteller 3.0”[1]
    c1 = (indicator1 > 0)

     

    #242722

    As it stands at the moment c2 ( 10 min TF ) will take all long positions irrelevant whether or not c1 (4h TF) is above or below the 0 line , meaning its entering a long position during a down trend on the 4h . I’ve tried updateonclose and it appears not to make ant difference.

    thanks.

    1 user thanked author for this post.
    #242725

    Is your backtest chart running on 10 min Timeframe?

    #242728

    Hi yes the charts is running on the 10 min tf for position entries .

    #242729

    Why are you using “Storyteller 3.0”[1] and not “Storyteller 3.0” ?

     

    #242730

    hi I’ve tried using storey teller 3.0 and also just tried using a different indicator ( MACD) and getting the same results back , taking long positions even when the 4h tf ( MACD) is below the 0 line . Just cant get them to work in sync with each other >

    #242731

    Post your code with the MACD and I will try on my Platform.

    I am more of a ‘trial and error coder’. It’s not easy for me to see what might be going wrong without testing your code.

    I am wanting to help andyfx79 to move onward and upward …  so if anybody can see the problem then please join in and tell us! 🙂

    #242732

    Use …

    C3 = C1 AND C2

    GRAPH C3
    to see if C3 confirms (or not?) what you think is happening?

    #242744

    I’ve added c3 to the code and it confirms that c1 and c2 are not in sync using the storey teller , however it seems to work using the macd so I’ve come to the assumption  that the issue lies within the storey teller indicator ,

    1 user thanked author for this post.
Viewing 10 posts - 1 through 10 (of 10 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login