Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

PAC - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources - MetaTrader 5 Resources

author EAcpu | 2 reads | 0 comments |

PAC - indicator for MetaTrader 5

PAC - indicator for MetaTrader 5

PAC (Period After Crossing MA) is an oscillator that shows the number of bars since the last time price crossed a moving average.

If the moving average crosses price upward, then positive histogram bars are drawn in green ; if the last crossover was downward, negative columns are drawn in red .

The indicator has three configurable parameters:

If Price > MA and PrevPrice > PrevMA:

 PAC = previous PAC + 1
  • If price < MA and PrevPrice < PrevMA:

     PAC = Previous PAC - 1
  • If price > MA:

     PAC=1
  • If price < MA:

     PAC = -1
  • Where:

     Price - SMA (Apply Price, 1)
    MA - MA (applicable price, period, method) 

    PAC - indicator for MetaTrader 5

    Figure 1. By default, SMA (Close Price, 14)

    PAC - indicator for MetaTrader 5

    Figure 1. On the price chart, SMA (Close Price, 14)


    Attachment download

    📎pac.mq5 (9.78 KB)

    Source: MQL5 #21264

    Verification code Refresh