How to set strategy to run on a particular time

I have two following questions…

To prepare a script for the following strategy

  1. The following conditions for buy

    a) One green candle should close above the simple moving average (15)

    b) Buy 2 lots @ high+2 (in say crude oil) of previous green candle

    c) Target for lot 1 entry price + 11 and Target for lot 2 entry price + 21

  2. The following conditions for Sell

    a) One red candle should close below the simple moving average (15)

    b) Sell 2 lots @ high-2 (in say crude oil) of previous red candle

    c) Target for first lot = entry price - 11 and Target for second lot = entry price - 21

The above strategy should be executed only in a specific period (say between only 5:00 PM to 7:30 PM)

can I get script code for this… can some one help?

As per the above condition

Buy Script:

SET A = CLOSE > OPEN

A > SMA(HIGH,15)

Sell Script:

SET B = CLOSE < OPEN

B > SMA(LOW,15)