Gamestudio Links
Zorro Links
Newest Posts
Can't go to FALSEGOTO:DOUBLE?
by Turrican
Today at 00:34
Chamferbox Lucky Pack, once a year chance, 90% OFF limited deals
by Chamferbox
Yesterday at 21:10
How detect 200 bars after trade was opened?
by Tuguldur717
Yesterday at 13:58
Data quality and accuracy of test results
by brax
Yesterday at 13:44
Can be changed the header in Zorro?
by tomaslolo
Yesterday at 12:12
Price difference between last tick and previous.
by JRA
Yesterday at 11:47
Zorro on Linux
by alb
02/21/18 20:47
AUM Magazine
Latest Screens
Forgotten Tales - Demo version
RPG PARTY
Triton Wing now available on Steam
AckCon'17: Lotter vs The World
Who's Online
17 registered (dmac, Hredot, Cheulmen, BlackJack, MatPed, Kartoffel, alibaba, AndrewAMD, 3 invisible), 471 Guests and 9 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
tomaslolo, dmac, alb, may, piddle61
17896 Registered Users
Page 3 of 4 < 1 2 3 4 >
Topic Options
Rate This Topic
#468985 - 11/01/17 05:15 Re: Dual Momentum Algorithm - The way Zorro would have done it ***** [Re: firecrest]
Hredot Online
Member

Registered: 09/11/17
Posts: 183
Since I did not try live trading this script, I'm afraid I cannot help you there.
Perhaps updating Zorro as firecast suggests might help.

Top
#468993 - 11/01/17 17:19 Re: Dual Momentum Algorithm - The way Zorro would have done it [Re: firecrest]
Nanitek Offline
Senior Member

Registered: 03/25/15
Posts: 331
Loc: Rogaland
Originally Posted By: firecrest
I have the same problem previously too but it solved with the latest Zorro version 1.66.5. Not sure if your problem is the same.


I am using 1.60 but I will try with that one

Top
#469019 - 11/02/17 14:59 Re: Dual Momentum Algorithm - The way Zorro would have done it [Re: Nanitek]
Hredot Online
Member

Registered: 09/11/17
Posts: 183
For some reason I cannot edit the first post any more, to make updates. Here it was pointed out that the INITRUN clause is not needed when loading Assets.csv file (probably to allow the script to load an updated list at any point in time during execution).
The use of INITRUN condition likely came from here. So to stop confusing people I dropped the INITRUN check from the script:

Quote:
Disclaimer: Use at your own risk! You alone are responsible for your gains or losses.
Dual Momentum Algorithm V1.1


Edited by Hredot (11/02/17 14:59)

Top
#469032 - 11/03/17 11:47 Re: Dual Momentum Algorithm - The way Zorro would have done it [Re: firecrest]
Nanitek Offline
Senior Member

Registered: 03/25/15
Posts: 331
Loc: Rogaland
Originally Posted By: firecrest
I have the same problem previously too but it solved with the latest Zorro version 1.66.5. Not sure if your problem is the same.


I used 1.66.5 and got the same problem. Did I choose the wrong assets?
The zorro window shows XXXX as price and the box is red in the zorro window but the Ib gateway is window shows green connection

Quote:




Trade: Dual_Momentum (NFA) 2017-11-02
Assets HistoryAssetsZ9.csv
Lookback period (580 bars) .

Download CSJ.US.. 2723 bars read
[638: Fri 17-11-03 04:00] (105.0500)
!Order Message:
BUY 1 XBI ARCA
Warning: your order will not be placed at the exchange until 2017-11-03 09:30:00 US/Eastern XBI-STK--0--SMART--USD
(XBI::L) Can't open 1@82.47 at 04:00:01
[SMH::L] Skipped: Lots 0
!Order Message:
BUY 2 ITB BATS
Warning: your order will not be placed at the exchange until 2017-11-03 09:30:00 US/Eastern ITB-STK--0--SMART--USD
(ITB::L) Can't open 2@39.98 at 04:00:01
!Order Message:
BUY 1 XLV ARCA
Warning: your order will not be placed at the exchange until 2017-11-03 09:30:00 US/Eastern XLV-STK--0--SMART--USD
(XLV::L) Can't open 1@81.31 at 04:00:01


