I think I found it. It seems to be working as expected.

Pulled down recent 3 day data, prepared, converted to t6, sorted.

This is how currently first lines of run() function looks like:

Quote

function run()
{
set(NFA|PRELOAD); //|PLOTNOW|PARAMETERS|FACTORS
BarPeriod = 1;
LookBack = 29;
//UpdateDays = 0;
StartDate = 20210814;
EndDate = 20210815;
BarMode = BR_FLAT;

History = "*.t6";

// asset("MATICUSDT");


Commenting out asset() function calls seems to be detrimental.
Setting history variable might be not as it seems to be same as default.

NFA, PRELOAD flags and BarMode are also crucial.

Quote

Lookback period (29 bars) .


[157: Sun 21-08-15 08:01] 1.3803/1.3837\1.3803/1.3823
[158: Sun 21-08-15 08:02] 1.3821/1.3841\1.3785/1.3799
[159: Sun 21-08-15 08:03] 1.3803/1.3841\1.3780/1.3796
[160: Sun 21-08-15 08:04] 1.3796/1.3861\1.3782/1.3843
[161: Sun 21-08-15 08:05] 1.3843/1.3934\1.3843/1.3927
[162: Sun 21-08-15 08:06] 1.3927/1.3932\1.3879/1.3926
[163: Sun 21-08-15 08:07] 1.3928/1.3973\1.3909/1.3964
[164: Sun 21-08-15 08:08] 1.3964/1.3964\1.3889/1.3917


^ Notice there's no processing of Fri 21-08-13 bars. It jumps right in.

Currently waiting for the first signal.

----------------------------------------------

Quote

[175: Sun 21-08-15 08:19] 1.3952/1.3960\1.3936/1.3951
[176: Sun 21-08-15 08:20] 1.3950/1.3978\1.3941/1.3969
(MATICUSDT::S) Short 5@1.39690 Entry stop
(MATICUSDT::S) Entry stop 1.39690 hit at 1.39680 08:20:00
!MATICUSDT: SELL 5 (q5 x la1) at MARKET
[MATICUSDT::S00037] Short 5@1.39690


Yay! Trade probably will drown but the tech seems to be working!

Nice and clean.

Phew.... Hussle is an understatement.

Last edited by Lapsa; 08/15/21 08:23.