Gamestudio Links
Zorro Links
Newest Posts
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
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
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
2 registered members (AndrewAMD, howardR), 452 guests, and 5 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 6 of 20 1 2 4 5 6 7 8 19 20
Re: One Night Stand System [Re: RTG] #456024
11/06/15 07:00
11/06/15 07:00
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Mine does not. Do you also use 1.36.5 or any other version? Yours tries to open a trade with 0 lots (EUR/JPY:S) like I saw in my backtest log. Do you know what that mean? OptimalF for EUR/JPY:S is 0.999, this can't be the reason.

Re: One Night Stand System [Re: Sphin] #456027
11/06/15 13:11
11/06/15 13:11
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
No Zorro version can open trades with 0 lots. When you attempt to enter a trade with 0 lots, as your script apparently did, you will see a warning in the message window and the trade is not opened.

Setting a margin of 0 lots is of course a reason when a script never opens trades.

Re: One Night Stand System [Re: jcl] #456037
11/06/15 16:46
11/06/15 16:46
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I thought that Zorro won't open a trade with 0 lots, therefore the formula for the margin needs to be surely reworked. I first used 0.5 as a factor like in the manual but that led to margin calls. With a very restrictive 0.1 it looked reasonable in the backtest, but mixed with a low OptimalF there might be not enough left for one lot, esp. when reducing Capital to 1.000.
But beside of this "pre-alpha trial of optimization" there is one fact I really wonder: why there are trades (with more than 0 lots of course) set up only in backtest and not in live trading? I will try to find it out ...

Re: One Night Stand System [Re: Sphin] #456044
11/06/15 19:29
11/06/15 19:29
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
BTW: One reason for Zorro's try to open trades with 0 lots is simply that the OptimalF for this asset/algo is .000. I guess this is quite normal and the corresponding entry in the log is "Skipped: Lots/Margin = 0" that also appears e.g. in the log of Workshop6_2. There one does not find a "Long 0@xxx Entry stop" because trades are always entered at market.

Re: One Night Stand System [Re: Sphin] #456048
11/07/15 01:13
11/07/15 01:13
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
I am running version 1.32.

Two trades entered on Friday and as you say, the 0 lot trade skipped. Sreen shot attached.

Attached Files ONS Sphin 6-11-2015.jpg
Last edited by RTG; 11/07/15 01:17.
Re: One Night Stand System [Re: RTG] #456049
11/07/15 02:01
11/07/15 02:01
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Mine does not do anything concerning trades. Although you should have the same values (but you never know): Could you please take a look into your Data/ONS.fac (or whatever your script is named) and post the OptimalF of EUR/JPY:S? In my .fac it is .999 and this would not explain why lots are set to 0.

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

Joined: Feb 2014
Posts: 181
My .fac file

EUR/USD .656 2.85 32/17 38.2
EUR/USD:L .999 3.68 9/6 12.7
EUR/USD:S .561 2.60 23/11 25.5
GBP/USD .424 1.76 29/18 21.3
GBP/USD:L .006 1.01 12/10 0.1
GBP/USD:S .585 2.71 17/8 21.2
USD/CAD .000 0.63 17/21 -8.0
USD/CAD:L .000 0.72 14/14 -4.5
USD/CAD:S .000 0.41 3/7 -3.4
USD/CHF .999 2.05 24/23 21.5
USD/CHF:L .999 1.64 15/11 9.4
USD/CHF:S .999 3.07 9/12 12.1
USD/JPY .854 2.82 27/19 26.9
USD/JPY:L .999 4.41 23/11 30.7
USD/JPY:S .000 0.33 4/8 -3.8

EUR/JPY isn't there. I looked at the parameter files too.

USD/CHF 10.8 39.9 180=> 1.242
USD/JPY 10.8 70.3 150=> 2.983
GBP/USD 6.07 39.6 250=> 1.537
EUR/USD 6.08 70.4 260=> 2.323
EUR/JPY 10 40 100=> 0.000
USD/CAD 17.3 70.5 220=> 0.859

Last edited by RTG; 11/07/15 11:20.
Re: One Night Stand System [Re: RTG] #456055
11/07/15 15:29
11/07/15 15:29
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
If EUR/JPY is not in your .fac I guess Zorro can't do anything else but to skip trades with this asset when using OptimalF as a factor to create margins. If the asset/algo is not found its OptimalF will be regarded as 0 I think.
Next question is why EUR/JPY is missing, don't you have the historical prices (EURJPY_X.bar files in your history folder)?

Here is my .fac, interesting to see slightly differences in the OptimalFs, apparently we use different historical prices:
Code:
EUR/JPY             .999  6.12   32/12    43.0
EUR/JPY:L           .999  8.29   20/5     25.6
EUR/JPY:S           .999  4.55   12/7     17.4
EUR/USD             .651  2.82   32/17    22.4
EUR/USD:L           .999  3.64    9/6      7.4
EUR/USD:S           .555  2.58   23/11    14.9
GBP/USD             .414  1.73   28/19    12.2
GBP/USD:L           .000  0.99   11/11    -0.1
GBP/USD:S           .579  2.67   17/8     12.4
USD/CAD             .000  0.55   17/22    -5.9
USD/CAD:L           .000  0.59   14/15    -3.9
USD/CAD:S           .000  0.42    3/7     -2.0
USD/CHF             .999  1.99   26/21    11.6
USD/CHF:L           .999  1.80   18/9      6.8
USD/CHF:S           .999  2.49    8/12     4.8
USD/JPY             .875  2.87   28/20    16.6
USD/JPY:L           .999  4.44   24/12    18.9
USD/JPY:S           .000  0.33    4/8     -2.3



