Page 1 of 1

Programing LUA question

PostPosted: Thu Mar 02, 2017 6:27 am
by Kilgharrah
Hi,
What is the purpose of +1 in this line of programming, because sometimes they put it and other times not.

The purpose of first is to ensure the existence of data in a certain period?

Code: Select all
first= math.max(FastMA1.DATA:first(), SlowMA1.DATA:first())+1;


Thanks

Re: Programing LUA question

PostPosted: Fri Mar 17, 2017 5:04 am
by Apprentice
The purpose of first is to ensure the existence of data in a certain period?

Yes

first= math.max(FastMA1.DATA:first(), SlowMA1.DATA:first()

Will be enough if you're accessingMA FastMA1 and SlowMA1 only.