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 (howardR), 650 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
multiple advise #482205
01/11/21 09:08
01/11/21 09:08
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,

do you anybody know, how to:

During the train I get this error:

Error 049: Too many trades per bar (47176 at bar 14008)
Error 111: Crash in run: run() at bar 14008


I try this:
LifeTime = 2;
MaxLong = MaxShort = -1; // only 1 open trade


but no change - still is a error 049

my code...
Code

void runAdvise(int ii){
        
    vLong12[ii] = adviseLong(PATTERN+FAST+RETURNS,0,
        idxM15_1, 
        idxM15_2, 
        idxM15_3, 
        idxM60_1, 
        idxM60_2,
        Peak,
        Valley  
    ); 
    vShort12[ii] = adviseShort();
    
    if (lReady && Train){
        if (vLong12[ii]>90) enterLong();
        if (vShort12[ii]>90) enterShort();
    }
}

....

void tryOrder(){
  
    algo("T_12");
        ... prepare data idx1..5
        runAdvise(0);
    
    algo("T_42");
        ... prepare data
        runAdvise(1);

    algo("D_7");
        ... prepare data
        runAdvise(2);


    algo("D_14");
        ... prepare data
        runAdvise(3);

    if (Test){
        algo("total");
            testFinal();
    }
   
}

Re: multiple advise [Re: Grat] #482210
01/12/21 15:18
01/12/21 15:18
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Now try the suggestion listed in the manual:
Quote
Error 049: Too many trades
The script entered more than one trade per bar and asset, which is normally a sign of a script bug - therefore the error message. If you really need a huge number of trades, for instance for unlimited grid trading or for training several advise functions at the same time, set the TradesPerBar variable to the required number of trades per bar and asset.

Re: multiple advise [Re: Grat] #482211
01/12/21 15:31
01/12/21 15:31
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 read manual. This not work?

MaxLong = MaxShort = -1; // only 1 open trade

Re: multiple advise [Re: Grat] #482212
01/12/21 15:36
01/12/21 15:36
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Change TradesPerBar.

MaxLong and MaxShort are ignored in [Train] mode, as noted in the manual.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1