Glean Guide (v3)


  1. 1  Getting Started
    1. 1.1 Installation
    2. 1.2 First Time Users
      1. 1.2.1 Glean Cycle Introduction
      2. 1.2.2 Tutorials
      3. 1.2.3 Acquire Market Data
      4. 1.2.4 Configure Market Data In Glean
      5. 1.2.5 Create New Design and Add Signals
      6. 1.2.6 Customize Design With Common Signals
      7. 1.2.7 Add Actions To Trade Your Signals
      8. 1.2.8 Verify In Playback
      9. 1.2.9 New User Next Steps 
    3. 1.3 Glean Appearance and Navigation
      1. 1.3.1 Glean Views
      2. 1.3.2 Flow View
      3. 1.3.3 Blocks View
      4. 1.3.4 Chart View
      5. 1.3.5 My Design View Navigation
      6. 1.3.6 Community View Navigation
    4. 1.4 Glean Concepts
      1. 1.4.1 Signals and Actions
      2. 1.4.2 Actions
      3. 1.4.3 Signals
      4. 1.4.4 Signal Types
      5. 1.4.5 Creating Signals
      6. 1.4.6 Editing Signals
      7. 1.4.7 Removing Signals
      8. 1.4.8 Design Undos
  2. 2 Signal and Action Reference
    1. 2.1 Actions
      1. 2.1.1 Market Actions
      2. 2.1.2 Limit and Stop Actions
      3. 2.1.3 Multi-fire Actions (Granular)
      4. 2.1.4 Multi-fire Actions (Coarse)
      5. 2.1.5 Action Order Pegging
      6. 2.1.6 Action Cancels
      7. 2.1.7 Action Sets
    2. 2.2 Action Order Status
    3. 2.3 Combined Signals
    4. 2.4 Previous and Summary Signals
      1. 2.4.1 Previous Signals
      2. 2.4.2 Summary Signals
    5. 2.5 Bootstraping Signals
      1. 2.5.1 Bootstrapping w/Historical Bars (recommended)
    6. 2.6 Discretionary Designs
    7. 2.7 Design Notes
    8. 2.8 Branched Signals
    9. 2.9 CSV Signals
      1. 2.9.1 CSV Requirements
      2. 2.9.2 Populating Signals from CSV
      3. 2.9.3 Editing CSV Files
      4. 2.9.4 CSV Signals Explained
      5. 2.9.5 CSV Signal Example
      6. 2.9.6 CSV Notes
    10. 2.10 DLL To Signals
      1. 2.10.1 DLL Signal Example
      2. 2.10.2 DLL Notes
    11. 2.11 Signal Views
      1. 2.11.1 Adding a Signal View
      2. 2.11.2 Quick Signal Adds
      3. 2.11.3 Signal View Notes
    12. 2.12 Plot Signals
    13. 2.13 Portfolio Actions
    14. 2.14 Primary Symbol Signals
    15. 2.15 Random Signals
    16. 2.16 Risk Limits
  3. 3 Glean Design Examples
    1. 3.1 Double Signal Automated : Bollinger + Harami
  4. 4 Testing and Trading Designs
    1. 4.1 Downloading TIK Data
    2. 4.2 Historical Testing Glean
    3. 4.3 Portfolio Testing
    4. 4.4 Design Optimization (via Gauntlet)
    5. 4.5 Live Testing Glean
      1. 4.5.1 Live Testing Notes
      2. 4.5.2 Connector-Specific Configuration
    6. 4.6 Live Trading in ASP
      1. 4.6.1 ASP Advantages
      2. 4.6.2 Buy/Lease to Trade in ASP
      3. 4.6.3 Trading in ASP
      4. 4.6.4 Design Unlock Setup
  5. 5 Need Help?   
  6. 6 Common Problems and Solutions
    1. 6.1 Problems Receiving Registration Email
    2. 6.2 Problems Starting Glean
    3. 6.3 Problems Opening Existing Designs on New Machines
    4. 6.4 Problems Opening Designs on Existing Machines
    5. 6.5 Assembly Load Errors In Activity Log
    6. 6.6 Crash Reports Popups, Other stability or weird issues
    7. 6.7 Pink Play Button Crash Errors
    8. 6.8 Pink Play Button Design Errors
    9. 6.9 Design Error Window Popup
    10. 6.10 Custom Bar Sizes : How to Change Default BarSize and BarSizeType?
      1. 6.10.1 To change the type of a bar :
      2. 6.10.2 To change the size of a bar :
    11. 6.11 How to Build DLLs for platforms different than one running Glean
    12. 6.12 Missing Method Exception
    13. 6.13 Com Factory Connector Errors
    14. 6.14 How to split data feed and execution in Glean :

 Getting Started

Glean is designed to be safe to make mistakes, so don't feel you need to read the documentation before trying.

Every user has design rollbacks to correct your mistakes, and you can Control +H at anytime to get help from pracplay support.

As such that vast majority of Glean can be used without any guide, but it's included anyways for convenience and completeness.


Install Glean Now

  1. Download and install Glean 
    1. You may also choose a specific Glean Release Channel :  Featured | Edge | Nightwalker
  2. Choose Defaults during installation
  3. Glean should start automatically when complete or start Glean from Start Menu ->Programs->Pracplay Glean ->  Glean
Glean requires one-time e-mail registration (free)  :
    1. Enter your name and email address
    2. Click submit
    3. Watch your inbox for registration confirmation email
    4. Copy/paste registration code contained in the email into glean registration box
      1. if you experience a problem, a small number of email clients will insert new lines into the registration code.  make sure you copy it with no extra characters or spaces.
    5. Click register and restart Glean.
    6. Click tutorials and Getting Started

First Time Users

Glean Cycle Introduction

Glean Cycles refer to using the entire Glean process to de-risk a new strategy idea, at the lowest possible time and dollar cost.

Cycles consist of the follow steps :
  • Learn how to Design, with no programming required (via Glean tutorials; views > Learn > Getting Started).   
  • Design one or many ideas, verifying them on the Glean historical simulator (views > Design)
  • Test the design on live data and/or on large portfolios consisting of thousands of symbols and months or years of data (views > Test > Portfolio)
  • Trade the design with real money, up to your Community Buying Power (BP) Limit (views > Trade > in Glean)
  • Once your design is consistently profitable, you can lease additional BP from Pracplay to trade your target markets and capital base (views > Trade > Buy Current)
  • Designs can be traded on hundreds of symbols per machine using our lightweight and headless ASP application
  • Optionally unlock a design for customization or to minimize costs.  Unlocking gives you native strategy source code for a given design/version. (views > Trade > Buy Current)
If you choose to use Cycles, the Cycles will produce a profitable design before you pay Pracplay anything.

Once a consistently profitable design is located, you can lease additional capacity from Pracplay to scale your design up to large amounts of capital and many markets.

The cycle also allows you to opt out of Glean at any point, and receive source code for a particular version of a design that you can trade or customize forever without buying further Pracplay services.

There is no limit to the # of cycles you can perform, either in total or in parallel.   Leased Design Buying power can be shared between multiple strategies if need be.

For more questions, hit Ctrl+H in glean or contact pracplay.


First time users should start with the built-in tutorials, which can be accessed from 'Begin Tutorials' view menu as seen here :

starting the getting started tutorial

It's not necessary to do all the tutorials.   Once you feel you get the idea you can simply start creating designs based on your ideas.   

Come back to the tutorials anytime as needed.

Acquire Market Data

Once you start designing your own ideas you'll always want to use your own data.

You can get data from :
  1. sample equities data (included with your glean install)
  2. supplemental equities dataset (automatically downloaded on first run of glean)
  3. Glean and ASP automatically record data for whatever symbols you trade.
  4. convert from historical sources
  5. supported data feeds with historical bar support, using Glean's data download view
Control + H if you need help acquiring data.

Configure Market Data In Glean

Once you've acquired your market data, add the data to your simulation.

To add new data, simply clear the current simulation settings and add new data.

All future design playbacks will now occur using your current data set.

changing glean's historical viewer simulation data

Create New Design and Add Signals

The core your trading idea is going to be based on some type of market data (quotes, trades, bars, imbalances, user-supplied values, etc).

Before you add these signals make sure you've created or opened the design you wish to work with.  To start with an empty design click the 'new design' button (to left of the toolbar).

To add signals to a design, click the signal button and choose the desired signal.   Most of the raw market signals are found under 'market data'.

In this case we've added market data signals for level1 data, as well as account signals for positions.    (you can find this pre-made design under views > Design > From Community)

adding raw glean market signals

Customize Design With Common Signals

Once you have your raw data signals, you'll want to transform them to the signals represented by your idea.

In this case we're entering based on fixed entry signal, and exiting based on open profit.

glean customizing raw signals

Add Actions To Trade Your Signals

adding and editing actions

Verify In Playback

Once you've setup your basic idea, verify it works as expected when it's run on your historical/live data in the Playback Window.

If you see a problem you can quickly work backwards to see what you're doing wrong :

eg start at your equity your equity curve
glean equity
to the actions performed in your trading account
glean account
to the signals values when a given action occured
glean play signals

and if necessary to which signals fired or didn't fire to cause that action :
glean debug

New User Next Steps 

  1. Tweak your design; test on more data sets; test other ideas
  2. Download market data from Iqfeed trial and Portfolio Test your designs
  3. Historically profitable designs can be verified live using Community Buying Power
  4. Consistently Profitable Live Designs can acquire additional Buying Power by leasing it from Pracplay
  5. Scale up leased designs to tens of millions of Buying Power per design, at up to 250 markets per machine.

Glean Appearance and Navigation

Glean Views

Glean separates strategy designing tasks into discrete apps or windows called views.

Views are accessible from the view drop down menu present in most views.

In the view drop down, you will see views grouped into categories which correspond to the view's place in the Glean Design Cycle.   

Views are threaded, so you can start a task in one view and switch to another while it completes.

The most common view when designing strategies is the Flow view.

Flow View

The first time you run Glean after registration, Glean will start in flow view.

Flow shows the signal flow of your strategy, how signals interact and how signals trigger actions like buying and selling orders.

As an example, the community 'long ranger' design shown below shows how bid, ask and trade signals are processed into actions which buy and sell your account at a broker.

