1 registered members (AndrewAMD),
1,280
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: One Night Stand System
[Re: Sphin]
#457044
12/21/15 11:19
12/21/15 11:19
|
Joined: Jul 2000
Posts: 27,986 Frankfurt
jcl
Chief Engineer
|
Chief Engineer
Joined: Jul 2000
Posts: 27,986
Frankfurt
|
Grmpf ... apperently I need some C-tutoring again. To determine the right day I'm using
if ((dow() == 5 && hour() == 0) || (dow() == 4 && hour() == 23)) {
The sense is "if either dow is 5 and hour is 0 or if dow is 4 and hour is 23". Is the setting of the brackets logically okay? I read that there are differences in using comparisms in C compared to other program languages, so I'm not quite sure. The brackets are fine as far as I see. Another way to check the time interval around thursday midnight is: if(between(tow(),42359,50001)) ...
|
|
|
Re: One Night Stand System
[Re: Sphin]
#457382
01/16/16 02:56
01/16/16 02:56
|
Joined: Feb 2014
Posts: 181
RTG
OP
Member
|
OP
Member
Joined: Feb 2014
Posts: 181
|
Yours is behaving differently to mine. Did you add additional assets?
[GBP/USD::S7491] -224$ s1.4599 c1.4362 e1.4350 [USOil::S7442] -678$ s32.96 c29.97 e29.96 [GBP/JPY::S7458] +46$ s171.44 c168.19 e168.83
Which script (version) are you running? Do you train it often?
Last edited by RTG; 01/16/16 03:00.
|
|
|
Re: One Night Stand System
[Re: RTG]
#457388
01/16/16 10:56
01/16/16 10:56
|
Joined: Dec 2013
Posts: 568 Fuerth, DE
Sphin
User
|
User
Joined: Dec 2013
Posts: 568
Fuerth, DE
|
It's the version from #455223 of this thread here, but I do some experiments with other assets, so my actual asset loop is:
while(asset(loop("AUD/JPY","AUD/USD","CHF/JPY","EUR/JPY","EUR/USD","GBP/USD","NZD/CHF","NZD/JPY","USD/CHF","USD/JPY","USOil")))
IMO training often doen't make much sense using daily bars. Maybe again after one year or something. I still use BarOffset=1 because I did some mistakes on my own the last weeks so I cannot confirm yet that the other conditions work, but they should. One problem was that if timestamp of the decisive bar is on Thursday I had to incclude this day (dow()!=4) in the exit condition, otherwise Zorro tries to setup the trade and gives up immediately afterwards with "Missed entry". No problem of Zorro but of mine.
|
|
|
Re: One Night Stand System
[Re: Sphin]
#457410
01/17/16 11:53
01/17/16 11:53
|
Joined: Feb 2014
Posts: 181
RTG
OP
Member
|
OP
Member
Joined: Feb 2014
Posts: 181
|
So what is the profit/loss since you have started running it?
My live demo has suffered from several technical failures (the first was the bar offset problem and the second was that huge oil loss from incorrect contract allocation by FXCM). Both of these problems have steered me away from trading it for real.
I also have a problem with the Oil contract size being different from what the broker has. For instance on Friday it went short 780 contracts instead of 78. I can change this in assetsfix but this file is downloaded from the broker when it connects, effectively overriding my changes?
On a topic more closely related to the strategy, I was listening to a trading podcast where the subject was seasonality it equity markets. The speaker claimed that are a lot of automatic purchases of US equities within the last 4 days of the trading month and between the first 3 trading days of the next month. Consequently he claimed that there was an edge in buying in the last 4 days of the month and selling within the next 3 days of the next month.
Naturally I thought to test this idea with Zorro on the SPX500. This is long only obviously. My version simply buys on the 18th trading day of the month and sells on the 3rd day of the next month. I was thinking to add this to the ONS system.
----------------------------------------------------- //Jay Kaeppel Last 4, first 3 trading days of the S&P500
#include <profile.c>
function run(){ // UpdateDays = -1; set(PARAMETERS+FACTORS); Verbose = 14; // Detrend = TRADES; // Capital = 2000; // Margin = OptimalFLong * Capital * sqrt(1 + max(0,WinTotal-LossTotal)/Capital); BarPeriod = 1440; StartDate = 2005; // NumWFOCycles = 5; asset("SPX500"); var OptimalStop = optimize(50,50,500,50) * PIP;
if(tdm(0) == 18) //optimize(1,1,23,1)) enterLong(0,0,OptimalStop, 0); // stop loss if(tdm(0) == 3) //optimize(1,1,23,1)) exitLong(); plotMonthProfit(); }
|
|
|
|