Octopi Trader User Guide

Version 100+ Usage guide

Summary

Summary

New in OP V100

Version 100+ is now a “Strategies” centric builder. Signals, Orders, Studies (formerly Custom Studies), and a NEW “Variables” feature are no longer a prerequisite to begin creating strategies - everything is accessible within the Strategies window. Interface has gone through rounds of optimization: less user clicks, more intuitive button locations, reduction of redundant actions, etc.

What's new?

What's new?

New Feature Highlight

New functionality: 

Operations

Main Interface "Operations" tab

Operations

Operations

Picture2.jpg

Edit Configurations Opens separate config management interface. Buttons are self-explanatory, but I will list some of the usage to help with purpose behind this:


Activate Saves and Compiles any configuration changes to both local config file and Sierra Chart Octopi Trader study for execution. You must do this any time you make changes.


Save is useful to save progress that may or may not be able to be Activated. This will save your config, even if it has errors and does not activate, allowing you to work out the errors and not lose progress before Activation.


Activity Log Open
opens Octopi action log that is designed to help you identify the exact sequence of events that took place during trade execution. This is a notepad file we keep inside of the SC directory to help with tracking and troubleshooting.

Operations

Operations Experimental

SC Control allows users to control Sierra Chart replays by creating and saving custom replay profiles. Requires setup.

SC Control setup: Inside SC, go to Global Settings -> Sierra Chart Server Settings -> UDP Port -> set value to 6420. Next, go to Studies -> Add Custom Study -> Octopi Controller -> Make sure it’s added as the top-most study on the list. If set up correctly, SC Control window will display Controller status “Connected” and Replay status like below:

SCControl.png

SC Control Usage:

SCControl-EditReplayProfile.png

Operations

Log and Monitor

Log and Monitor allows live (or near-live when replay speed is too fast) asynchronous OP status logging and monitoring for both automatic internal status messages as well as user-configured values, studies, and custom conditions.

Activity Log tab mirrors information we put into the Activity Log file mentioned above, but this is done without interrupting SC replay process for maximum performance. 

Signal/Studies Monitor is for tracking user-configured monitoring. Examples below, more on this later (and probably in a video) 

Examples of user-configured monitors inside “Signals” via Highlight -> Right Click Menu:

Example 1 monitors a SC study subgraph value:

image8.png

Example 2 monitors a condition inside the bracket (0 and 1 for true and false)

image20.png

Resulting monitor looks like this:image23.png

Operations

Trade Policies

image13.png

Global Max Risk sets maximum global (across all strategies within the same configuration) risk in POINTS. Risk is calculated based on each strategy's order sum of STOP order points.
Example: Two strategies entering at the same time, each with order of two contracts configured with 10 points stops will result in 40 points of risk. Limiting Global Risk to 30 points will do one of two things: prevent Strategy 2 from entering at the same time as Strategy 1, OR trim Strategy 2 order to only one contract out of two (See Order Trimming within Strategies). 


Trade Protection is a Live-trading feature that detects gaps outside of defined order brackets and queues order for market exit. We recommend using this when you go LIVE. 


Global Trading Sessions allows configuring global order execution times, as well as cancel/flatten actions for each. See example below to trade from 8AM to 11AM and Cancel any pending orders at 11, then resume trading at 1PM through 3PM canceling and flattening all positions at 3PM:

image25.png

We recommend setting this to Trade 24 Hours and limiting Strategy execution window as well as creating planned exit signals. This is a secondary layer tool by design but can be used as primary if you must. 


Reserved Bars sets a minimum number of bars for SC to replay from the start of the chart to allow for necessary studies to “come of age” before being used for Signal calculations. Example: If your signal is to wait for SMA 50 to cross SMA200, you should set this value to a minimum of 200. For 200 bars OP will not do anything, then will begin execution. 


ATBB Replay Time Sampling allows Auto Trading Bar Based Replay (ATBB button in Sierra Chart)

Operations

Sierra Chart

image17.png

Helper buttons to resolve issues.

One Resets Sierra Chart Controller study

Other finds and Ends Process for affected stuck Sierra Chart process without having to go though Task Manager and looking for specific instances.

Operations

Settings

image6.png

Instance Name sets the window name. Useful when running multiple Octopi to keep organized. image14.png

