Indexing and Stream values

Moderator: admin

Indexing and Stream values

Postby 3am.gjp » Tue Nov 05, 2019 3:14 pm

I am having issues with indexing streams properly. The code I attached has a simple loop and I have a counter in it. I use this counter to make sure that there is a low over X periods of time.

This counter I attach to an internal stream. The problem I am having is indexing this stream and it's values to get the proper outcome.

For simplicity, I was troubleshooting the code to 1 or 0.

Going through the code, I attached output intIII[period] with intI[period] (intI being an internal stream). Then I use intIV[period] and set it to 1 if the output of intIII[period] == 0. Essentially it's supposed to invert the indicator.

What I end up getting is all ones regardless of the intIII[period] value. This is making absolutely no sense to me at all.

Can some one please take a look at this and explain to me what I am missing?

regards,
Gabriel
Attachments
question.lua
(3.53 KiB) Downloaded 422 times
3am.gjp
 
Posts: 4
Joined: Tue Jun 26, 2018 11:31 am

Re: Indexing and Stream values

Postby Apprentice » Wed Nov 13, 2019 3:41 pm

Can you describe your ideas.
Will write this for you from scratch.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 7 guests