How to write code in PI

Sir,

Pl suggest code for the following two scenarios.

  1. MFI (money flow index) gives positive divergence and crosses 40

  2. If bar opens below lower bollinger band and manages to close 1% above lower bollinger band

Thanking you,

Regards
NS

For the above condition

MFI(15) > 40 AND OPEN < BBB(CLOSE, 20, 2, EXPONENTIAL) AND CLOSE > BBB(CLOSE, 20, 2, EXPONENTIAL)*1.01
1 Like

Sir
Thank you for your answer. I need two query based on the following two condition.
Pl help

  1. List of stock where MFI (money flow index) gives positive divergence and crosses 40
  2. list of stock where If bar opens below lower bollinger band and manages to close 1% above lower bollinger band