Relative Strength indicator/scan – odd behavior for Reference dates afterJune 9,2017


Category:
0
0

I am getting an odd behavior when I change the Reference date. Everything works fine  through Reference Date = 20170609. But if I set the reference date as 20170610 or later, the red line does not get shifted to the green line on that (reference) date. Don’t know if it is happening for me alone due to some glitch or you can reproduce this error. (Checked couple of stocks and time frames – CE, GOOG and INTC on Daily and 4 hour charts – same  behavior).

I also have another question regarding your CompoundValue statement

def sr = CompoundValue(“historical data” = RS[0], “visible data” = if startDate <= 0 then sr[1] else RS[0]);

What makes the red line prior to reference date remain constant and not change with the values of close/close(“SPX”)? (The way I understoodd, your startDate variable is a True/False variable and remains false after the reference date, so sr=sr[1] keeps it constant after that date, but I do not understand how it is kept constant before this date. Will appreciate if you could explain. Please correct me if the way I am reading this is totally wrong. I will not be offended).

Thanks

Arun

Attachments:
Marked as spam
Posted by (Questions: 11, Answers: 16)
Asked on June 23, 2018 1:09 pm
206 views
0
Private answer

As to the first part of your question. The date you enter must be a day the markets were open. 6/9/17 was a Friday. The two dates after that were Saturday and Sunday. Markets closed, so it will not work. Set the date to that following Monday, 6/12/17 and the start point appears. This is by design. I am wondering if I failed to explain this in the video?

The second part of your question. I am very certain I explained this part. Because it is the very reason this indicator was required. The red line is assigned a value on the first visible bar on the chart and never changes. My CompoundValue() statement merely tricks the red line into reseting it’s value on the start date, which as you know must be a day the markets were open.

In More Technical Terms

“historical data” = RS[0] is the portion that controls the value prior to the start date.

"visible data" = if startDate <= 0 then sr[1] else RS[0] is the portion that controls the value after the start date.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on June 23, 2018 3:40 pm
0
Thanks. I am sure it requires a brilliant mind to come up with this idea of introducing a ”Reference date” to solve the issue you described in the video. . Arun
( at June 23, 2018 8:31 pm)