Multi timeframe Moving Averages

Forums ProRealTime English forum ProBuilder support Multi timeframe Moving Averages

Viewing 4 posts - 1 through 4 (of 4 total)
  • #135107

    Hi.

    I have got a formula that will plot different length moving averages depending on the timeframe selected. Is there a way to stop the moving average being plotted when its zero? I don’t want the vertical line at the start of the moving average.

    Thanks,

    Alan

     

    #135115

    Topic moved to ProBuilder forum as you posted your indicator question in the wrong forum. Please read the forum rules and ensure that any future topics are posted in the most relevant forum before posting again.

    To answer your question – declare your variables once as undefined at the start of your code.

     

    1 user thanked author for this post.
    #135148

    Thanks Vonasi.

    Works just how I wanted it to. Just out of interest is there an easier way of determining the timeframe?

     

    Thanks,

     

    Alan

    #135173

    2 snippets for timeframe detection with code: https://www.prorealcode.com/topic/determine-the-charts-time-frame-in-a-program/#post-105538

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

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