Ah ... I just saw the content of your .par file:

Code:
EUR/JPY 10 40 100=> 0.000


EUR/JPY could not be optimized too, seems that you really miss its history.

Last edited by Sphin; 11/07/15 18:44.
Re: One Night Stand System [Re: Sphin] #456057
11/07/15 21:13
11/07/15 21:13
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Yeah you are right. The version on the VPS is not running enough EUR/JPY data.

I backtested on my local virtual box version and got similar results to yourself.

Walk-Forward Test ONS Sphin 14-10-2015 portfolio

Simulated account AssetsFix.dta
Bar period 24 hours (avg 2026 min)
Simulation period 22.06.2005-31.10.2015 (2688 bars)
Test period 19.07.2011-31.10.2015 (1113 bars)
Lookback period 120 bars (24 weeks)
WFO test cycles 4 x 278 bars (57 weeks)
Training cycles 5 x 1575 bars (326 weeks)
Monte Carlo cycles 200
Assumed slippage 10.0 sec
Capital invested 50000$

Gross win/loss 180413$ / -57901$ (+5054p)
Average profit 28593$/year, 2383$/month, 110$/day
Max drawdown -9368$ 8% (MAE -9368$ 8%)
Total down time 61% (TAE 6%)
Max down time 21 weeks from Mar 2014
Max open margin 20616$
Max open risk 31837$
Trade volume 50690254$ (11830425$/year)
Transaction costs -3343$ spr, 0.00$ slp, 0.00$ rol, -2159$ com
Capital required 28455$

Number of trades 236 (56/year, 2/week, 1/day)
Percent winning 61%
Max win/loss 11199$ / -3467$
Avg trade profit 519$ 21.4p (+51.7p / -26.0p)
Avg trade slippage 0.00$ 0.0p (+0.0p / -0.0p)
Avg trade bars 1 (+1 / -1)
Max trade bars 1 (24 hours)
Time in market 21%
Max open trades 5
Max loss streak 8 (uncorrelated 6)

Annual growth rate 34%
Profit factor 3.12 (PRR 2.59)
Sharpe ratio 1.86
Kelly criterion 6.05
R2 coefficient 0.947
Ulcer index 2.4%
Prediction error 47%

Confidence level AR DDMax Capital

10% 115% 5163$ 24936$
20% 107% 7366$ 26780$
30% 102% 8706$ 27901$
40% 102% 8706$ 27901$
50% 100% 9368$ 28455$
60% 100% 9517$ 28579$
70% 98% 10130$ 29092$
80% 96% 10899$ 29736$
90% 93% 12278$ 30890$
95% 88% 14373$ 32643$
100% 70% 24392$ 41026$

Portfolio analysis OptF ProF Win/Loss Wgt% Cycles

EUR/JPY avg .879 4.39 27/11 36.1 //X/
EUR/USD avg .366 2.49 33/19 17.3 X/XX
GBP/USD avg .325 2.56 29/20 9.3 \/X/
USD/CAD avg .000 ---- 0/0 0.0 ....
USD/CHF avg .999 1.47 22/23 2.2 ///X
USD/JPY avg .457 4.39 23/12 29.7 //\/
USOil avg .174 1.96 10/7 5.3 /\//

EUR/JPY .999 4.39 27/11 36.1 //X/
EUR/JPY:L .999 6.48 18/6 28.7 ////
EUR/JPY:S .760 2.36 9/5 7.4 /.\/
EUR/USD .411 2.49 33/19 17.3 X/XX
EUR/USD:L .149 1.28 9/8 0.5 \/\\
EUR/USD:S .584 2.70 24/11 16.8 ////
GBP/USD .456 2.56 29/20 9.3 \/X/
GBP/USD:L .027 1.02 12/10 0.0 \/\/
GBP/USD:S .624 2.64 17/10 9.3 \///
USD/CHF .999 1.47 22/23 2.2 ///X
USD/CHF:L .999 1.43 15/11 1.4 ////
USD/CHF:S .999 1.57 7/12 0.8 ///\
USD/JPY .570 4.39 23/12 29.7 //\/
USD/JPY:L .915 4.39 23/12 29.7 //\/
USD/JPY:S .000 ---- 0/0 0.0 ....
USOil .300 1.96 10/7 5.3 /\//
USOil:L .000 ---- 0/0 0.0 ....
USOil:S .348 1.96 10/7 5.3 /\//

Re: One Night Stand System [Re: RTG] #456090
11/09/15 02:07
11/09/15 02:07
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Both the original and the new version of the script took trades this week.

The two versions were running side by side on Zorro 1.32.

I had Zorro 1.34 running the new version of the script and this did not take any trades or 'setup' any trades.

I wlll run the new version of the script on Zorro 1.32 and 1.34 on the same demo account.

Page 6 of 20 1 2 4 5 6 7 8 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