S&C 2017-02 Exponential Standard Deviation Bands (Apirine)
Author: gfparker
Creation Date: 1/30/2018 2:09 AM
profile picture

gfparker

#1
I recently started playing with this strategy because I liked the high ~ 70% win rate, but in reviewing the coding I don't understand the purpose of the condition "bar >= pctESDBBelow[bar]+3" that exists in line 51 of the code. As I understand the code, pctESDBBelow[bar] is a count of the number of sequential bars where the Close is less than 20% of the width of the ESDB band width. I'm guessing this even though I can't find any documentation in WealthLab on the operation SeriesIsBelowValue.Series which occurs in line 32 of the code. The only reason bar would be less than pctESDBBelow[bar]+3 would be at the very first of a series if all the Close values were less than 20% of the width of the ESDB band. Is this correct?

The code can be found in the library of WealthLab "Bands" Trading strategies.
profile picture

Eugene

#2
Series Is Below (Series is Below a Value as their "...Above" counterparts) is documented in the Wiki on which you can rely as the source of indicators documentation. Check it out if something's not clear.

QUOTE:
As I understand the code, pctESDBBelow[bar] is a count of the number of sequential bars where the Close is less than 20% of the width of the ESDB band width

Right, as the entry rule #1 tells us to "1. Buy at market when ESD Band Width percentage stays below 0.2 (20%) for 3 days in a row".