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 (SBGuy), 652 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 19 of 20 1 2 17 18 19 20
Re: One Night Stand System [Re: RTG] #460832
07/16/16 12:50
07/16/16 12:50
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Quote:
Have you tried adding the SMA trend condition to the entry?

I think I missed something, what trend condition do you mean?

Re: One Night Stand System [Re: Sphin] #460834
07/16/16 15:27
07/16/16 15:27
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
The one from this link

http://systemtradersuccess.com/first-strike-trading-system/

Basically if price is above or below the 200 day moving average.

Re: One Night Stand System [Re: RTG] #460837
07/16/16 17:33
07/16/16 17:33
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Okay, let's determine the conditions:

- Buy on Mondays EST 01:00 if price > SMA220
- Sell on Mondays EST 01:00 if price < SMA220

with Entry = 50 and Stop = 60 in PIP. Close trades on Friday 4:00 pm EST. This way?
If these conditions are right where (concerning which assets) did you find improvements?
If trades are not entered on Mondays what should happen to the pending ones? Should they be cancled (EntrTime = 1, default) or should they reside pending until ... Friday?

Re: One Night Stand System [Re: Sphin] #460847
07/17/16 00:44
07/17/16 00:44
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
vars Price = series(price());
vars SMA220 = series(SMA(Price, 220));
if(dow() == 1) {
Entry = 50*PIP;
// EntryTime = 5;

if(Price < SMA220)
enterShort(WatchTrades);
if(Price > SMA220)
enterLong(WatchTrades);

Re: One Night Stand System [Re: RTG] #460848
07/17/16 00:48
07/17/16 00:48
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Correction - that should be using "crossOver" and "crossUnder" functions.

Re: One Night Stand System [Re: RTG] #460853
07/17/16 10:30
07/17/16 10:30
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Did you try this already? Using cross* means that the price must really cross the SMA within the bar or in other words, the price must be higher/lower than the SMA before the bar and lower/higher afterwards.
Trading this limitation e.g. with all 28 available currencies from 2009 to 2015 reduces the number of trades from ~3.000 to ~100 (or between 0 and 10 per asset). I can hardly believe that this could be a representative approach.

Re: One Night Stand System [Re: Sphin] #460854
07/17/16 11:14
07/17/16 11:14
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Yeah I don't know what I was thinking there. It should just be that price[0] is greater/lower than the SMA.

Ok so without the crossover and just the SMA220 I get the following. I thought it was a good test until I realised that it didn't take an long trades using this code.

BackTest First Strike portfolio

Simulated account AssetsFix.dta
Bar period 24 hours (avg 2180 min)
Test period 03.01.2006-16.07.2016 (2526 bars)
Lookback period 220 bars (45 weeks)
Monte Carlo cycles 200
Assumed slippage 10.0 sec
Capital invested 1000$

Gross win/loss 19984$ / -16179$ (+21500p)
Average profit 361$/year, 30$/month, 1.39$/day
Max drawdown -703$ 18% (MAE -768$ 20%)
Total down time 92% (TAE 75%)
Max down time 138 weeks from Jan 2006
Max open margin 471$
Max open risk 161$
Trade volume 4435744$ (421148$/year)
Transaction costs -213$ spr, -19$ slp, -272$ rol, -100$ com
Capital required 846$

Number of trades 2277 (217/year, 5/week, 1/day)
Percent winning 26%
Max win/loss 390$ / -40$
Avg trade profit 1.67$ 9.4p (+188.5p / -54.5p)
Avg trade slippage -0.01$ -0.0p (+0.7p / -0.3p)
Avg trade bars 1 (+3 / -1)
Max trade bars 16 (23 days)
Time in market 156%
Max open trades 10
Max loss streak 25 (uncorrelated 27)

Annual growth rate 16%
Profit factor 1.24 (PRR 1.16)
Sharpe ratio 0.66
Kelly criterion 1.20
R2 coefficient 0.388
Ulcer index 8.3%
Prediction error 32%

Confidence level AR DDMax Capital

10% 48% 536$ 757$
20% 46% 585$ 783$
30% 45% 638$ 812$
40% 43% 683$ 835$
50% 42% 747$ 869$
60% 40% 823$ 910$
70% 39% 865$ 933$
80% 37% 932$ 968$
90% 34% 1086$ 1051$
95% 31% 1281$ 1155$
100% 21% 2288$ 1692$

Portfolio analysis OptF ProF Win/Loss Wgt%

AUD/JPY avg .1000 1.27 55/147 13.8
AUD/USD avg .1000 1.34 59/123 13.7
EUR/AUD avg .1000 1.23 57/181 9.5
EUR/CHF avg .1000 1.24 35/70 3.6
EUR/GBP avg .1000 1.21 30/46 3.6
EUR/JPY avg .1000 1.74 59/189 31.5
EUR/USD avg .1000 1.22 49/152 10.1
GBP/AUD avg .1000 0.97 53/232 -1.3
GBP/USD avg .1000 1.04 50/202 1.7
NZD/USD avg .1000 1.16 46/106 6.5
USD/CHF avg .1000 0.94 51/113 -1.0
USD/JPY avg .1000 1.30 55/117 8.3

AUD/JPY .1000 1.27 55/147 13.8
AUD/JPY:L .1000 ---- 0/0 0.0
AUD/JPY:S .1000 1.27 55/147 13.8
AUD/USD .1000 1.34 59/123 13.7
AUD/USD:L .1000 ---- 0/0 0.0
AUD/USD:S .1000 1.34 59/123 13.7
EUR/AUD .1000 1.23 57/181 9.5
EUR/AUD:L .1000 ---- 0/0 0.0
EUR/AUD:S .1000 1.23 57/181 9.5
EUR/CHF .1000 1.24 35/70 3.6
EUR/CHF:L .1000 ---- 0/0 0.0
EUR/CHF:S .1000 1.24 35/70 3.6
EUR/GBP .1000 1.21 30/46 3.6
EUR/GBP:L .1000 ---- 0/0 0.0
EUR/GBP:S .1000 1.21 30/46 3.6
EUR/JPY .1000 1.74 59/189 31.5
EUR/JPY:L .1000 ---- 0/0 0.0
EUR/JPY:S .1000 1.74 59/189 31.5
EUR/USD .1000 1.22 49/152 10.1
EUR/USD:L .1000 ---- 0/0 0.0
EUR/USD:S .1000 1.22 49/152 10.1
GBP/AUD .1000 0.97 53/232 -1.3
GBP/AUD:L .1000 ---- 0/0 0.0
GBP/AUD:S .1000 0.97 53/232 -1.3
GBP/USD .1000 1.04 50/202 1.7
GBP/USD:L .1000 ---- 0/0 0.0
GBP/USD:S .1000 1.04 50/202 1.7
NZD/USD .1000 1.16 46/106 6.5
NZD/USD:L .1000 ---- 0/0 0.0
NZD/USD:S .1000 1.16 46/106 6.5
USD/CHF .1000 0.94 51/113 -1.0
USD/CHF:L .1000 ---- 0/0 0.0
USD/CHF:S .1000 0.94 51/113 -1.0
USD/JPY .1000 1.30 55/117 8.3
USD/JPY:L .1000 ---- 0/0 0.0
USD/JPY:S .1000 1.30 55/117 8.3

Re: One Night Stand System [Re: RTG] #460873
07/18/16 17:01
07/18/16 17:01
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
What did you code? If you do it exactly as you described:
Code:
if(dow() == 1) {

		Entry = 50*PIP;
		Stop = 60* PIP;
		//	EntryTime = 5;
				
		if (Price[0] < SMA220[0])
			enterShort(WatchTrades);
		
		if (Price[0] > SMA220[0])
			enterLong(WatchTrades);
	}


you surely get also long trades. The OCO conditions in WatchTrades are unnecessary in this variant, but this only BTW.

There are in deed some assets with profit but personally I don't like strategies that have such a low relation of win/loss trades and produce profit in the past only because their win trades produced more win than their loss trades lost. I think this can easily turn in future.

Re: One Night Stand System [Re: Sphin] #460955
07/21/16 14:20
07/21/16 14:20
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
What about trying some of the built in Ehlers filters for finding a better moving average?

Re: One Night Stand System [Re: RTG] #460985
07/22/16 03:50
07/22/16 03:50
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
ONS setups for this week.

(EUR/USD::S) Short 103@1.0979 Entry stop
(GBP/USD::S) Short 108@1.2851 Entry stop
(NZD/JPY::L) Long 139@76.86 Entry stop
(USOil::S) Short 1@44.44 Entry stop

Page 19 of 20 1 2 17 18 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