Comment on Managing your Script

vipul agarwal commented on 09 Apr 2017, 01:39 PM

Im trying to develop code for following strategy buy getting erroe. Please help me out in correcting this.

Strategy: (Daily EOD Charts)
BUY if all following conditions meet
1. Current EOD close is greater than average of highest high and lowest low of last 5 days (counting current candle as 1st day)
2. Average of highest high and lowest low of last 5 days is greater than that of 10 days (counting current candle as 1st day)
3. Current EOD candle close should be greater than High of PREVIOUS 10TH candle (counting current candle as 1st day)
4. Current EOD candle should close above highest high of last 10 days (counting current candle as 1st day)

Code im trying to use is

SET A = (HHV(5) + LLV(5))/2
SET B = (HHV(10) + LLV(10))/2
CLOSE > A > B
CLOSE > REF(HIGH, 9)
CLOSE > REF(HHV(10), 1)

Im getting error as No results. Make sure that atleast Buy and Sell scripts are typed in.

Please revert asap.

View the full comment thread »