Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, wandaluciaia, 1 invisible), 798 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Are OptimalF calculated values right with Crypto ? #476943
04/26/19 11:31
04/26/19 11:31
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Was just wondering if this is an issue.

Please set the account to BTC.B8 type in accounts.csv

and then train and run the script attached (is using the Z10 asset list), is just a sample taken from the help file.


The training results (attached) is a .fac file where all OptimalF factors are either 0 or .999 for all 12 assets.

Is this normal ?
Thanks

Attached Files
ShowFACTOR.c (70 downloads)
ShowFACTOR.fac (62 downloads)
Re: Are OptimalF calculated values right with Crypto ? [Re: vinsom] #476945
04/26/19 12:46
04/26/19 12:46
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Yes, this is normal. By the way, your Optimal F calculations will not be very good because there are so few trades to analyze per asset/algo combination.

Re: Are OptimalF calculated values right with Crypto ? [Re: AndrewAMD] #476951
04/27/19 07:01
04/27/19 07:01
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi Andrew,
THis is just a sample to show the issue. as the result is the same.
Have other Crypto related algos with 20 assets, just don't want to show them to everyone, but receiving the same Factors results.
Either .000 or .999.
Doesn't same normal to me.
With different levels of drawdown per assets, it's very strange to get always .000 or .999.

Re: Are OptimalF calculated values right with Crypto ? [Re: AndrewAMD] #476954
04/27/19 16:26
04/27/19 16:26
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
This is worth repeating.

Originally Posted By: AndrewAMD
your Optimal F calculations will not be very good because there are so few trades to analyze per asset/algo combination.

Rewrite your script so that it's making more trades, and then see what that does to your Optimal F calculations.

Re: Are OptimalF calculated values right with Crypto ? [Re: AndrewAMD] #476956
04/27/19 20:41
04/27/19 20:41
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
It doesn't matter the script.
I have another script that does 2500 trades with crypto with 20 assets and is the same result

Re: Are OptimalF calculated values right with Crypto ? [Re: vinsom] #476957
04/27/19 21:07
04/27/19 21:07
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Just modified the script to do 12000 trades.
Please see below.
Result is the same
Either .000 or .999 in the .fac file


function run()
{
LookBack = 400;//500;
BarPeriod = 60;
set(LOGFILE);
set(FACTORS);

assetList("History\AssetsZ10.csv");

while(loop(Assets))
{
asset(Loop1);

vars Price = series(price(0));
vars Trend = series(LowPass(Price,500));

Stop = 4*ATR(100);

vars MMI_Raw = series(MMI(Price,300));
vars MMI_Smooth = series(LowPass(MMI_Raw,300));

//if(falling(MMI_Smooth))
{
if(rising(Trend))
enterLong();
else if(falling(Trend))
enterShort();
}

}
}

Assets HistoryAssetsZ10.csv
Read ShowFACTOR.fac
Error 010: Invalid GRS/BTC Stop: 0.0002604 Price: 0.000124200
Loss -2.10843085B MI -1.07107704B DD 2.51155990B Capital 13.50459003B
Trades 12011 Win 29.7% Avg -175.5p Bars 88
ROI -95% PF 0.27 SR -1.36 UI 0% R2 0.83

Re: Are OptimalF calculated values right with Crypto ? [Re: vinsom] #476965
04/29/19 06:35
04/29/19 06:35
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
AssetsZ10 is not intended for OptimalF calculations.

OptimalF needs not only a high number of trades, but also correct margin cost in the asset list for calculating the investment per trade. If margin cost is missing, it is calculated from the price, but AssetsZ10 does not contain prices either. If you enter them, you'll probably get precise OptimalF factors.

Re: Are OptimalF calculated values right with Crypto ? [Re: jcl] #476967
04/29/19 10:01
04/29/19 10:01
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi Jcl,
why the OptimalF is not using prices from the History in this case ?

Thanks
Vincenzo

Re: Are OptimalF calculated values right with Crypto ? [Re: vinsom] #476971
04/29/19 10:48
04/29/19 10:48
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
This is a justified question, but I cannot answer it. I only see in the code that it is so, but not why. But I'll inquire.

Re: Are OptimalF calculated values right with Crypto ? [Re: jcl] #476985
04/30/19 11:14
04/30/19 11:14
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Hi,
incresing the number of trades with oversampling improves (or could be used to) the optimalf calculation?

Thank You

Re: Are OptimalF calculated values right with Crypto ? [Re: MatPed] #476986
04/30/19 11:16
04/30/19 11:16
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes.

Re: Are OptimalF calculated values right with Crypto ? [Re: jcl] #476987
04/30/19 11:46
04/30/19 11:46
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Is it better to calculate Optimal F with a fixed Margin size or a fixed Lot size? Or is there an even better method?

Re: Are OptimalF calculated values right with Crypto ? [Re: AndrewAMD] #476988
04/30/19 12:06
04/30/19 12:06
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
If you do it in the script, use a fixed margin that is the same for all trades of all components.

Re: Are OptimalF calculated values right with Crypto ? [Re: jcl] #477003
05/01/19 23:59
05/01/19 23:59
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
thx

Page 1 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1