EA Creation - Clarification

CLOSE > EMA (CLOSE, 34) AND SOPK(20, 3, 4, SIMPLE) > SOPD (20, 3, 4,SIMPLE) AND
REF (SOPK(20, 3, 4, SIMPLE), 1) < REF(SOPD(20, 3, 4, SIMPLE), 1) AND SOPD (20, 3, 4,SIMPLE) > 30

CLOSE < EMA (CLOSE, 34) AND SOPK(20, 3, 4, SIMPLE) < SOPD (20, 3, 4,SIMPLE) AND
REF (SOPK(20, 3, 4, SIMPLE), 1) > REF (SOPD(20, 3, 4, SIMPLE), 1) AND SOPD (20, 3, 4,SIMPLE) < 80

Hello,

  1. I request a clarification in EA creation, below is the EA script for EMA with Stochastic,
    and i can understand the first two conditions,i need little bit of explanation for the third conditon-
    REF(SOPK(20, 3, 4, SIMPLE), 1) > REF (SOPD(20, 3, 4, SIMPLE). 1) - What this means -
    can you please clarify.

  2. Will EA, close the opposite order once it gets signal confimation?

  3. Which lot size will EA take into acount?

    Expect clarification please…