Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, SBGuy, Petra), 801 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 14 of 20 1 2 12 13 14 15 16 19 20
Re: One Night Stand System [Re: Sphin] #458165
02/22/16 22:17
02/22/16 22:17
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Yes mine had the same one.

Re: One Night Stand System [Re: RTG] #458194
02/24/16 23:35
02/24/16 23:35
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
I ran the backtest to compare the live trading. The CHF/JPY trade was the same but there was an extra trade in the backtest on the EUR/JPY.

19.02.16 00:05] 30.300-32.000 +102330 +0 266/163
(CHF/JPY::S) Entry stop 113.89 hit at 00:05
[CHF/JPY::S6430] Short 40@113.89 at 00:05
(EUR/JPY::S) Entry stop 125.59 hit at 00:05
[EUR/JPY::S6431] Short 177@125.59 at 00:05

[2864: Mon 22.02.16 00:05] 29.080-32.040 +102330 +839 268/163

Monday 22.02.16 Profit +839$ ----
[CHF/JPY::S6430] Cover 40@113.61: +74.92 at 00:05
[EUR/JPY::S6431] Cover 177@125.20: +764$ at 00:05

Re: One Night Stand System [Re: RTG] #458204
02/25/16 22:11
02/25/16 22:11
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I have the same EUR/JPY trade only in backtest, in live trading an EUR/JPY trade was no even set up. Very strange.

Re: One Night Stand System [Re: Sphin] #458225
02/28/16 01:03
02/28/16 01:03
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
That was odd and it was a decent winning trade we missed out on.

This week's trade.

(GBP/USD::S) Entry stop 1.3878 hit at 15:53
[GBP/USD::S9824] Short 91@1.3877
Weekend at 26.02. 20:00.........................................

Last edited by RTG; 02/28/16 01:04.
Re: One Night Stand System [Re: RTG] #458239
02/29/16 00:59
02/29/16 00:59
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I can't retrace from my logs why Zorro didn't set up the EUR/JPY trade, I did not log additional information so far but I will consider this in future.

The trade of this weekend:

GBP/USD::S5298] Cover 42@1.3861: +54.59 at 00:00

Re: One Night Stand System [Re: Sphin] #458240
02/29/16 02:13
02/29/16 02:13
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Similar result. The 5 minute bar offset in this case led to a different fill price to yours.


Monday 29.02.16 Profit +163$ ----
[GBP/USD::S9824] Cover 91@1.3863: +160$ at 00:04

Re: One Night Stand System [Re: RTG] #458253
02/29/16 23:40
02/29/16 23:40
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
You can avoid the BarOffset modifying the trading function:
Code:
function tradeOneNightStand() {
	
  vars Price = series(price());

  vars SMAShort = series(SMA(Price, optimize(10,5,20)));
  vars SMALong = series(SMA(Price, optimize(40,30,80,5)));

  Stop = optimize(100,100,500,10) * PIP;
  
  var BuyStop = HH(10) + 1*PIP;
  var SellStop = LL(10) - 1*PIP;

 if(between(tow(),42355,50005)) {

	if (SMAShort[0] > SMALong[0] && rising(SMAShort) && rising(SMALong) && NumOpenLong == 0 && NumPendingLong == 0) {
			Margin = 0.1 * OptimalFLong * Capital * sqrt(1 + ProfitClosed/Capital);
			enterLong(0,BuyStop);
  	}
  	else if (SMAShort[0] < SMALong[0] && falling(SMAShort) && falling(SMALong) && NumOpenShort == 0 && NumPendingShort == 0) {
			Margin = 0.1 * OptimalFShort * Capital * sqrt(1 + ProfitClosed/Capital);
			enterShort(0,SellStop);			
  	}	
 }

 if (dow() != 4 && dow() != 5 && dow() != 6) {
	exitLong();
	exitShort();
 }
}



Including dow() != 4 is important, otherwise Zorro closes the trades immediately after setting them up. This code works also in live trading! laugh

Re: One Night Stand System [Re: Sphin] #458326
03/04/16 14:00
03/04/16 14:00
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Today's setups (and skipped trade).

[Fri 04.03.16 00:05]
(AUD/USD::L) Long 0@0.7375 Entry stop
(CHF/JPY::S) Short 26@112.29 Entry stop
(EUR/JPY::S) Short 123@122.08 Entry stop
(AUD/USD::L) Entry stop 0.7375 hit at 03:30
(AUD/USD::L) Skipped: Lots/Margin = 0

Re: One Night Stand System [Re: RTG] #458333
03/05/16 00:32
03/05/16 00:32
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Yes, but the entries were too far away for entering trades.

Re: One Night Stand System [Re: Sphin] #458335
03/05/16 02:03
03/05/16 02:03
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
AUD/USD would be in profit (+58 PIPs).

Come to think of it, I read in another thread that the AUD/USD history file on the download page was corrupted. OptimalFLong is negative in my case anyway hence the 0 lots entry.


Last edited by RTG; 03/05/16 02:12.
Page 14 of 20 1 2 12 13 14 15 16 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