[Haasbot Utilities] Kobalt's plunder: PlotExposure

stable
By Kobalt in Miscellaneous Published October 2020 👁 1,783 views 💬 4 comments

Description

Don't rememberz how I got this... "Great artists steal. They don't do homages." ---=-Quentin Tarantino
HaasScript
DefineCommand('PlotExposure', 'L-S exposure')
local longAmount = LongAmount()
local shortAmount = ShortAmount()

-- Add a chart that shows the exposure
local lineValue = IfElse(longAmount > 0, longAmount, -shortAmount)
local line = Plot(2, 'Exposure', lineValue, {c=Green, s=Step})
PlotDoubleColor(line, 0, Red, ChangeColorOpacity(Gray, 20))
ChartSetOptions(2, 'Exposure')

DefineOutput(VoidType)

4 Comments

Sign in to leave a comment.

D
dena02 over 5 years ago

Cool work

K
Kobalt over 5 years ago

Thanks, easy share, knew many would find handy, more very soon, if you want to test, see something else, just DM me.

F
Firetron over 5 years ago

Love it! Make it work for hedged!

K
Kobalt over 5 years ago

It doesn't??