bigmit2011
New member
Hi,
Is there a way to iterate and create multiple conditions, programmatically?
For example I am interested in something as follows in one script:
Price Change Close is at least -8 percent less than 5 days ago
or
Price Change Close is at least -8 percent less than 6 days ago
or
Price Change Close is at least -8 percent less than 7 days ago
etc for a range of days I choose.
Is there a programmatic way to create multiple conditions via iteration?
So with Thinkscript, I imagine this statement
translates as follows:
So instead of manually writing out the conditions, I wonder if there is a programmatic way to do so.
Thank you.
Is there a way to iterate and create multiple conditions, programmatically?
For example I am interested in something as follows in one script:
Price Change Close is at least -8 percent less than 5 days ago
or
Price Change Close is at least -8 percent less than 6 days ago
or
Price Change Close is at least -8 percent less than 7 days ago
etc for a range of days I choose.
Is there a programmatic way to create multiple conditions via iteration?
So with Thinkscript, I imagine this statement
Code:
Price Change Close is at least -8 percent less than 5 days ago
translates as follows:
Code:
close[5] < .92 * close
So instead of manually writing out the conditions, I wonder if there is a programmatic way to do so.
Thank you.