Prorealtime Programming

jvk1

Newbie
Messages
1
Likes
0
Hi, I am having trouble adding a condition to a PRT strategy. For the Buy (sell, short) portion I have:

Rem Buy
indicator1 = ExponentialAverage[a](close)
indicator2 = ExponentialAverage(close)
c1 = (indicator1>indicator2)

indicator3 = ExponentialAverage(close)
indicator4 = ExponentialAverage{c](close)
c2 = (indicator3>indicator4)

IF c1 AND c2 THEN
BUY 1%CAPITAL AT MARKET THISBARONCLOSE
ENDIF

I wish to add a condition where the Buy is not triggered until X Bars (days) later on close.

If anyone could help me with this. It would be greatly appreciated. Thanks, jvk1
 
Top