I have written a script that correctly computes support and resistance values for R2, R1, PP, S1, S2 values for daily, weekly, monthly, quarterly, semi-annual and annual timeframes. This part is working. The data is presented as a non-price study as a table. So far so good as the table produces the proper data.
Then I test each value in the table for proximity (within 0.5%) of any other value in the table. I then format each table cell foreground and background font colors depending if the values are close to each other.
My problem is knowing when each of the daily, weekly, monthly, quarterly, semi-annual and annual calculations have completed before I test the results for proximity. I have found that function main() is running 301 times. I really only want it to run once and then compute proximity of all of the values on the six timeframes.
eSignal knows about barstate. But I am operating on 6 timeframes. I had to construct quarterly, semi-annual and annual HLC data from monthly data.
I would like pointers on how to proceed. Even if I had a time delay function that says wait two minutes and then compute proximity I might get by. But right now I don't know how to determine when all of my prior calculations have completed before I start a proximity test step.
Mike Scott
Tarzana, CA
Then I test each value in the table for proximity (within 0.5%) of any other value in the table. I then format each table cell foreground and background font colors depending if the values are close to each other.
My problem is knowing when each of the daily, weekly, monthly, quarterly, semi-annual and annual calculations have completed before I test the results for proximity. I have found that function main() is running 301 times. I really only want it to run once and then compute proximity of all of the values on the six timeframes.
eSignal knows about barstate. But I am operating on 6 timeframes. I had to construct quarterly, semi-annual and annual HLC data from monthly data.
I would like pointers on how to proceed. Even if I had a time delay function that says wait two minutes and then compute proximity I might get by. But right now I don't know how to determine when all of my prior calculations have completed before I start a proximity test step.
Mike Scott
Tarzana, CA
Comment