How to create script in PI

Hello,
I want to create script for this below image. Please help me

I can back test this on a custom platform built by me. 9874795959

SHORT MODE:

ADX(14) > 25 AND 
DIN(14) > DIP(14) 

LONG MODE:

ADX(14) > 25 AND 
DIP(14) > DIN(14)