TheLark

Introducing LarkBars & LarkValue, two custom scripts

BATS:VLO   VALERO ENERGY CORP NEW
1268 14 25
Both indicators are designed to find tops and bottoms, both work on all time frames, and the important values are configurable.
• LarkBars plot support and resistance lines _in real time_. These can be used as current turning points when they trigger (should be combine with other indicators), or show past areas of support / resistance.
• LarkValue attempts to show value ares of price movement, marked in green. This can be used as a trigger to get into something, or hold off. Overlaid are two STO             lengths, which can be used to watch divergence, or otherwise.

These two scripts are currently private, reworking some of the code.
isomorph
2 years ago
the larkvalue is really cool. i was wondering if that were possible at all with Pine... but apparently it is.

i am curious: how do you handle previous high/low values? i mean, how do you keep track that a high has been reached, and later, even though the price falls from there, you keep plotting those circles (that, i understand how to do--something along these lines?:

fallingsince(s,cond) =>
acc = cond ? 1 : na(acc) ? 0 : acc ? s < s : 0
acc
)

but then how does the script know when to stop plotting circles?

what's really puzzling is that sometimes it goes plotting circles for many bars and sometimes for very few bars.

do you do a simple diff with some preset distance from the circle to the close? for ex, am looking at the left side of your chart where there is a long green line. this line stops after the price keeps moving up further. is that achieved by coding something like this:

if price > 50 pips then stop plotting circles ?

but if so, then why does the script keep plotting circles when the price keeps plunging all the way to 28? there is now way of knowing at that point the script will go back up.

also, how do you handle programmatically switching to a different securities that is being quoted with 5 decimals instead of 2? i tried but couldn't. i think it is still not possible at the moment, or am i missing something?
Reply
TheLark PRO isomorph
2 years ago
It's actually a lot more crude than you think.
The bars or dots here, start plotting when an condition is met, the value is then held until the condition is met again.
So something like
cond1 = blah ? 1 : 0
holder = cond1 ? high : holder
plot(holder)

With a value holding over like this you can then more easily call upon it and compare it with other things
+1 Reply
TheLark PRO TheLark
2 years ago
ugh it eats the sytax! The holder in holder should be holder 1 bar ago
+1 Reply
isomorph TheLark
2 years ago
yeah... i had the function operator in my post but getsatisfaction doesn't seem to like (i have to double it and put in brackets otherwise it won't show properly) single [] or [], confuses them for beginning/end of html elements.
Reply
isomorph isomorph
2 years ago
ah damn it! doesn't work. basically 'greater than' and 'less than' symbols are not displayed in posts. let's see what could the escape character be...? '>'?
Reply
isomorph isomorph
2 years ago
aha! quote! ridiculous.
Reply
TheLark PRO isomorph
2 years ago
hahaha useful knowledge around these parts!
+1 Reply
isomorph isomorph
2 years ago
also, before i forget: just downloaded all of elhers's technical papers found here: http://www.mesasoftware.com/technicalpapers.htm

some reading to do now ;)
Reply
TheLark PRO isomorph
2 years ago
lol yeah its interesting stuff, I got really into it last year and ported a lot of it over to ToS :P
+1 Reply
coondawg71 PRO TheLark
2 years ago
Speaking of Mesa....how about a MAMA indicator??? That would be really nice. Not common but very very effective. I prefer default setting of (fast=0.10 and slow=0.001). Extremely reliable signals.

thanks!

sjc
+1 Reply
isomorph
2 years ago
damn it! my post doesn't display properly again! and i didn't save it! aarrghh! getsatisfaction really needs to increase those buffers.
Reply
TheLark PRO isomorph
2 years ago
Lol I hear ya, gotta start typing your responses on pastebin or something hehe
+1 Reply
isomorph
2 years ago
don't know if you can see the whole function i posted, but it goes somewhat like this:

function getLinePrice( flag )
price = flag ? na(price) ? close : price
price
Reply
Alphaoptions
2 years ago
When will these indicators become available? Looks like great stuff!
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out