Unfilled Gap Arrow


Tags:
Category:
0
0

Hi Pete,

I have searched the forum on Gap finder and this post came closed to what I was looking for but I am looking for open gaps: https://www.hahn-tech.com/ans/scan-gap-within-last-week/

I’ve been able to add arrows on my chart that indicate a Gap up and Gap down, of more than or equal to 1 cent, and working well. I’m trying to now place the arrows at only those places where the Gap Up or Gap Down (on Daily), of more than or equal to 1 cent, has not been filled since the Gap occurred and would like to go 3 months back if possible.

I’ve attached a screenshot of how the gap up and gap down arrows look on my current chart. Looking to get your help to display unfilled price gap arrows. Appreciate your time and effort helping us.

Here is my simple newbie code for Gap ups:

input price1 = low;
input price2 = high;

def x = price1 – price2[1];

plot y = x >= 0.01;
y.setpaintingStrategy(paintingStrategy.BOOLEAN_ARROW_UP);

Thanks

B

Attachments:
Marked as spam
Posted by (Questions: 6, Answers: 10)
Asked on June 6, 2020 5:35 am
308 views
0
Private answer

The only way to solve this is by using the "fold" statement. Which is Thinkorswim's lame attempt at looping. For each gap, the code needs to be able to loop all the way to the right to see if price ever crossed that gap in the future. Way beyond the ability of newbie coders and way beyond the scope of anything I can cover within the short time I have to produce free solutions in the Q&A forum.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on June 6, 2020 7:59 am