quantshare vs amibroker

Discussion in 'Trading Software' started by Gueco, Jul 3, 2013.

  1. ST.M

    ST.M

    Database settings is database independent. One database can have different database settings then another one or both can have same database settings. It depends on what you have set.

    So why would Recent databases have nothing to do with data plugins? I don't get what you mean there. Med alert for you and me?

    In File - Database settings you set the settings of a current database or a newly created data base. Then you save that database. And if you close AB then settings get auto-saved anyway (default setting). Same applies if you create a new database from current one. So if you set the same or different data-source in a new database (created from File - New - Database) then I don't understand why you would mean that a previous one would not have a set streaming source set anymore all of the sudden just because it is a previous one/closed one "now". If you open a previous database from File - Recent Databases then it will have the same database settings that were set before when that recent database was active the last time. And if you wanna set different database settings in whatever active database then just modify them since they are modifiable anytime (if a database is active). No need to create a new database just because you wanna set different database settings.
     
    #71     Jun 8, 2014
  2. How do we call Equity Monaco from Amibroker?
     
    #72     Nov 7, 2014
  3. M.ST.

    M.ST.

    In AmiBroker help search for "User interface customization" and "Customize tools window " to add tools and custom buttons+pic etc.

    To export PL for Equity Monaco add this sample code part to your existing one.

    Code:
    // set output folder of file
    folder = "C:\\Program Files\\AmiBroker\\EquityMonaco\\";
    filename = StrFormat( "AB_ProfitLossData_%07.0f_%06.0f.txt", Now( 3 ), Now( 4 ) );
    destination = folder + filename;
    
    // custom backtest procedure
    SetCustomBacktestProc( "" );
    if ( Status( "action" ) == actionPortfolio )
    {     
        bo = GetBacktesterObject();
        bo.Backtest();
        
        //Creates export folder
        fmkdir( Folder );  
        
        fh = fopen( destination, "w" );  
        for ( trade = bo.GetFirstTrade(); trade; trade = bo.GetNextTrade() )
        { // iterate through closed trades
            getprofit = trade.GetProfit();
            StrFmt = StrFormat( "%g\n", getprofit );
            fputs( StrFmt, fh );
        } 
        fclose( fh );
    }
     
    #73     Nov 10, 2014
    KeLo and NachiketJoshi like this.
  4. Thanks a lot. That did it. Is there a way to get the out of sample summary report as a one file?
     
    #74     Nov 10, 2014
  5. M.ST.

    M.ST.

    In the report explorer after each walk forward test there's a report of type PS showing up. That one is the out of sample summary report. Now what do you want to get as one file? The trade list? There are example AFLs in the official AB user forum which programmatically export the OOS trade list to csv. Alternatively in most recent beta cycle AB have included an option in report explorer that lets you export each report category to table for example if you want to directly copy and paste into Excel for example. See changes for version 5.86 http://www.amibroker.com/devlog/2014/10/31/amibroker-5-89-0-beta-released/ Besides each report category is available as html file by default.
     
    #75     Nov 10, 2014
  6. M.ST.

    M.ST.

    This one is better

    Code:
    // export PL to file
    // set output folder of file
    folder = "C:\\Program Files\\AmiBroker\\EquityMonaco\\";
    filename = StrFormat( "AB_ProfitLossData_20%06.0f_%06.0f.txt", Now( 3 ) - 1000000, Now( 4 ) );
    destination = folder + filename;
    
    // custom backtest procedure
    SetCustomBacktestProc( "" );
    if ( Status( "action" ) == actionPortfolio )
    {
        //Creates export folder
        if ( Status( "stocknum" ) == 0 )
            fmkdir( Folder );
    
        bo = GetBacktesterObject(); 
        bo.Backtest();
    
        String = "";  
        for ( trade = bo.GetFirstTrade(); trade; trade = bo.GetNextTrade() )
        {   // iterate through closed trades
            getprofit = trade.GetProfit();
            String += StrFormat( "%g\n", getprofit );
        }
    
        fh = fopen( destination, "w" );  
        if ( fh )
        {
            fputs( String, fh );
            fclose( fh );
        }
        else Error( "ERROR: file can not be opened" );
    }
     
    Last edited: Nov 10, 2014
    #76     Nov 10, 2014
    NachiketJoshi likes this.
  7. No
    No no, I wasn't clear earlier. Not the OOS file of AmiBroker report. What I want to accomplish is to export the PnL file(The ones that we get after the custom backtest procedure provided by you) as a single file for all of the walk-forwards just like we get the trades list in the OOS report. So that I can use this PnL file in Equity Monaco. What I did up until now is go to the trades of OOS and export them to excel and then copy the PnL to a text file. Now I'm wondering if there's a way to combine PnL of all walk-forwards and export that file as a single text file for Equity Monaco.
     
    #77     Nov 10, 2014
  8. M.ST.

    M.ST.

    Yes, you can. As I have mentioned above there are example AFLs in the AB forum.
     
    #78     Nov 11, 2014
  9. Thanks a lot. Appreciate it.
     
    #79     Nov 11, 2014