I am trying to perform calculations based upon different symbols and different intervals and based only on closed bars.
So here is a simplification of my algorithm:
Look at sma for symbol "INTC" for intervals 5, and 10.
when sma(sym("INTC", 5)) for bar(0) == 10,
I look at sma(sym("INTC", 10)) for bar(0) and wait for it to hit 15.
when sma(sym("INTC", 10)) for bar(0) hits 15, I look back at
sma(sym("INTC", 5)) for bar(0) and wait for it to drop below 5.
At that point, I print something to the output window.
I am doing this all from one EFS script that contains both series.
But ticks will only come in at the interval of the chart that has that EFS loaded, correct?
So, how do I essentially get close ticks for multiple intervals, which could even be different from interval for the chart where the EFS runs??
Do I have to run a separate EFS from a chart that corresponds to each interval, so I have a 5 minute chart that receives close ticks every 10 minutes and a 10 min. chart that receives ticks every 10 min.?
And then when a condition occurs in either EFS, it sets a global var. with that condition, which the other EFS can monitor while it continues to process close ticks? So in effect, either EFS has access to the latest state of the other EFS through global vars. That is how they link together.
Does that make sense? It sounds like it should work but seems rather complicated. I don't see an easier way.
So here is a simplification of my algorithm:
Look at sma for symbol "INTC" for intervals 5, and 10.
when sma(sym("INTC", 5)) for bar(0) == 10,
I look at sma(sym("INTC", 10)) for bar(0) and wait for it to hit 15.
when sma(sym("INTC", 10)) for bar(0) hits 15, I look back at
sma(sym("INTC", 5)) for bar(0) and wait for it to drop below 5.
At that point, I print something to the output window.
I am doing this all from one EFS script that contains both series.
But ticks will only come in at the interval of the chart that has that EFS loaded, correct?
So, how do I essentially get close ticks for multiple intervals, which could even be different from interval for the chart where the EFS runs??
Do I have to run a separate EFS from a chart that corresponds to each interval, so I have a 5 minute chart that receives close ticks every 10 minutes and a 10 min. chart that receives ticks every 10 min.?
And then when a condition occurs in either EFS, it sets a global var. with that condition, which the other EFS can monitor while it continues to process close ticks? So in effect, either EFS has access to the latest state of the other EFS through global vars. That is how they link together.
Does that make sense? It sounds like it should work but seems rather complicated. I don't see an easier way.
Comment