Top
#469110 - 11/05/17 17:41 Re: Dual Momentum Algorithm - The way Zorro would have done it [Re: Nanitek]
Hredot Online
Member

Registered: 09/11/17
Posts: 183
@Nanitek
Actually, it seems that your problem is not with the script but with operating hours of the broker. It says, the code tries to open trades at 4am in the morning. The exchange however only opens at 9:30am. That is what the error message seems to be informing you of: that your trades will only go through once the exchange opens at 9:30am.

I believe there is a flag in Zorro which you might want to search for, that restricts trading only to the hours when the exchange is open. Or perhaps you can shift the local clock on your trading computer by 5-6 hours, so that the script tries to trade after 9:30am. Hope this helps!


Edited by Hredot (11/05/17 17:44)

Top
#469339 - 11/11/17 17:48 Re: Dual Momentum Algorithm - The way Zorro would have done it [Re: Hredot]
Cheulmen Online
Newbie

Registered: 11/09/17
Posts: 29
@Hredot, I'm getting the following error message:

Error 014: ATR needs LookBack 520 > 480

The script runs and it gets a 26% CAGR, but this error makes it a bit scary to put it live laugh

It appears a couple of times, the script I'm running is the v1.1 without any change (but it happened also in v1.0).

(Also it gave a warning about VOO not having the first 175 bars, but that warning disappears using a StartDate=2011)

Top
#469341 - 11/11/17 18:21 Re: Dual Momentum Algorithm - The way Zorro would have done it [Re: Cheulmen]
Hredot Online
Member

Registered: 09/11/17
Posts: 183
@Cheulmen

I would not recommend using any script, where you do not fully understand what it does and its limitations. Testing after 2011 is very misleading, since its a period of great growth. In fact, in my personal opinion the script performs sub-optimal in the years 2008-2011. I suspect Z9 probably has similar trouble there (which is why its testing period "conveniently" starts in 2011). Long story short:

The Dual Momentum script I posted is not really intended to be traded live, but serves as a proof of concept first iteration, for others to use as a starting point and refine until you are satisfied with the performance. That would also involve figuring out all warning messages, understanding why they appear and fixing them if you think it is necessary.


Edited by Hredot (11/11/17 18:25)

Top
#469388 - 11/14/17 14:18 Re: Dual Momentum Algorithm - The way Zorro would have done it [Re: Hredot]
Cheulmen Online
Newbie

Registered: 11/09/17
Posts: 29
Yep, that's why I was asking, I'm trying to understand... I'm not sure to grasp why the error appears, as 520 is less than two years, and the time involved is over that timeframe

Top
#469397 - 11/14/17 18:40 Re: Dual Momentum Algorithm - The way Zorro would have done it [Re: Cheulmen]
Hredot Online
Member

Registered: 09/11/17
Posts: 183
Actually, in trading terms, a year is only 12*20 days, since only about 20 days a month are working days.
So two years are 24*20 = 480, which means, you could either increase the LookBack period accordingly, or alter the ATR command later in the script.

Top
#469578 - 11/23/17 03:11 Re: Dual Momentum Algorithm - The way Zorro would have done it [Re: Hredot]
jmlocatelli Offline
Newbie

Registered: 10/12/17
Posts: 6
Very nice piece of code.
Thanks for sharing.

Looking into the script, what is this code for?

var totalSlope=0;
for(i=0;i<enterNum;i++){ // determine the overall weight of wanted assets
totalSlope=totalSlope+assetWeight[assetSorted[i]];
}

Top
Page 3 of 4 < 1 2 3 4 >



Gamestudio download | chip programmers | Zorro platform | shop | resources | magazine | manual | support faq | bugs

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) 3dgamestudio.net