Prorealtime Programming

jvk1

Newbie
1 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
 
 
AdBlock Detected

We get it, advertisements are annoying!

But it's thanks to our sponsors that access to Trade2Win remains free for all. By viewing our ads you help us pay our bills, so please support the site and disable your AdBlocker.

I've Disabled AdBlock