Layout lets you Set and Apply (Open and re-place to Set Locations) all of the Octopi Windows you work with such as Controller, Monitor, and Main window.

Compiler location setting for advanced users that keep your compilers elsewhere. 

Update Current and Pre-release - only go to Pre-Release if you’ve been instructed to or if you are adventurous. We don’t support Pre-Release versions for anybody other than the users we are working with to test these. If you upgrade and run into issues it’s on you!

Statistics exports data for QuantAnalyzer to use. See post about it here: https://discord.com/channels/1207787953116553279/1312635388489105418/1355999901846212892


Tags This setting is to automatically tag Signals and Studies that get created in the process of making Persistent Variables. Helps you identify what you’ve created inside of Signals or elsewhere vs Signals created for the purpose of setting/resetting/etc of Variables. Keep this on, or don’t - your call.

Strategies

Main Interface "Strategies" tab

Strategies

Strategies (Main)

Strategies are the center of Octopi execution. Most items involved in making one can now be created within, so for this reason I will only elaborate on items specific to Strategies window, and zoom in to individual components within their own section of this manual. I won’t cover obvious items such as Strategy Name or Enabled checkbox.

image1.png

Start Time End Time allows your Strategy to execute ENTRIES during the specified time windows. You can configure multiple entry execution windows, but end time does not mean it will exit! It only means that it won’t enter past the End Time and exits must be managed by either Signals/Modifications or Global Trade Sessions under Trade Policies Tab of Operations window. 

C1,C2,and C3 buttons allow you to quickly remember a configured time window (such as 08:30 to 12:30) by pressing Set after setting the time first. These buttons' memory is kept throughout the rest of Strategies, so if you want to use the same time frame in Strategy 2, just press “C1” to apply 08:30 to 12:30 to the interface.

YOU MUST HAVE AT LEAST ONE CONFIGURED TIME FRAME OR STRATEGY WILL NOT ENTER!

Entry Signal, Order Setup - these will have their own section, but Signal is the reason for your trade to enter and Order is the bracket order OP will use to enter your trade.

Trade Position

Order Entry Type - Octopi will auto-determine order type (Market, Limit, Stop) based on Entry Price configured below, so the user does not have to. 

Current Price selected under Entry Price will trigger a Market order.

Limit or Stop will be used depending on Long vs Short configured above combined with entry price relative to target.
If you want to force limit/stop order instead of Market near current price, use Current Price Entry Price field with Entry Price Offset set to nearest tick up or down field below Entry Price

Risk Management - allow setting up maximum risk calculated based on sum of order stop values. If total calculated risk at the time of entry exceeds configured parameters, the strategy will not enter. 

Allow Order Trimming checkbox allows for partial entries. It will calculate risk across all configured Stops and only allow to trade the Target/Stop pair that fits under the configured risk parameter.
Example: Risk Management setting is 25, Order has 3 dynamic stops equal to ATR value. 

 If ATR value is currently 5, maximum strategy risk is 15, entry is allowed with all 3 targets/stop pairs. 

 If ATR value is currently 10, maximum strategy risk is 30, only target/stop 1 and 2 pairs are allowed to enter. Target/Stop 3 will be trimmed off.

Strategies

Strategies (Plugins)

image7.png

Overall, there are three types of Plugins available categorized by time of effect: Placement, Pre-Fill, and Post-Fill. Each category will work at an appropriate time only. There is a column for Available vs Active to separate which plugins have been configured for specific Strategy. You may use Add >> or << Remove buttons, as well as double-click to check and configure Actively selected plugins.


Last Target Runner - converts last configured target (dynamic, see Order Trimming above) to take a larger configured target to allow for “runner”. 

Example: order configured for 5 contracts, Max Risk allowed 3 contracts to enter, this plugin will take 3rd target and change it’s value to configured plugin value. 


Cancel After Time - cancels strategy entry at expiration of configured number of bars since entry request. This will work with Renko bars as well.


Cancel Trade Signal - allows to cancel placed trade before it gets filled if any of the configured cancellation signals match. You can have multiple. 


Exit After Interval - configurable trade exit after N number of bars. Good for strategies that should not be in more than N bars even if target/stop wasn’t reached yet. 


Trade Cooldown - Prevents consecutive entries of the same strategy for configured number of bars or time.

