Scope cells refactoring
This commit is contained in:
@@ -394,7 +394,7 @@ end;
|
||||
|
||||
procedure TForm1.OHLCButtonClick(Sender: TObject);
|
||||
const
|
||||
numRecs = 100;
|
||||
numRecs = 1000;
|
||||
lookback = 50;
|
||||
smaSlowLength = 20;
|
||||
smaFastLength = 10;
|
||||
@@ -561,12 +561,12 @@ begin
|
||||
if series.AsRecordSeries.Value.TotalCount >= smaSlowLength then
|
||||
begin
|
||||
// Update the 'current_series' value in the scope using the FAST index-based assignment
|
||||
scope[seriesAddress] := series;
|
||||
scope[seriesAddress].Value := series;
|
||||
|
||||
// Execute the PRE-BOUND call AST
|
||||
var resultValue := callAst.Accept(visitor);
|
||||
|
||||
if i < smaSlowLength + 50 then
|
||||
if i mod 50 = 0 then
|
||||
begin
|
||||
Memo1.Lines.Add(Format('Tick %d/%d: Close = %.2f, Signal = %s', [i, numRecs, ohlcvRec.Close, resultValue.ToString]));
|
||||
Application.ProcessMessages;
|
||||
|
||||
Reference in New Issue
Block a user