Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/20/24 06:09
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:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (henrybane, flink, Edgar_Herrera), 726 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
multi advise #480921
07/24/20 12:30
07/24/20 12:30
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Hi,

I have a sameone like this:

Code
    int ii;
    while (algo(loop("algo1","algo2","algo3","algo4","total"))){
        
        
        if (Algo == "algo1"){
            ii=0;
            vLong12[ii] = adviseLong(DTREE,0,
                CO1, 
                CU1,
                CN1
            ); 
            vShort12[ii] = adviseShort();

        }
        else if (Algo == "algo2"){
            ii=1;
            vLong12[ii] = adviseLong(DTREE,0,
                dAtr1, 
                dAtr2,
                dAtr3,
                dAtr4 
            ); 
            vShort12[ii] = adviseShort();
        }
        else if (Algo == "algo3"){
            ii=2;
            vLong12[ii] = adviseLong(DTREE,0,
                dALT1, 
                dALT2,
                dALT3,
                dALT4 
            ); 
            vShort12[ii] = adviseShort();
        }
        else if (Algo == "algo4"){
            ii=3;
            vLong12[ii] = adviseLong(DTREE,0,
                dLTR1, 
                dLTR2,
                dLTR3,
                dLTR4 
            ); 
            vShort12[ii] = adviseShort();

        }
        
        if (Algo != "total"){
            // ------------------------------ only for train each Algo/advise
            if (Train){
                if(vLong12[ii] > 1 )	
                    enterLong();
                if( vShort12[ii] > 1 )
                    enterShort();
            }
        }else{
            // ------------------------------------- Total Algo
            if(vLong12[0] > vOptL[1] )	
            if(vLong12[1] > vOptL[2] )	
            if(vLong12[2] > vOptL[3] )	
            if(vLong12[3] > vOptL[4] )	
            {
                enterLong();
            }

            if( vShort12[0] > vOptS[1] )
            if( vShort12[1] > vOptS[2] )
            if( vShort12[2] > vOptS[3] )
            if( vShort12[3] > vOptS[4] )
            {
                enterShort();  
         
            }
            
        }
    }


my question is: is a possible optimize value in the variable vOptL and vOptS in the algo "TOTAL"

[Linked Image]

Attached Files
Last edited by Grat; 07/24/20 12:40.
Re: multi advise [Re: Grat] #480947
07/26/20 15:15
07/26/20 15:15
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
I get this result, but still is not work correct optimize.

Quote


Test alfaTest EUR/USD

Simulated account Assets4
Bar period 15 min (avg 21 min)
Test period 2018-04-01..2020-07-13 (55104 bars)
Lookback period 200 bars (3 days)
Montecarlo cycles 200
Simulation mode Realistic (slippage 5.0 sec)
Avg bar 6.4 pips range
Spread 0.6 pips (roll -1.03/0.34)
Commission 0.60
Contracts per lot 1000.0

Gross win/loss 109€ / -64.86€ (+445p)
Average profit 19.52€/year, 1.63€/month, 0.0751€/day
Max drawdown -16.12€ 36.2% (MAE -17.11€ 38.4%)
Total down time 81% (TAE 3%)
Max down time 10 weeks from Nov 2018
Max open margin 13.00€
Max open risk 7.71€
Trade volume 102228€ (44822€/year)
Transaction costs -5.40€ spr, 0.48€ slp, 0.68€ rol, -5.40€ com
Capital required 31.49€

Number of trades 90 (40/year)
Percent winning 61.1%
Max win/loss 5.83€ / -6.33€
Avg trade profit 0.49€ 4.9p (+19.9p / -18.5p)
Avg trade slippage 0.0052973€ 0.1p (+1.2p / -1.8p)
Avg trade bars 24 (+24 / -25)
Max trade bars 33 (11 hours)
Time in market 4%
Max open trades 1
Max loss streak 7 (uncorrelated 5)

Annual return 62%
Profit factor 1.69 (PRR 1.25)
Sharpe ratio 1.31 (Sortino 1.41)
Kelly criterion 2.78
Annualized StdDev 47.21%
R2 coefficient 0.227
Ulcer index 13.8%
Scholz tax 12 EUR

Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Total
2018 17 -5 9 8 26 -1 14 18 -30 +57
2019 -13 8 -2 0 -0 5 5 0 -1 3 1 0 +6
2020 -2 22 -22 32 36 0 0 +68

Confidence level AR DDMax Capital

10% 80% 10 24.46€
20% 76% 11 25.75€
30% 72% 12 27.17€
40% 68% 14 28.57€
50% 65% 15 30.03€
60% 61% 17 32.16€
70% 58% 18 33.95€
80% 53% 21 36.90€
90% 48% 24 41.02€
95% 42% 30 46.90€
100% 29% 48 67.62€

Portfolio analysis OptF ProF Win/Loss Wgt%

algo1 avg .000 ---- 0/0 0.0
algo2 avg .000 ---- 0/0 0.0
algo3 avg .000 ---- 0/0 0.0
algo4 avg .000 ---- 0/0 0.0
total avg .499 1.69 55/35 100.0

EUR/USD:total .999 1.69 55/35 100.0
EUR/USD:total:L .000 ---- 0/0 0.0
EUR/USD:total:S .999 1.69 55/35 100.0



Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1