Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 975 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: NFA flag? [Re: Lapsa] #483928
08/14/21 20:45
08/14/21 20:45
Joined: Aug 2021
Posts: 237
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 237
Also tried to add these:

Quote

if (is(FIRSTRUN)) return;
if (is(FIRSTINITRUN)) return;
if (is(INITRUN)) return;
if (!Live) return;
if (!RUNNING) return;


before entering trades.

Last edited by Lapsa; 08/15/21 08:23.
Re: NFA flag? [Re: Lapsa] #483929
08/14/21 20:51
08/14/21 20:51
Joined: Aug 2021
Posts: 237
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 237
`UpdateDays` variable gets ignored.

Re: NFA flag? [Re: Lapsa] #483930
08/14/21 20:54
08/14/21 20:54
Joined: Aug 2021
Posts: 237
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 237
It just doesn't work.

Re: NFA flag? [Re: Lapsa] #483931
08/14/21 21:38
08/14/21 21:38
Joined: Feb 2017
Posts: 1,726
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,726
Chicago
The barmode flag was to solve the problem of the Weekend being observed, and therefore, "market is closed". That should be done with now.

This other issue you discussing, I have no way to know what you are complaining about. What reason do you have to believe that it should [not] be trading at all?

Last edited by AndrewAMD; 08/14/21 21:58. Reason: Typo
Re: NFA flag? [Re: AndrewAMD] #483932
08/14/21 21:57
08/14/21 21:57
Joined: Aug 2021
Posts: 237
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 237
Originally Posted by AndrewAMD
The barmode flag was to solve the problem of the Weekend being observed, and therefore, "market is closed". That should be done with now.


That is correct. I was bit confused at first how barmode thingy works but you are right. That issue is resolved ('Market is closed' message).

Originally Posted by AndrewAMD
This other issue you discussing, I have no way to know what you are complaining about. What reason do you have to believe that it should be trading at all?


It shouldn't be. That's the problem.

Zorro catches up on historical data and along the way - calls exchange to open/close trades based on data 2 days ago.

It should be placing trades only AFTER the pull of historical data.

It's as if Zorro reads historical data tick by tick, minute by minute, checks strategy, builds up indicators, series and whatnot, sees enterLong(), places trade, immediately reads next 5-20 tick bars, confirms that it should go short now, reverts position, reads next 10, closes again etc. All that while it catches up on historical data. Like, I don't know, perhaps 100 order creation requests - in about one minute.

And I'm having same issue with original Workshop4 script too. Only it doesn't spam order requests as much since it works with bar period of 1440.

Re: NFA flag? [Re: Lapsa] #483933
08/15/21 08:21
08/15/21 08:21
Joined: Aug 2021
Posts: 237
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 237
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.
Re: NFA flag? [Re: Lapsa] #483934
08/15/21 09:34
08/15/21 09:34
Joined: Aug 2021
Posts: 237
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 237
[Linked Image]

Page 3 of 3 1 2 3

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1