Orders

Main Interface "Orders" tab

Orders

Orders

All orders OP manages MUST be created in pairs (target/stop). This feature/design does not restrict users from trading unknown target/defined stop fat tail strategies (more on this later).

image3.png

Usage: Similar to SC, click Add x 2 to add a pair of Target / Stop. Highlight Target or Stop to change configuration. By default, Smart order type is used -  we recommend keeping it that way for Market/Limit/Stop configuration that gets auto-determined at Strategies level. The order types will be added later based on individual needs. Sierra has dozens of orders, we don’t intend to just add them all here for the fun of doing it, but will do so if users need specifics such as Limit Chase or others Sierra offers. 

Significant portion of Octopi benefit comes from the following order Value field, I will describe significance of each:

image22.png


Different Stop types are included. Configure them as you would your SC bracket order:

image19.png

Signal Builder

Main Interface "Signals" tab

Signal Builder

Signals

Signals are the core of any strategy. They return a True when all of the conditions described inside the signal are met. You can also configure a signal to return True if only some conditions are met, or specifically 3 out of any 5 conditions, etc. Anything is possible within a signal with built-in no-code builder and a freestyle code window. 


There are four main sections to the Signal builder to be familiar with:

image12.png

  1. Menu of items that can be included into signal logic
    • Applies Studies includes all of SC studies applied to the chartbook OP study is attached to.
    • Bar Values allows to reference OHLC of any chart bar. 0 = current, -1 = prior, -2 =  one before prior, etc. Example: Value of two bars ago Close:
    • Trade History allows to reference current trade items placed by the strategy using this signal (fill bar index, entry price, target/stop information. This is useful to create order exit or modification signals. 
    • Helper Variables more on this in it’s own section, but allows to use SC Aliases and Persistent Variables inside trade signals
    • Signals allows to reference other signals. Useful to create multiple simpler signals and then combine them into one instead of creating a very complex single signal that is difficult to track
    • Order Components allows sampling current order components for trade modification signal creation and other needs. 
  2. Included Variables that have been selected to take part in the current signal. 
    • Green rows are static and can be used for their designated task in Condition Builder (below).
    • White rows are studies and components the user selected to be part of the signal from menu 1). Example: Two bars ago close value added to Included Variables
  3. No-code Condition Builder allows users to double-click through variables, brackets, and comparative operators on the right to create entry signals. Example: 2 bars ago close is greater than 3 bars ago close:
  4. Resulting Signal Logic code. This is a freestyle C++ window that can (and should) be populated by condition builder above to avoid mistakes, but allows user to create any signal code they want, provided it follows C++ language rules.Example: If current time is greater or equal to 3:45PM, trigger the signal:




Custom Studies

Main Interface "Studies" tab

Custom Studies

Studies

Studies are very similar to signals, except Signals return a True or False, Studies return a Value. These values can be used as trade entries, or order components, or anything else where calculating a custom value is needed in trading. Examples include Studies for Opening Range + 3 x ATR or a value difference between the last 2 bar closes. We encourage keeping Signals in Simple mode unless you are an advanced user and know how to code. Example of a Signal that returns value of SC study Subgraph “Close” minus 10 points:

Variables

Main Interface "Variables" tab

Variables

Persistent Variables

Variables, or Persistent Variables are made to further unlock configuration potential by allowing users to create custom values that take user-configured values based on signals. This is a more advanced menu and we don’t encourage diving in unless you have a specific need and have been directed by support to use these. 

Variables are Set to a value via any Signal, either ones already configured, or a new one. Same Variables are then kept (persistantly) until Set again (or reset) but different signal. In the sample below we set a Variable named Test Var to 1 when NQ_3B_Long signal is matched, and then we set it to 2 when Signal EOD is matched. 

Variables can be used inside of Signals as additional logic bits for entry, exit, or modification of trades.

 

Tags

All interface windows "Tags" tab and buttons

Tags

Tags

Tags serve a purely organizational purpose. You may create multiple logical tags, tag your Strategies, Signals, and Studies to filter out only what you want to see using the Tag menu on the left. 

To create, simply go to Tags -> New -> Give your tag a name and a color


To assign tags to config items, look for Tags button on lower right corners of Tag-able item configurators as in Example below: