Video Tutorials
Learn how to export the GSB scripts into Tradestation so you can utilise GSB Pro generated trading systems in the Tradestation platform.
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:
- Open TradeStation EasyLanguage Editor
- Navigate to File → Import → EasyLanguage
- Select the
GSB_Library.ELDfile from your GSB Pro installation directory - Click Import and wait for confirmation
- Verify the functions appear in your Function list
The GSB function library is located in your GSB Pro installation directory:
C:\Program Files\GSB Pro\TradeStation\GSB_Library.ELDThis library contains all the helper functions GSB systems use for indicators and calculations.
Step 2: Export Your Strategy from GSB Pro
- In GSB Pro, select the validated system you want to export
- Click the "Export" button in the toolbar
- Choose "TradeStation (EasyLanguage)" as the target platform
- GSB Pro generates the complete strategy code
- Copy the generated code to your clipboard
Step 3: Create a New Strategy in TradeStation
- Open TradeStation EasyLanguage Editor
- File → New → Strategy
- Give your strategy a descriptive name (e.g., "GSB_ES_DayTrade_001")
- Paste the GSB-generated code into the strategy editor
- 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
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):
- Right-click on the chart with your strategy applied
- Select Format Strategies
- Click the Properties (or Properties for All) button
- Find "Maximum number of bars study will reference"
- Change from Auto-Detect to User Defined
- Enter 500 in the input box
- Click OK and Apply
Set Global Default (For All Future Strategies):
- Go to View → Preferences (or Tools → Preferences)
- Navigate to Strategy Testing section
- Find "Maximum number of bars study will reference"
- Set to 500
- 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
- Create a chart for your target symbol (e.g., @ES for E-mini S&P 500)
- Set the bar interval to match your system (e.g., 5-minute bars)
- Load sufficient historical data for testing
Step 2: Insert the Strategy
- Right-click the chart → Insert Strategy
- Find and select your imported GSB strategy
- 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
- Right-click the chart → Strategy Performance Report
- Compare total net profit, number of trades, and win rate to GSB Pro
- Check that trade dates and signals match
- Investigate any discrepancies (usually due to different commission settings)
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:
- Right-click chart → Format Strategies
- Select the "Automation" tab
- Check "Automate Execution"
- Configure automation settings (account, order type, etc.)
- TradeStation will now automatically place orders based on strategy signals
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:
