Gamestudio Links
Zorro Links
Newest Posts
IB - Stop order for options
by Petra. 01/19/21 10:52
Writing strategy DLL in C#
by AndrewAMD. 01/18/21 13:56
Training strategy - errors
by Petra. 01/18/21 12:14
question about View* Entity
by ratz. 01/16/21 23:18
Has anyone used LSTM?
by TraderTom. 01/16/21 22:41
NOFILTER for Level Blocks?
by Dooley. 01/15/21 20:30
AUM Magazine
Latest Screens
Scheherazade's Journey
Paradox Vector
The Space Between
Pogostuck: Rage With Your Friends
Who's Online Now
4 registered members (AndrewAMD, jbhunter, SaschaGanath, Dooley), 469 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
minimeken, TraderTom, babyrazia, copernico, jari
18574 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: 335
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 335
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,160
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,160
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: 335
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 335
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,160
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,160
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