[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EL question on retrieving past values



PureBytes Links

Trading Reference Links

Actually, it does need a little more explanation. If you are using TS4
and this is a contract wich has RTH of 6+ hours a day, then you can not
load 30 days of 1min data. You would then have to store the values
with a dll.
However, since you did not mention what the problem is, I assume
....you are not using TS4.
....the event you are recording daily is recorded at a specific time on a
specific bar.
....Your problem is that you cannot figure out which previous bar to reference
and that your maxbarsback setting would encompass almost your entire data set.

If I am correct in my assumptions, then at the incidence of calculating the
sentiment
value, send the value to an array with 30 values in it. The array will remain
constant
until the next days calculation at wich time, the oldest value is bumped off the
array,
the rest of the values are sorted down one place, and the new value is inserted
in
the empty slot.

Barry Silberman wrote:

> Perhaps someone can help with obtaining a past variable result.   This is an
> attempt to test Mark Fisher's position that some markets may be cyclical (30
> trading sessions)  in his book "The Logical Trader."
>
> Background info --- I have no problem with coding this part:
> 1- running 1 minute chart of emini S&P
> 2- at 16:15 EST determine where close is in relation to open range and
> pivots to see if there is a bullish or bearish bias for next day.
>
> Problem is while running a 1 minute chart, to retrieve one of 3 possible
> results from 30 days ago. (bearish, bullish, no bias).
>
> Hopefully this explains issue clearly enough without having to post all of
> the code up to this point.
>
> TIA.
>
> Barry Silberman