Ugh. I'm stuggling. I don't know WL5 and I can't remember WL4. I think this is what confuses me the most. Please translate snippet from WL4 to WL5. Thanks very much!
SetScaleDaily;
hAVGV20 := SMASeries(#Volume, 20);
hAVGC10 := SMASeries(#Close, 10);
hVol := #Volume;
hOpen := #Open;
hClose := #Close;
hHigh := #High;
hLow := #Low;
hATR := ATRSeries(20);
RestorePrimarySeries;
// call this with last bar of day
procedure GetDailyNums;
begin
db := GetDailyBar(Bar);
Vol := @hVol[db];
AVGV20 := @hAVGV20[db];
ATRPts := @hATR[db];
end;
Size:
Color:
CODE:
Please log in to see this code.
Size:
Color:
Thanks Eugene. The ATR.Series isn't working as expected. When I run the following code on symbol KR using 15-minute bars the ATRs are in the .4 range, when in fact the current 20 day ATR for KR is 1.35 points. Why the discrepancy? Thanks...
CODE:
Please log in to see this code.
Size:
Color:
CODE:
Please log in to see this code.
Size:
Color:
I can't keep my brain around this stuff. I'm doing a intraday strategy, but I want to use compressed data for average volume, ATR, etc. I'm using code similar to the code above. I want to compare the close of an intraday bar with that day's open price. Using the code above, the best I can do is:
CODE:
Please log in to see this code.
The problem with the above code is when the Close[bar] is the last bar of the day, hOpen[DBar+1] gives me the NEXT day's open.
The following code usually gives me yesterday's open:
CODE:
Please log in to see this code.
Thanks for your help...
Size:
Color:
You don't need that code at all to find this day's open price:
CODE:
Please log in to see this code.
Size:
Color: