Percent Change Since Open Scan TOS


Category:
0
0

Trying to Scan for % change since open, tried several code snips has no effect on scan, still shows stocks up from prev days close but down for the current day. I want up for the current day since open only.

When I enter code in the Study Filter and save it on a scan it has no effect?

I tried -> plot scan = (open * 1.2) >= close;

I also tried about 20 other code snips, but nothing.

Attachments:
Marked as spam
Posted by (Questions: 3, Answers: 3)
Asked on July 19, 2019 10:38 am
1883 views
0
ok thank you Pete it works, yes I used Day Time Frame, now for the embarrassing part, I used to be a Perl, cgi, Javascript, html programmer and i can't figure out how to reverse this! what do I change to get the 2% or more change Lower since todays open?
( at July 22, 2019 7:49 am)
0
plot scan = close <= open * 0.98;
( at July 22, 2019 9:56 am)
0
% up or down since open Works great, thank you
( at July 24, 2019 6:24 am)
0
Private answer

Your screenshot does not include enough detail. You left out one of the most important sections. The time frame assigned to the Study Filter. It's in the far right side of the scan screen and you left it out.

I will give you the English version of your code snippet:

plot scan = (open * 1.2) >= close;

In English this states: True if current bar's close is greater than or equal to current bar's open times 1.2. This scan is not designed to find stocks that are up on the day. It is designed to find stocks that are not up more than 20% on the current bar. If your time frame is set to Daily (remember we don't know this because you left out that part of the screenshot), then this is taking today's open, multiplying it by 1.2, then checking if the close is less than that value.

So how would you write code that checks if today's close is 20% or more higher than today's open?

plot scan = close >= open * 1.2;

 

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on July 19, 2019 11:40 am