In flow view, you are able to :
  • view signal and action flow for a given design
  • add new signals and actions (via the add buttons in the view's toolbar)
  • edit any signal or action "in-flow" (by double clicking on it)
  • see current signal/action status for any time in a simulation run (by single clicking)
  • re-arrange the flow layout style (by clicking 'flow style' icon in toolbar)
  • reposition, zoom and scale the flow grid (using the controls in the upper right of the flow, or by manually grabbing and dragging grid or flow signals)
  • access simulation account through time (by clicking on flow's 'Broker' icon)

Flow screenshot :

glean designer window labeled

Blocks View

Blocks view is useful for more low level signal work.

Unlike Flow view- which shows only signals which directly affect actions- Blocks shows every signal in your design.   

Blocks will additionally show :
  • signals used as flags
  • hidden signals
  • signals that trigger special Glean design behavior (eg AutoBar backfill)
  • groups of related signals (eg for a Moving Average signal add, you will get one group for the MA with many individual signals which hold the MA parameters like lookback and any other parameters needed for the group).   
For convenience, Blocks view also allows you to edit/add signals and inspect signal values in the simulator, just as in Flow.

Additionally, Blocks view allows you to perform tasks not possible in Flow view, including :
  • Finding signals (via the 'search' button in the view's toolbar)
  • Removing one or many signals (via right click > edit > remove)
  • Provide 'quick' signal adds for common signal relationships that are context sensitive within your design (via right click > quick add)
  • Navigate to other signals (right click -> uses or used by)
  • Hide signals (to prevent them from being visible; right click > edit > hide)
  • Lock signals (to prevent other Glean users from modifying a signal; right click > edit > lock)
The Glean Tutorials are the best way to learn about the block editor and how to design.   You can access the tutorials at any time under views > Learn > Getting Started

Chart View

Glean Chart Editor

Chart View is a view centered around working with designs on, you guessed it, a chart.   

For speed and simplicity, Chart view is optimized to work with the most common types of designs...  designs which run on bar data (1sec/1tick ok, all the way to daily).   

This means Chart view is not ideal for working on Pairs, Basket and HFT designs.   For those purposes you should use Flow and Block views.

Chart vs Flow Differences
  • hey, there's a big chart! ;)
  • quick editing of orders and actions
  • plot wizard to change what gets displayed on chart
Add signals and actions the same as Flow and Block views, click on 'add signal' button in toolbar or one of the quick add buttons.   

Plot Wizard
Plot Wizard

The plot wizard lets you quickly change which signals are plotted.   

To plot or unplot a signal, 
  1. click the plot wizard button.
  2. select/unselect signals and actions to plot/unplot  (use ctrl for multiple selections)
  3. accept your selections, the chart will update
Questions, Feedback or Issues?   Ctrl+H us.

My Design View Navigation

You can switch between your private designs or create new designs in the My Design window.

Any private designs you create or modify are secured in the cloud and only readable by you.

Designs are protected with double key encryption so only those with access to your e-mail can see and edit your designs.

private designs

Community View Navigation

Community View is accessible in Views > Design > From Community.

Community Designs are public and view-able by any Glean user.

Double-clicking on a community design will copy the design to your My Design view, where you can work on it privately.

Right click on any design you've shared to the community, and you'll be able to remove it.

community designs

Glean Concepts

Signals and Actions

Everything in Glean designs is a Signal or an Action.


Actions allow you to interact with the market and Glean :

There are 4 primary types of Glean actions :
  • Orders (market, limit, stop, etc)
  • Cancels (of previous action)
  • Sets (changing value of other signals)
  • No actions
Actions can be created at any time from the action menu, or by right clicking and choosing add action (+ action).

Actions require signals to become active, so lets talk about signals.


Data enters Glean through signals, which then control your strategy design's actions.
Thousands of signals are included, billions of signals can be constructed.

All the signals fall into two categories :
  • simple signals   (hold single value of information)
  • combined signals (lets you construct new signals from existing ones)
Lets see some examples.
Like signals can be combined to form new signals, like so :

Combined signals function like simple signals when used, only their creation is different.

Signal Types

Regardless of category, there are 4 types of information signals contain :

  • Truth signals hold on/off levels (eg :  price > myindicator,   ismypositionflat,  allowlongs = true)
  • Number signals typically hold contract and share sizes (eg: myinitialsize = 100, middenominator =2 )
  • Decimal signals hold prices and calculations (eg: midnumerator = bid + ask, mid = midnumerator / middenominator )
  • Text signals hold symbols and destinations
The simple rule of thumb when constructing signals in Glean is : "if in doubt, create more signals".

Creating Signals

You can create signals from the signal menu, or by right clicking and choosing + signal and choosing the desired category and type.

Editing Signals

Signals can be edited at any time by double clicking.

Removing Signals

Signals can be removed in Block view (views > Design > Blocks) by locating the signal, right clicking and choosing remove.

If a signal is used by other signals, you will have to remove it from use before deleting it.

Signal Groups

Calculating complex signals may require many tens of individual signals.    Sometimes additional signals are used to control the calculation.

Working with these related signals is easy in Glean with Signal groups.

Signal groups allow you to change related signals in one place rather than individually.

In this screenshot, the bollinger signal group is :
  • identified by the dotted line
  • contains 29 related signals
  • 6 of these signals will affect the calculation
You can always edit signals individually or in the group, whichever is easier.

Read-only signals are hidden by default, show them by right clicking and choosing show signals.

Design Undos

Anytime you change a design by adding, editing or removing signals, a new version of your design is created to protect your work.

You can move back and forth between previous and subsequent design versions using the version toolbar.

In community mode Glean will let you work with 20 designs and 25 undo levels per design.   

In Optimize and optionally DLL unlock mode you have unlimited designs and rollback capabilities.

Signal and Action Reference


Regardless of the type, actions are added by going to Add signal > add action.

Lets cover some specific types of actions you can use in your design.

Please Control+H if you have questions about this or any action.

Market Actions

These actions send market orders for a given size.   You must supply the size of the order as a simple signal (eg add signal > common > simple > number > entrysize = 100).

You can optionally specify a symbol or destination/exchange.   If you don't supply a symbol or destination, the default is used.

To add symbol or destination signals options, do one of the following :
  1. add a simple signal to hold your symbol or destination (eg add signal > common > simple > text > mysymbol = XYZCONTRACT / mydest = ARCA)
  2. create a CSV text file with a header like: inputsymbol,outputsymbol,destination. 
    1. populate this file with the correct symbols and destinations and save it somewhere locally
    2. Then add a csv signal to this file (add signal > other > csv)
Please Control+H if you have questions about this or any action.

Limit and Stop Actions

Limit and stop actions are exactly the same as market, except you must provide an additional signal for order price.

You can create order price signals as you would with any signal, here are some examples :
  • create price signal manually using simple signals (add > common > simple)
  • use bid or ask sizes, or position sizes.
  • calculate price signals from other signals (add > common > combined).  (eg take half of the bid)
  • using csv signals, dlls, etc
By default and for safety, actions will only fire one order per action even if the action remains active.

To change this, see Multi-fire actions below.

Multi-fire Actions (Granular)

While actions remain active for as long as they are set, by default they will only fire a single order.   

This is to protect you from your accidentally causing order loops.

You can of course control secondary and tertiary entries and exits, simply by adding a dedicated action for each level.

Another way is to allow your existing actions to refire.    

This is done by creating a new action that sets an existing action to false.


entry_action <= send order from some signals
exit_action <= send order from some signals
multifire_action <= is_exit_action and notflat set entry_action = false

This would allow your entry to re-fire given an exit condition.

Multi-fire Actions (Coarse)

You can allow all actions to refire on a position becoming flat or reversing, by adding the design item 'Action Flat Refiring'.

Please Control+H if you have questions about this or any signal.

Action Order Pegging

You can optionally peg an order to a particular signal.   This means that as the signal price or size changes, your design will automatically update whatever remains on your order.

To enable pegging, simply check the 'peg' box on the action.

Please Control+H if you have questions about this or any signal.

Action Cancels

You can cancel limit and stop actions, regardless of whether they are pegged or unpegged (assuming the action's orders have not already filled or canceled).

To cancel an action, simply add the cancel action: add > action > cancel.   Provide the triggers for the cancel, and the name of the action that should be canceled.

To determine whether an action has been filled or canceled, add an Action Status signal associated with the action you want to check.  (see below).

Please Control+H if you have questions about this or any signal.

Action Sets

Action sets allow you to change signal values based on some set of triggers.     

These can be used as an alternative to combined signals or branches, especially when you have many triggers that are required.

Please Control+H if you have questions about this or any signal.

Action Order Status

Action Status signals are used to get information about the progress of an action.

Status signals are linked back to particular actions, and include things like whether the order is filled or canceled, how much has filled, and so on.

To get status of an action, add > account > action status.    Select the action to get status on and click ok.   You will then see several signals added that correspond to fill and cancel status.

Please Control+H if you have questions about this or any signal.

Combined Signals

Combined signals allow you to create new custom signals from existing ones.    

Combined signals are added via the design editor :
  1. add signal > common > combined
  2. choose the type of signal combine (+/-/*/Power/etc from 50 different combine types)
  3. choose the first signal to combine
  4. if the type of combine requires two signals, choose the second signal.  (signals are generally read left to right, so signal1^signal2 would be Power Combine : signal1,signal2).

Example, subtract a 5 minute close from a 3 minute close  :
  1. add signal > common combined :
  2. select subtract
  3. select 5 minute close signal as signal 1
  4. select 3 minute close as signal 2
  5. select modify

Safe signals ensure that if you have an invalid calculation (eg that results in infinity, like dividing by zero), your strategy will continue uninterrupted and that signal will be set to zero (which makes has_data signals return false).

Sticky signals "stick", so that when they are set to true they will not go back to false (unless you set them to false via a signal set action).    

This can be useful for remembering whether a given price level has been crossed or touched during a trading session or round turn.

Previous and Summary Signals

Previous and summary signals allow you to work with signals you've previously received.

Previous Signals

Adding a previous signal will allow you to obtain the value of that signal, some number of signal value previously.

eg creating a previous signal for close_t300_3 would give you the value of 5min close 3 signals ago.     You could use multiple previous signals together to compare say the 5 and the 3 previous signal values of the 5min close.

In this way, Previous signals are somewhat similiar to the concept of 'bars-back'.  However, previous signals are more powerful because you're not limited to bars.

You have control of the timing of when previous values are needed.    By default previous signals are updated on every tick.

You can change this and link the update condition, eg making a previous signal close update only when the close has data, or when the 5min bar is new, or when the high is broken.

Please Control+H if you have questions about this or any signal.

Summary Signals

Summary signals summarize data over some number of previous signals.    

Eg a Signal summary of lasttrade 20 would create a simple moving average of trades.   Many different types of summaries are available.

 Like previous signals you can control the frequency of summary updates.

Even though they are related conceptually, they are independent and thus it's not necessary to create previous signals in order to use summaries.

For safety Signal Summaries will not calculate until they have received your minimum # of updates (eg with lasttrade 20 average, they would show an average only after 20 update conditions have occured).

Please Control+H if you have questions about this or any signal.

Bootstraping Signals

This section covers controlling signal acquisition and startup in Glean.

By default, Glean runs off tick data meaning that it will populate signals according to your calculations.

For the included bar data, this may mean you have to wait some number of bars to see your signals populate.

Bootstrapping w/Historical Bars (recommended)

To avoid waiting for signals to calculate, we recommend most users use a connector or feed that supports historical bars such as IQfeed (7 day trial available)

If you add the AutoBarBackfill signal, Glean will automatically detect historical bar sources if they are available and pre-request enough data to ensure your signals have values when you start the design.

This will occur regardless of whether you are testing historically/live, trading live in ASP, in Gauntlet, etc.

Here is what your signals will look like at startup if a historical bar source is running (notice the bar count starts at the required # of bars, and your signals will start with data right away).

autobar backfill example ss

You can also bootstrap a signal using signals of a shorter calculation length while the longer calculates, using a daily close price from google/yahoo if available, and so forth :

bootstrap a signal (no feed - less paitient)
1. add a signal
2. add same signal but w/ a shorter calculation interval
3. add branched signal to to use #2 until #1 has data
4. link branched signal to other signals or actions
5. wait for data to populate #2

bootstrap (no feed - impaitient)
1. add signal
2. add an approximate/representative/correlated signal that is immediately available (eg some previous close, summaries of previous closes, etc)
3. add branched signal to use #2 until #1 has data
4. link branch to other signals or actions
5. no waiting

Please Control+H if you have questions about this or any signal.

Discretionary Designs

(see the video 2:40 mark for discretionary design examples)

Any design can have discretionary signals which are changed by the user during trading.

This can be useful to manually fire an entry or exit, change position sizing, toggle source signals, and more.

Presently discretionary signals only are supported for truth/on/off signals.    

To add discretionary signals, choose signal -> other -> discretionary.    Then select which signals you want to allow toggling during trading.

When discretionary signals are supported, you can right click in the signal window (in Glean).  

Please Control+H if you have questions about this or any signal.

Design Notes

Notes are useful to provide reminders on how to trade your design, document the operation of your design, or provide links to external documentation via websites.

To add a note : add signal > other > note.

Supply a name, the note information and an optional URL.

Note that if a URL is provided, editing the note will cause the URL to open rather than allowing you to change the design.    In this case if you later need to change the note, you should delete and recreate it.

Please Control+H if you have questions about this or any signal.

Branched Signals

Branched signals help you maintain clean designs by separating signal calculations.

They can be added via add signal > other > branch.

The most common example for a branch is getting a price or size, where the price or size calculation changes as your strategy changes.

This is common in pairs trading, where entry and exit prices for the pair switch from the bid to the ask based on whether you're in a position.

For example, compute a price that takes the ask + .02 on entry and hits the bid - .02 on exit.
  1. add a simple signal to hold your .02 delta
  2. compute entryprice = ask +delta
  3. compute exitprice = bid - delta
  4. add position signals (add account > position) to get position state
  5. add branch called price that when you are flat takes the value of entryprice, and when you are not takes the value of exit price
Please Control+H if you have questions about this or any signal.

CSV Signals

You can populate the values of signals from a CSV file.    This is useful to create signals quickly, when you have many signal values that vary on a per security basis, or to work with multi symbol strategy such as pairs or basket strategies.

CSV Requirements

The CSV file must have a header that contains a column called symbol or sym (case does not matter), and as many other columns as you like.

The rows of your CSV file must contain a symbol and whatever other signal values you want to associate with the symbol.   An example of a CSV file is included in the folder you installed Glean (TestRDCsv.csv) or here.

Populating Signals from CSV

Once you have created and saved your CSV file, you add it to your design like add signals > other > csv.    Specify the file, glean will tell you if any problems are found in your CSV.

Editing CSV Files

If you have problems with your CSV file, try using the included example which already works and modifying it to meet your needs.    

There is also a CSV editor in glean (view > designs + data > csv editor > open csv file), which makes editing CSVs less error prone.

CSV Signals Explained

When your CSV is linked to your design, it will automatically create a signal corresponding to each column.    When you trade a symbol on the design, if the design's symbol is listed in the CSV file it will take the signal value from the row corresponding to your signal.   

CSV Signal Example

Given this CSV file :


Anytime you trade GE the entrysize signal will hold 100, and when trading GE will hold 1.   If you traded a symbol not listed in the CSV, it would take the default value of the signal (which you can change the same way you change any signal default, by double clicking the signal and changing the value).

CSV Notes

Presently CSV files are stored locally on your machine, not with your design in the cloud.

As such, if you move machines or trade designs in ASP via a dll, you will need to move the CSV file on the machine in the same directory folder as when you created the design.

Please Control+H if you have questions about this or any signal.

DLL To Signals

Dll signals allow you to interface c and c++ code to Glean directly.

Glean allows you to provide the header file for dlls that holds the names of the functions your dll exports and what types of arguments it needs.

When you add a dll signal (add signal > other > dll), you provide the dll and header location.    It reads the header to find all the functions exported by your dll.

To map a given function to input signals, simply choose the desired dll function and then select each function argument and it's matching input signal.

If you forget an input, it will be marked as pink and glean will not allow you to accept the dll signal until all the pink options have been cleared.

Output signals will be automatically created once you accept the dll.

DLL Signal Example

An example c dll is provided in the folder you installed Glean called TestDLL2Signal.    You will need Visual c++ express or visual studio to edit this solution.    

The example includes two exports and you can use it to adapt your own code.

DLL Notes

Similiar to CSVs, dlls are presently stored locally and not in the cloud so if you move machines or trade via a dll, make sure the dlls are provided in the same folder as on your design machine.

Please Control+H if you have questions about this or any signal.

Signal Views

Signal views help you design by limiting the signals you can see at any given time.

This can be useful in verifying a calculation, in diagnosing why a given action fired or didn't or why a combine calculated the way it did, or in developing discretionary trading signals.

Adding a Signal View

To add a signal view :
  1. add > other > signal view.
  2. name the view
  3. from your signals on the left, choose which signals you want to see in the view
  4. once you have your signals selected, adjust their order as needed
  5. accept the signal view when ready.
  6. once a signal view has been added, anytime you play the design in historical or live view you will have a signal view drop down that will show only those signals in your view.

Quick Signal Adds

If you want to visually see why an action fired or how a combine calculated, create a view for the action.

To do this quickly, select the action, right click and quick add > signal view.

This will create a view for the inputs and outputs of the action or combine, so when you playback you can easily see what is going on.

Signal View Notes

Signal views are only available when testing or trading inside Glean.    If you trade in ASP and want to diagnose a particular action, load up the tick data ASP records into the historical view and then diagnose the signal or action.

Please Control+H if you have questions about this or any signal.

Plot Signals

Signal plots let you draw the value of your signal on the chart.

To plot a signal, you can right click it and quick add > plot.

Or add signal > other > plot and choose the signal you wish to plot and the type of data it contains (price or oscilations between two values).

Please Control+H if you have questions about this or any signal.

Portfolio Actions

Portfolio actions let you close your entire portfolio based on other signals.

To add simply add signal > other > portfolio action and choose your trigger conditions and exit criteria.

Please Control+H if you have questions about this or any signal.

Primary Symbol Signals

Primary symbols are needed if you want to trade a design live in glean and see the individual symbols signals.    

Adding this signal (add > other > primary symbol), simply allows the design to provide the symbol when signaling so it can visually keep each symbols signal seperate when displaying.

For the same reason, primary symbol signals are also needed if you are discretionarily triggering signals via the mouse.

Please Control+H if you have questions about this or any signal.

Random Signals

Random signals can be used as placeholders for signals that you are having developed by third parties (and may not be available at the time you start designing).

They can also be used to provide random inputs to calculations that require them.    To add a random signal, simply add > other > random.

Please Control+H if you have questions about this or any signal.

Risk Limits

Risk limits allow you to control how many symbols your design can trade, or how many dollars your design is allowed to purchase (either globally, or per symbol).

To add risk limits, add signal > other > risk limits and specify what limits you wish to enforce.

Please Control+H if you have questions about this or any signal.

Glean Design Examples

You should have received two example designs when you first registered Glean :
  • thelongranger - this automated design buys and holds until a profit limit is reached, then sells and buys again.
  • quotopia - this discretionary design provides ability to get a visible quote on a symbol, send orders manually (or combination of automatic and manual orders can be used), as well as customizing the design to add additional signals or features.
You can also find other designs in the community area (views > designs + data > community, right click on a user to access designs they have shared).

Here are some other videos showing how to create designs :

Double Signal Automated : Bollinger + Harami

Trading the Tape

Testing and Trading Designs

Downloading TIK Data

glean data downloader

Glean offers historical testing, which helps you develop designs faster and lessen the risk associated with a particular design, before trading it live.

There are many ways to acquire TIK data in Glean :
  1. Use the included equity sample data (this should be automatically downloaded for you once you've installed glean).
  2. Download using Glean data download via a supported market data feed (we recommend signing up for iqfeed free 7 trial to acquire a data set to build strategies with)
  3. Import data from 3rd party sources (views > design test > data download, click import button on toolbar, follow instructions)
  4. Automatically record data from live market when trading designs in Glean live signals view  (or with a scaled up design in ASP)
In this section we'll focus on option #2.

To download from iqfeed :
  1. if you are not already an iqfeed customer, sign up for the 7 day iqfeed trial
  2. start iqfeed and glean
  3. get a quote in quotopia (to start the iqfeed connector and verify your connection is working)
  4. open data download view : views > design test > data download
  5. from the select data interval button on the toolbar, choose whether you want to download 1minute or daily data
  6. enter a list of symbols and press enter
  7. your download will automatically begin and you'll be notified when completed
  8. double click on any any data file to have it automatically open in the historical signals view

Historical Testing Glean

To test historical : 
  1. views > test > historical.
  2. Change simulation data via the settings icon.

You will need to have either bar data (add signals > market > intraday bars) or view signals on ticks (add signals > market > view signals on ticks) to see signals in the player.

Click any signal to see it's correspond design output.

See the 'Testing' tutorial for more info, or Control + H for help.

Portfolio Testing

Once you have your signals and design trading the way you would like, you can test the design on a portfolio of data.

To do this, 
  1. choose views > Design Test > Portfolio.   
  2. From the portfolio toolbar, select the folder containing the data set you wish to test again.
    1. Please note that we recommend you break your data set into sets so that you can leave part of your data for out of sample testing.    
      1. You can do this just dividing your data set by say 10, and putting 1/10th of your TIK files each into their own folders, and selecting that set when doing portfolio test or optimization.
      2. You may also want to brush up on cross validation.
      3. It's recommended to save some # of sets for final validation (if you have 10 starting sets, usually 1-3 would be reserved for final validation step).
  3. Select the design you wish to test.
  4. The test will begin and a progress bar is shown.   
  5. You can continue designing and/or using other views while the portfolio run is processed.
When you're done you'll get a closed PL histogram for your design that looks something like this :
portfolio test histogram example

Mouse over any part of the histogram to see more information on positive and negative profit and loss contributions.

Double click any part of the histogram to load your design and that particular data set into the historical signals view.

Design Optimization (via Gauntlet)

To optimize a design on a portfolio : views > design test > optimize a design

Click 'design' button and choose the dll associated with the design you want to portfolio test.  

Designs testable in historical simulators like Gauntlet  are designed by having '_historical' in their dll's name.   Eg testing thelongranger in gauntlet you'd select the thelongranger_historical.dll

Historical dlls are updated anytime you change a design and can run in gauntlet with no BP limits.

Gauntlet can be used to optimize default signal values, see the optimize tab in Glean.   To make a signal optimize-able in Gauntlet, double click it glean and choose 'optimize-able'.

Control+H for help using Gauntlet.

Live Testing Glean

To test live : 
  1. views > test > live (or for live orders, use views > trade > in glean)
  2. select design to trade (use 'quotopia' if you haven't created a design yet)
  3. select broker to trade with
  4. if the broker connector comes with glean and it can be started automatically, it will start.  (click ? button for more info on your specific broker, or see here)
  5. if the broker connector must be started outside glean, or is provided by a third party you will start the broker connector now according to whatever instructions you receive.
  6. enter a symbol or symbols to receive quotes and begin trading
To restart or change designs, click the 'start again' button.

To edit the design while you trade it, click the edit button.  (when done editing, you will have to 'start again' to have the changes take effect)

Control+H for help using Live testing.

Live Testing Notes

  • To see signals immediate in live trading, use add > market data > view signals on ticks = 0.  (see quotopia design as an example, or the 'testing designs' tutorial)
  • If signal views are available in your design, a signal view box will appear to change your view.   Regardless of which view is selected, all signals will always calculate.
  • You can run multiple Glean instances to test multiple designs, but only the first instance will trade live to the broker.   
  • Subsequent glean instances will be papertraded inside glean, so you will be testing with live data but your orders will be filled by Glean from the feed (rather than the broker).
  • Live testing has BP limits enforced, so you won't be able to buy more than whatever your included BP level is.
  • To increase your BP level, simply open the design and purchase a lease : views > design purchase > buy current design, choose a BP level and buy it via the paypal site.

Connector-Specific Configuration

  1. If any per-connector setup is required, you can find out by clicking the '?' button in the Live Testing or Trading views.
  2. You can also see the same information for all connectors here.

Live Trading in ASP

You're ready for ASP when you have a design PLUS any of the following :
  • you want to trade on more than a handful of symbols
  • you want to trade outside of glean
  • you have a separate production trading machine (co-located or not)
  • you want to trade in unattended fashion
  • you want someone else to trade your strategy w/out letting them see the design (nor access to your glean account)
For all of these situations, you want to use ASP (the Automated Strategy Program) to trade your design(s).

ASP comes w/Glean and is free to use, so long as you have sufficient buying power leased.

ASP Advantages

  • support trading designs that use hundreds of symbols or more.
  • trade many designs at onceuse multiple feeds.
  • run on machines that don't have glean (such as in a colo or cloud environment)
  • be started automatically at a specific time
  • be run by people that don't understand how to use Glean.
  • records all the data it trades, so you can later play it back in glean if necessary
  • exports signals to csv file, for later analysis in excel/r/matlab/etc
To use ASP you must have purchased a lease or unlock for your design.

Buy/Lease to Trade in ASP

  1. open design (eg views > create from my designs > choose design)
  2. then : views> design purchase > buy current and choose purchase option.
  3. see unlock questions for more info on purchasing
  4. Once you have bought or leased a design, restart Glean to receive your lease or unlock.
Control + H if you need help purchasing or leasing.

Trading in ASP

Any design that is leased or unlocked will have a live DLL generated automatically.

For leases, this dll will be updated anytime you change the design.   (for unlocks, it's fixed to the purchase date of the design).

To trade a design dll in ASP :
  1. views > design trade > in ASP
  2. click 'design' and choose the desired design dll.   
  3. make sure that you don't choose a _historical dll, because these will not work in ASP.
  4. your design will start trading.
  5. if your design does not specify what symbols it should trade (eg via a csv file), right click the design to change the symbols it trades.
  6. you can pause or remove a design from trading via right clicking
  7. signals and ticks will be automatically recorded.
Control +H if you need help trading in ASP.

Design Unlock Setup

  1. Open the design to purchase (eg create design > from my designs > choose design)
  2. Purchase desired unlock (views > design purchase > buy current, choose lease and purchase options and buy via paypal)
  3. Restart to activate


Need Help?   

Control +h in glean or post on the community forum.

Common Problems and Solutions

Problems Receiving Registration Email

If you don't receive registration confirmation e-mail
  1. Disable all antivirus and firewalls
  2. Re-register Glean
  3. Re-enable all antivirus and firewalls
You can also try from another machine.

Problems Starting Glean

If you are unable to start glean after using it previously, try resetting your config file :

  1. ensure glean is closed
  2. Go to start -> programs -> pracplay glean -> other logs
  3. Open the folder
  4. Delete (or move) all the glean.exe folders you see inside
  5. restart glean

Problems Opening Existing Designs on New Machines

First of all, you must have registered the same e-mail address on all machines you wish to work with same designs.

If you have done this, and if you still can't open an existing design on new machine (and/or you see any of following in Glean activity log) :
  • "An error occured fetching your design, did you switch machines?"
  • "Error getting design"
  • "Design unreadable, may be created with different private key"
This problem can occur because your designs are protected with a private key that prevents anyone (including Pracplay) from seeing your designs without your permission.

To allow designs to be read on new machines, you have to setup the same private key.   

Here is how to do this :
  1. Close all copies of glean
  2. On the machine where you created the design, go to start -> programs -> pracplay glean -> other logs.  Find the 'GleanDesignKey' folder
  3. Copy this file to the same location on the new machine (or copy paste the key inside the file to same location on original machine)
  4. restart glean

Rinse and repeat for as many machines as you want to share the design on.

Problems Opening Designs on Existing Machines

If you have not changed your glean machine, e-mail address or private design key above, but you are still missing designs.... check your system time.

If your system clock is more than a few hours off, Glean will not allow you to work on designs.    In windows you can automatically update your time on windows 7 by 
  1. double-clicking on the time in the toolbar
  2. click date and time settings 
  3. click internet time tab
  4. click change settings, then 'update now'
  5. if you receive an error, try changing your time server and try again.
  6. once you have a successful time sync, close and restart glean and your designs should be back.

Assembly Load Errors In Activity Log

 "Could not load file or assembly 'System.Web"
  1. Close Glean
  2. Install latest .net (even if you think you already have it)

Crash Reports Popups, Other stability or weird issues

  1. Submit crash report if it happens (this helps us improve glean).
  2. Close Glean
  3. If the issue persists, Restart your computer.
  4. If issue still occuring, please ctrl+h to get assistance.

Pink Play Button Crash Errors

Got pink play crash warning in design mode?   Things to try :

  1. If your error is 'object not set to instance of object', simply wait and press play again.
  2. If your error is something else, submit report to pracplay if you don't mind.
  3. If error continues and you are client, contact pracplay support.  Otherwise contact community.

Pink Play Button Design Errors

Got a pink play error in design mode?   Things to try :
  1. Delete recently added signal items and re-add them
  2. Go back to previous version and re-add signal
  3. If you like, you may also try recreating the design (this is generally not necessary, but if it works it's helpful for Pracplay to know)
  4. Contact the community (or pracplay support if you are an optimize or unlock client)

If prompted and you don't mind sharing the design which caused the error, submit the design report to pracplay. (if not prompted, ignore this)

Design Error Window Popup

If glean detects something odd about your design, it will not save or play the design and instead popup an error window.

Sending this report to pracplay will help us improve Glean to avoid these errors in the future.    

Not sharing the report is perfectly fine too, if your design is very proprietary or you don't want to share the report.

Everything sent in the report is displayed in the popup.   You can also choose Glean to never or always send reports.

To recover from an error, see previous question.

Custom Bar Sizes : How to Change Default BarSize and BarSizeType?

You can many different types and sizes of bars in the same design.

To change the type of a bar :

  1. Find the 'BarSizeType' signal used to create your bars
    1. (e.g. if bars in question used with a SignalGroup like bollinger, look for Bollinger_BarSizeType)
  2. double click ontype
  3. change number to desired bar type
    1. -1 = Time Bars (X number of seconds per bar)
    2. -2 = Tick Bars (X number trades in bar)
    3. -3 = Volume Bars (X number of contracts traded in bar)
  4. click accept or modify

To change the size of a bar :

  1. Find the BarSize used by your signal (e.g. if used with SignalGroup like bollinger, look for Bollinger_BarSize)
  2. double click desired BarSize
  3. change it's value to desired bar size 
  4. e.g. if you set to 100, this represents :
    1. for BarSizeType = -1, 100 second bars
    2. for BarSizeType = -2, 100 trades per bar
    3. for BarSizeType = -3, 100 contracts traded per bar
  5. click accept or modify

How to Build DLLs for platforms different than one running Glean

By default, Glean will build dlls designed to run on the platform it believes you're running on.

If it detects this incorrectly or the dll was built on another machine, you may see something similiar to this :

“An attempt was made to load a program with an incorrect format”

Which generally indicates you want to force a dll platform.

To force a particular dll type :
  1. open glean
  2. open historical play view
  3. click view settings (represented by the gear icon on the toolbar)
  4. click change dll platform target until the resulting status message represents the platform you like
  5. the next time you change your design the resulting dll will represent the new type

Missing Method Exception

This error shouldn't appear to much on new machines, it simply means you should upgrade your .NET.

Please Ctrl+H us if you need help with this.

Com Factory Connector Errors

Older machines using Sterling or MB Trading may see this running those connectors.   

Errors Seen :

COM factory with CLSID {ADFAS0D98...} has failed do to following error: xxxxxxxx

If xxxxxxx ends in 'e4' (and sometimes image errors ending in 'c1'), this is usually a security error :

  1. ensure that you are logged into an account with administrator rights
  2. ensure that UAC is disabled on vista
  3. ensure you're running program as adminstrator (eg see bottom of this post)
  4. ensure that any prerequisites have been installed (eg esignal needs to be installed for esignal connector)

is not a valid Win32 application (from connector only.  if received from a design dll, see same error above)

  1. ensure you're running as administrator

if ends in 80040154, usually means it can't find a dll :

  1. check the connector guides to make sure everything is configured properly.

Ctrl+H us if you need help with this.

How to split data feed and execution in Glean :

Like ASP, Glean supports having different connectors used for tick feed vs execution.

Note that if you're using historical bars for signal backfill, it's not necessary to follow these steps as Glean/ASP will automatically detect historical connectors and use them, with no user action required.    This portion of the guide is for splitting non historical (tick) feeds from execution, or for forcing connectors other than the first one found (when multiple connectors are running).

To enable split tick feed and execution, you must modify your config file to tell it which feed you prefer :
  1. close glean
  2. In folder you installed glean (eg c:\program files\glean), find glean.exe.config
  3. edit this file
    1. click start > run > type notepad, press ok
    2. drag and drop glean.exe.config onto notepad window
    3. in notepad when done modifying, choose file > save to accept changes
  4. find or insert PreferredFeed setting eg
    1. <setting name="PreferredExecute" serializeAs="String">
    2.                 <value>PracCore</value>
    3.             </setting>
    4.             <setting name="PreferredFeed" serializeAs="String">
    5.                 <value>PracCore</value>
    6.             </setting>
    7.             <setting name="PreferredHistorical" serializeAs="String">
    8.                 <value>PracCore</value>
    9.             </setting>
  5. Change 'value' to preferred connector
  6. Here is list of valid choices
    1.  PracCore,
    2.         Assent,
    3.         InteractiveBrokers,
    4.         Genesis,
    5.         Bright,
    6.         Echo,
    7.         Sterling,
    8.         TDAmeritrade,
    9.         Blackwood,
    10.         MBTrading,
    11.         LightspeedDesktop,
    12.         Tradespeed,
    13.         REDI,
    14.         eSignal,
    15.         IQFeed,
    16.         TrackData,
    17.         TradingTechnologies,
    18.         ZenFire,
    19.         GAINCapital,
    20.         FxCm,
    21.         OpenEcry,
    22.         DBFX,
    23.         Nanex,
    24.         KnightTrading,
    25.         PATS,
    26.         FIX,
    27.         RealTick,
    28.         GrayBox,
    29.         Avatar,
    30.         LightspeedColo,
    31.         DAS,
    32.         Rithmic,
    33.         GenericFix,
    34.         Google,
    35.         Yahoo,
    36.         MarketWatch,
    37.         CQG,
    38.         TradeStation,
    39.         eSignal_EPF,
    40.         TradingPhysics,
    41.         QCollector,
    42.         MultiCharts,
    43.         Euronext,
    44.         ThompsonReuters,
    45.         TrueFX
  7. eg to use iqfeed as a preferred feed :
    1. <setting name="PreferredFeed" serializeAs="String"><value>IQFeed</value></setting>
  8. save file and restart glean
  9. Make sure this connector is started prior to running your design.
  10. In Live signals or Live Trading view, you can verify that desired feed is being used via the activity log (Ctrl+L) :
    1. 125106: user selected data source: InteractiveBrokers
    2. 125107: Using live provider: Other.  Found connector(s): InteractiveBrokers
    3. 125107: No ip addresses specified, attempting Windows IPC.
    4. 125107: preferred data not available: PracCore
    5. 125107: preferred execute not available: PracCore
    6. 125107: found alternative feed: InteractiveBrokers
    7. 125107: found alternative exec: InteractiveBrokers
    8. 125107: DataFeed: InteractiveBrokers 0
    9. 125107: Executions: InteractiveBrokers 0