Moving Average Slope 1Hr Strategy

Forums ProRealTime English forum ProOrder support Moving Average Slope 1Hr Strategy

Viewing 12 posts - 1 through 12 (of 12 total)
  • #50649

    I coded the below indicator provided by @MAZ into a strategy for EURUSD 1Hr

    https://www.prorealcode.com/prorealtime-indicators/moving-average-slope/

     

    4 users thanked author for this post.
    #50659
    BC

    Thanks for share, will try it tonight.

    2 users thanked author for this post.
    #51736

    Hello Juanj

    Thanks for sharing.

    Could you explain the concept of this ? ( I don’t understand the 0.618 value)

     

    Regards

    #51751
    BC

    0.618 is  a important number of Fibonnacci number sequence.

    https://en.m.wikipedia.org/wiki/Golden_ratio

     

    #51756

    Hi

    I Know that 0.618 is the golden number and the ratio of infinite convergence of Fibonnaci serie.

    it is used in trading for retracement of waves but why is it used in slopes of moving average ?

    regards

     

    #51761

    @Yannick simple answer it works well. I use an optimization algorithm during backtesting that I graph to track optimal values during different points in the backtested period and found that ~0.6 is frequently the optimal value. I then just decided to make it 0.618 for the heck of it.

    #51976

    HI JuanJ,

    good work for the code , seems interest

    Just a question ,  Did you test it on 200k  bar  ?

    Thanks

    #104800

    Hi, very interesting post. Can somebody please help with my understanding as I’m new to the site.

    In the code above, it includes a For/Next Loop in which the ‘user variable’ slope is incremented through each pass of the loop.

    Is this piece of code testing the change in the Moving Average (MA) of each of the last 30 (0 to 29) bars and incrementing ga and gb accordingly?

    If so, does it somehow pass the bar reference number (a) to the slope calculation at the start of the code further up (slope = MA – MA[1]) to calculate the step – or have I got this completely wrong?

    I appreciate any help to understand this better.

    Thanks.

    #104801

    It is used to eventually exit LONG trades at line 43.

    1 user thanked author for this post.
    #104808

    Thanks Roberto.

    I’m still a little confused with the coding – doesn’t the ‘slope = MA MA[1]’ need to be nested within the For-Next loops – or does PRC know to look back up the code to find ‘slope’ calculation and recalculate it for each change in [a] and [b] (‘slope [a] > slope[a+1]’) ?

     

    #104813

    Line 7 is the base to start with. It changes each new candle.

    The code later scans the past 30 (0 – 29) MA slopes to accomplish its goal.

    will be translated, at run time, with:

     

     

    #104815

    Thanks Roberto, makes perfect sense.

Viewing 12 posts - 1 through 12 (of 12 total)

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