currentprice_MA crossover

Forums ProRealTime English forum ProBuilder support currentprice_MA crossover

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • #84457

     

    #84459

    I have written the code, it give some results but not expect

    I expect the max value should be 420

    where as I get 250 which not correct

    #84465

    Lines 3 through 10 are useless, since you never assign C2 any value.

    C3 is the distance between CLOSE and the indicator for that single bar.

    If you want the distance from CLOSE and the crossover then you’ll have to save the value of the indicator, or its BarIndex, when the crossover occurs.

    #84468

    I have corrected the code

     

    it works fine

     

    #84472

    Line 7 should reference c2 (not c2[1]), because when there is a crossover it would return the value of the previous crossover. From the candle following the crossover on it wouldn’t make any difference (despite it is logically wrong).

    #126468

    If I want to add number of bars in the same code what should i do. if I want to trade contrarian say if the value c3>=500 after x number of bars only. I dont want sell in very sharp trend, I want to keep some minimum number of bars

    #126481

    There you go:

     

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

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