Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 672 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 11 of 20 1 2 9 10 11 12 13 19 20
Re: One Night Stand System [Re: RTG] #456785
12/09/15 18:43
12/09/15 18:43
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I fear capital won't stand increasing margins this way over time. If I reinvested profit in the strategy I would use the formula of workshop 6 to build the margin:

Margin = 0.1 * OptimalF(Long/Short) * Capital * sqrt(1 + ProfitClosed/Capital);

Re: One Night Stand System [Re: Sphin] #456792
12/10/15 04:02
12/10/15 04:02
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Of course, totally forgot about that.

Re: One Night Stand System [Re: RTG] #456816
12/11/15 00:40
12/11/15 00:40
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Quote:
If midnight is really the best for that system, leave BarOffset at 0. Just check if the current hour is 23 or 0 before comparing the week day

Yes, I think this is really a suitable approach to avoid BarOffset.

Code:
[195: Mon 07.12.15 00:00] 1.08709
DOW: 1 - Time: 0:0:0.00050
[196: Tue 08.12.15 00:00] 1.08814
DOW: 2 - Time: 0:0:0.00050
[197: Wed 09.12.15 00:00] 1.08341
DOW: 2 - Time: 23:59:59.00050
[198: Thu 10.12.15 00:00] 1.08926
DOW: 4 - Time: 0:0:0.00050
[199: Fri 11.12.15 00:00] 1.10149
DOW: 4 - Time: 23:59:59.00050


Re: One Night Stand System [Re: Sphin] #456827
12/11/15 14:41
12/11/15 14:41
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Did you get fills today on USOil?

Re: One Night Stand System [Re: RTG] #456834
12/11/15 16:38
12/11/15 16:38
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Yes, Short 5@36.37.

Last edited by Sphin; 12/11/15 16:39.
Re: One Night Stand System [Re: Sphin] #456874
12/14/15 00:46
12/14/15 00:46
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
And your exit?

I had outsized positions on this account because I had 3 versions of the script running on it at once.
https://www.myfxbook.com/members/Sheffield/ons-20/1420677

Re: One Night Stand System [Re: RTG] #456885
12/14/15 18:39
12/14/15 18:39
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
[USOil::S8703] Cover 5@35.59: +32.76 at 00:01

Oil is performing quite well in ONS up to now. I'm just about to make a version that also avoids BarOffest. But I must check in live trading if this solution is really reliable. Trading several versions parallel is IMO not so crazy as it sounds, you therewith do some kind of 'profit averaging'.

But there is another thought: since I take care I see that Zorro gets prices and says "Weekend ends at XXX 23:00" Sunday night one hour before Monday. Is this already a 'regular' trading hour? Does it make sense to close 'weekend gap trades' already Sunday 23:00 instead of Monday 00:00? But is this hour from Sunday 23:00 to Monday 00:00 covered (and accessible) anywhere using BarPeriod = 1440? I think it isn't because even if I set Weekend = 0 I don't see Sunday Bars. There is only one Bar Saturday 00:00 and the next one is on Monday 00:00.

Re: One Night Stand System [Re: Sphin] #456902
12/15/15 10:49
12/15/15 10:49
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
23:00 is an arbitrary value. You can end the weekend already at 22:00, or later after midnight - it depends on what is best for your system.

Re: One Night Stand System [Re: jcl] #456996
12/18/15 10:12
12/18/15 10:12
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Grmpf ... apperently I need some C-tutoring again. To determine the right day I'm using

Code:
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.

Re: One Night Stand System [Re: Sphin] #457039
12/21/15 07:39
12/21/15 07:39
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Well I just found out something very interesting and relevant to this strategy.

I noticed that today's USOil price based on the WTI Futures at Nymex was trading significantly higher than the Nymex price. So it is because of the rollover of contracts from December to January. That is fine but the position I have is taking a massive loss because FXCM's demo accounts allow for trading after the expiration date (due to an oversight at FXCM it seems). I have posted a transcript of a chat with an FXCM representative.

With FXCM
FXCM - Craig: Welcome to FXCM's Live Chat Support. Please give me a moment to review your first question.
FXCM - Craig: In order to assist you I will need to first verify your account
FXCM - Craig: Thanks, please give me a moment to look into this
FXCM - Craig: Our USoil product expired
FXCM - Craig: on Friday
FXCM - Craig: the current contract is the Febuaray one
FXCM - Craig: the NYMEX price you are looking at
Me I thought that maybe the case
FXCM - Craig: is still from January
Me: Thankfully I have only traded that in a demo account
FXCM - Craig: https://www.forextrading.com.au/markets/cfds/oil/
FXCM - Craig: If you look at the above link
FXCM - Craig: you can see our expiration dates
FXCM - Craig: today is the first day of the Feb contract
Me: OK I guess the next question would relate to this
Me: Oil has a monthly expiration (please see the tables below). Clients that hold an open position on the 'FXCM Expiration' will be closed at our bid/offer at: USOil: 22:00 p.m. GMT UKOil: 22:15 p.m. GMT NGAS: 22:00 p.m. GMT Which means the client will realise any floating P/L at the time it is closed.
Me: Shouldn't the positions have been closed according to that guideline?
FXCM - Craig: They were closed
FXCM - Craig: on Friday
FXCM - Craig: at the end of trading
FXCM - Craig: anyone holding a position
FXCM - Craig: would have entered again this morning
FXCM - Craig: Are you saying your demo position was not closed?
Me: yes
FXCM - Craig: please allow me a moment
FXCM - Craig: I see you opened the position at 10:15 on Friday
FXCM - Craig: after the cut off time
Me Its a script which trades the positions and will trade up until close of business UTC time
FXCM - Craig: Had this been a live account
FXCM - Craig: the trades would not have gone through
Me oh
FXCM - Craig: but it appears that the demo allowed trading after the cut off time
FXCM - Craig: there was no live pricing at that time
FXCM - Craig: I will bring up the issue with our demo tech team
Me: Is there a way to get the trades cancelled even though it is a demo account?
FXCM - Craig: unfortunately no, demo accounts can not be altered
Me: Damn. I am using it as a kind of proof of concept for some fellow traders.
Me: Can I safely say that these trades would have not occurred it was a live account?
FXCM - Craig: definately
FXCM - Craig: the first trades on the current contract
FXCM - Craig: would only have opened up this morning
FXCM - Craig: The best I can do
FXCM - Craig: is write you an email confirming a tech error on the demo
FXCM - Craig: or open up a new demo account
Me: OK could you send through an email?
FXCM - Craig: I will have it out to you in a few minutes
ME: Thank you
FXCM - Craig: No problem, we apologize for the inconvenience
Me: OK

Page 11 of 20 1 2 9 10 11 12 13 19 20

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1