Page 1 of 1

List of lua built-in indicator

PostPosted: Wed Nov 07, 2018 1:49 pm
by ilnefopas
Hi guys,

I am willing to build a custom indicator and I'd like to leverage the standard indicators already included in LUA....like EMA, MVA,BB,...
I've been through the whole LUA doc but I'm not able to find a list of all the LUA built in indicators.
Does this exist somewhere ?

Thanks.

Re: List of lua built-in indicator

PostPosted: Wed Nov 07, 2018 4:14 pm
by Apprentice
No, but u can get a list of instaled indicator/oscillators via this three flags.
core.FLAG_INDICATOR
core.FLAG_ONLYINDICATORS
core.FLAG_ONLYOSCILLATORS

function Init()
indicator.parameters:addString("INDICATOR", "Indicator", "", "");
indicator.parameters:setFlag("INDICATOR",core.FLAG_INDICATOR);
end
You can use this as example.
viewtopic.php?f=17&t=62211&hilit=generic

Re: List of lua built-in indicator

PostPosted: Thu Nov 08, 2018 8:58 am
by ilnefopas
Thanks for the hand.
Now I've got 2 more questions :

1) Take BB for instance, to reference the upper bol I know that we use BB.TL, for the lower BB.BL. I do not know where I got that from but I know it. Can we find somewhere the different possibilities that we can use for a given built-in indicator ? Alternatively where is the source code of standard indicators on a TSII install ?

2) Moving to strategies now. Let's say I've built my custom indicator and imported it into TS2. Now I'd like to use it in a strategy. My understanding is that I can point the standard indcators library with that command "dofile(core.app_path() .. "\\strategies\\standard\\include\\helper.lua")". Am I right ? And if so how can I point my custom indicator library in my strategy code (if such library exist) ?

Thanks.

Re: List of lua built-in indicator

PostPosted: Thu Nov 08, 2018 7:16 pm
by ilnefopas
Ok my bad...helper.lua has nothing to do with indicators.

Anyway, my 2 questions in previous post remain.

Basically what I ma trying to understand is how we can use a standard or custom indicator in a strategy.
When I say use I mean how can we manipulate it (see BB example in previous post) and is this documented somewhere.
And finally is there 1/several libraries that we need to specifiacally call through an include in a strategy code ?

Thanks if you can help.