PureBytes Links
Trading Reference Links
|
> From a system I am making the following calls:
> putAt("Global", "CurrentBar", CurrentBar);
> putAt("Global", "Position", Mkt_Pos);
> putAT("Global", "Long_Stop", LongExitTarget);
> putAT("Global", "Short_Stop", ShortExitTarget);
> Which "populate" the memory correctly with accurate results (I verified
> this through having it also write to a CSV file the values).
But the correct values are overwritten on each bar, no? You have
only ONE storage location for CurrentBar, ONE for Mkt_Pos, etc. That
one location gets overwritten on each new bar.
> For some reason, each day's (bar's) value when plotted is the
> value from the very last day, ie: there is one value which is being
> read in and that is the only value I can plot.
You basically need an array, but I don't think HashNums supports
arrays. Try something like this:
Vars: DayTime("");
DayTime = NumToStr(Date,0) + NumToStr(Time,0);
putAt("Global", "CurrentBar" + DayTime, CurrentBar);
putAt("Global", "Position" + DayTime, Mkt_Pos);
putAT("Global", "Long_Stop" + DayTime, LongExitTarget);
putAT("Global", "Short_Stop" + DayTime, ShortExitTarget);
&etc for the other vars. That way you'll have a unique storage
location for EACH bar. You don't need the "+ NumToStr(Time,0)" if
you plan to use this only on daily data.
Gary
PS: It's not usually necessary to post a request to three different
lists, especially considering many people read all three of them...
|