Comment on Code your Technical Analysis strategy

Nithin Kamath commented on 05 Jul 2013, 08:31 AM

If you are referring to the previous Day’s high and low then,
Buy Alert Expression:
SET A = ((DHIGH (2) + DLOW (2))/2) + 10
SET B = ((DHIGH (2) + DLOW (2))/2) – 10
CLOSE > B AND REF (CLOSE, 1) < B

Sell Alert Expression:
SET A = ((DHIGH (2) + DLOW (2))/2) + 10
SET B = ((DHIGH (2) + DLOW (2))/2) – 10
CLOSE < A AND REF (CLOSE, 1) > A

If you are referring to previous candle’s high and low then,

Buy Alert Expression:
SET A = ((REF (HIGH, 1) + REF (LOW, 1))/2) + 10
SET B = ((REF (HIGH, 1) + REF (LOW, 1))/2) – 10
CLOSE > B AND REF (CLOSE, 1) < B

Sell Alert Expression:
SET A = ((REF (HIGH, 1) + REF (LOW, 1))/2) + 10
SET B = ((REF (HIGH, 1) + REF (LOW, 1))/2) – 10
CLOSE < A AND REF (CLOSE, 1) > A

View the full comment thread »