Comment on Kite - Introduction

Nithin Kamath commented on 24 Dec 2015, 08:09 PM

1. Not yet
2. Here is the code: size=0;
total=0;
pivotPoint=0;
high=0;
low=0;
prevHigh=0;
prevLow=0;
hlSpread=0;

RESET PIVOT:
pivotPoint = total/size;
prevHigh = high;
prevLow = low;
hlSpread = high – low;
size = total = high = low = 0;

for quote in quotes

total += (previousQuote.High + previousQuote.Low + previousQuote.Close)/3;
high = Math.max(high,previousQuote.High);
low = Math.min(low > 0 ? low:previousQuote.Low, previousQuote.Low);
size++;

if new year or month or week or day:
RESET PIVOT

For fibonacci

Resistance 1 = pivotPoint + 0.382 * hlSpread;
Resistance 2 = pivotPoint + 0.618 * hlSpread;
Resistance 3 = pivotPoint + hlSpread;
Support 1 = pivotPoint – 0.382 * hlSpread;
Support 2 = pivotPoint – 0.618 * hlSpread;
Support 3 = pivotPoint – hlSpread;

For Standard

Resistance 1 = 2 * pivotPoint – prevLow;
Resistance 2 = pivotPoint + hlSpread;
Resistance 3 = pivotPoint +2 * hlSpread;
Support 1 = 2 * pivotPoint – prevHigh;
Support 2 = pivotPoint – hlSpread;
Support 3 = pivotPoint – 2 * hlSpread;
3. The default range chooses a % itself. Custom % is currently not possible. Checking on why it is showing 0.05-0

View the full comment thread »