Export to TradeStation

    Deploy your GSB Pro systems on the TradeStation platform

    Video Tutorials

    Importing GSB Scripts into TradeStation
    Learn how to import the GSB function library (1 minute)

    Learn how to export the GSB scripts into Tradestation so you can utilise GSB Pro generated trading systems in the Tradestation platform.

    Exporting a System to TradeStation
    Set up your GSB-generated system in TradeStation (3 minutes)

    This video shows how to set up a GSB generated system in Tradestation. Import supplementary scripts, then from GSB copy and paste the system code into Tradestation.

    Step-by-Step Export Process

    Step 1: Import GSB Function Library

    Before you can use GSB-generated strategies, you must import the GSB function library into TradeStation:

    1. Open TradeStation EasyLanguage Editor
    2. Navigate to File → Import → EasyLanguage
    3. Select the GSB_Library.ELD file from your GSB Pro installation directory
    4. Click Import and wait for confirmation
    5. Verify the functions appear in your Function list
    Where to Find GSB_Library.ELD

    The GSB function library is located in your GSB Pro installation directory:

    C:\Program Files\GSB Pro\TradeStation\GSB_Library.ELD

    This library contains all the helper functions GSB systems use for indicators and calculations.

    Step 2: Export Your Strategy from GSB Pro

    1. In GSB Pro, select the validated system you want to export
    2. Click the "Export" button in the toolbar
    3. Choose "TradeStation (EasyLanguage)" as the target platform
    4. GSB Pro generates the complete strategy code
    5. Copy the generated code to your clipboard

    Step 3: Create a New Strategy in TradeStation

    1. Open TradeStation EasyLanguage Editor
    2. File → New → Strategy
    3. Give your strategy a descriptive name (e.g., "GSB_ES_DayTrade_001")
    4. Paste the GSB-generated code into the strategy editor
    5. Save the strategy

    Step 4: Verify and Format the Code

    After pasting the code:

    • Click "Verify" to check for syntax errors
    • Format the code (Edit → Format) for readability
    • Review the inputs and ensure they match your GSB Pro settings
    • Save the strategy again after verification

    Critical Configuration: Max Bars Back Setting

    Most Common Data Issue: Max Bars Back Default Too Low
    TradeStation's default setting of 50 bars is insufficient for most GSB systems. You must change this to 500.

    The Problem: TradeStation defaults to MaxBarsBack = 50, which means strategies can only reference the most recent 50 bars of historical data. GSB systems often require more data for indicators and calculations.

    How to Change Max Bars Back to 500:

    For Strategies (Recommended Method):

    1. Right-click on the chart with your strategy applied
    2. Select Format Strategies
    3. Click the Properties (or Properties for All) button
    4. Find "Maximum number of bars study will reference"
    5. Change from Auto-Detect to User Defined
    6. Enter 500 in the input box
    7. Click OK and Apply

    Set Global Default (For All Future Strategies):

    1. Go to View → Preferences (or Tools → Preferences)
    2. Navigate to Strategy Testing section
    3. Find "Maximum number of bars study will reference"
    4. Set to 500
    5. Click Apply

    When to Increase MaxBarsBack:

    • Before applying any GSB strategy to a chart
    • If you see runtime errors about "insufficient bars"
    • When using indicators with lookback periods > 50 bars
    • For systems using moving averages, ATR, or other historical calculations

    Performance Note: Higher MaxBarsBack values use more memory. 500 is a good balance between functionality and performance for most GSB systems.

    Applying the Strategy to a Chart

    Step 1: Open a Chart

    1. Create a chart for your target symbol (e.g., @ES for E-mini S&P 500)
    2. Set the bar interval to match your system (e.g., 5-minute bars)
    3. Load sufficient historical data for testing

    Step 2: Insert the Strategy

    1. Right-click the chart → Insert Strategy
    2. Find and select your imported GSB strategy
    3. Click OK to apply

    Step 3: Configure Strategy Settings

    After inserting the strategy:

    • Verify inputs: Ensure all parameters match your GSB Pro system
    • Set commission: Configure realistic commission and slippage
    • Position sizing: Set number of contracts/shares per trade
    • Format settings: Customize how trades display on the chart

    Backtesting in TradeStation

    Always backtest your imported strategy to verify it matches GSB Pro results:

    View Strategy Performance Report

    1. Right-click the chart → Strategy Performance Report
    2. Compare total net profit, number of trades, and win rate to GSB Pro
    3. Check that trade dates and signals match
    4. Investigate any discrepancies (usually due to different commission settings)
    Important: Verify Results Match

    The backtest results in TradeStation should closely match your GSB Pro results. Small differences due to commission/slippage settings are normal, but significant differences indicate a problem:

    • Check that bar interval matches exactly
    • Verify data quality and date ranges are the same
    • Ensure all GSB library functions imported correctly
    • Review input parameters for typos or incorrect values

    Automation and Live Trading

    Strategy Automation

    To enable automated order execution:

    1. Right-click chart → Format Strategies
    2. Select the "Automation" tab
    3. Check "Automate Execution"
    4. Configure automation settings (account, order type, etc.)
    5. TradeStation will now automatically place orders based on strategy signals
    Before Going Live

    Critical checklist before enabling automation:

    • Backtest results verified and match GSB Pro
    • Commission and slippage settings are realistic
    • Position sizing is appropriate for your account
    • Stop-loss and risk management in place
    • Paper trade for at least 2-4 weeks first
    • Monitor live trading closely for the first week

    Common Issues and Solutions

    Function Not Found Errors

    If you get "Function not found" errors:

    • Verify GSB_Library.ELD was imported successfully
    • Check Tools → EasyLanguage Functions list
    • Re-import the library if functions are missing
    • Restart TradeStation after importing

    Performance Mismatch

    If backtest results don't match GSB Pro:

    • Verify data sources are identical
    • Check commission/slippage settings
    • Ensure bar interval and session times match
    • Review input parameters carefully

    Additional Resources

    Next Steps

    Learn how to export your systems to other popular platforms: