G-BOT QUICK START
Here we see how to get the G-BOT Platform immediately rolling. In other sections
we will examine some aspects in more details.
I assume you have done all indicated in the install
instructions. In particular, make sure you have checked the ActiveX in the TWS API settings
and have bypassed all "precautions". If using the Gateway, use the API access option (not FIX)
when starting the Gateway for the first time.
1. Run the Gateway (or TWS) making (I assume you have already configured the API settings as
explained in the install notes)
2. Run G-BOT
Method 1: Start trading using a non-scheduled start
1. Click on the button "Connect" to
connect to the to the Gateway (or the TWS) through the port specified in the API
settings (default: 7496
for TWS, or 4001 for Gateway. You can click one of the two small icons below the
port number, to automatically set the default port number).
2. Click on the button "Start or Add".

The monitor panel will open, showing the prices arriving, tick by tick.
Allow a few minutes before price curves take form.
In the meantime G-Bot will be analyzing the data feed to gather some useful
information.
G-Bot session file is saved in a temporary folder in the "Documents"
folder. The full path is shown on the "Start Live trading" tab.
The G-Bot temporary folders can be deleted at any time, as G-Bot will recreate
them anytime it resaves the session file (which happens at any fill event or
periodically, in any case).
The session file can be used to resume any interrupted session.
Method 2: Start trading using a scheduled start
1. Click on the button "Connect" to
connect to the TWS or to the Gateway through the port specified (default: 7496
for TWS, or 4001 for Gateway. You can click on one of the two small icons below the
port number, to set the default port number)
2. Setup the start time and check the radio button ("Scheduled start")

How to run G-BOT, and when to close it
G-Bot can be let run 24/7, day
and night (including when market is closed). In
case (for computer maintenance) you can shut it down (leaving the
position open at the end of the week, to resume the session when market reopens
on sunday). G-Bot must never be closed for any reason different from the precise
intention of closing the trading session.
New instruments can always be added dinamically, while trading. This can be done
by adding new symbol strings (you can just copy and paste for most symbols,
possibly adjusting expiry dates and strikes for options) in the symbol file and clicking on "Start Add".
The symbol file can be opened and edited by clicking on the "Edit symbols"
button, on the start up tab.
To remove an instrument
already running, use the top right button "Quit instrument" in the
trading monitor. Note that editing instruments symbols in the symbol list has no effect
on the instruments being traded: the symbol list has the only purpose to be
used to launch and add new instruments.
IMPORTANT: G-BOT computations are independent of TWS: no account information is ever used for trading
One very crucial thing to bear in mind that the position, P&L and other figures
shown by G-BOT are only related to the orders it has executed on the current
instruments (in the current session) in the current instance.
G-BOT makes its computations completely independently of TWS and it
knows actually nothing about the "actual" account state.
Example: If you run 2 different instances of G-BOT on the same account, if for
istance one has EUR long 2 contracts, and the other one has, also, EUR long 3
contracts, then in the TWS you will have 5 contracts.
It's important to understand that each G-BOT instance keeps it's own figures and
is completely self sufficient.
This is by design, because it allows running multiple independent
instances of G-Bot, with different (or similar) folios on the same account (or
different accounts).
(Further, it allows restoring a trading session after any
interruption, or to resume trading from another location.)
Let's make another examples to make sure this is clear.
- If you run 2 different instances of G-BOT on the same account, if for istance
one has EUR long 2 contracts, and the other one has also EUR short 2 contracts,
then in the TWS you would have a position of 0 contracts (algebrical sum).
- If you have EUR long 2 contracts, and manually, in the TWS, you close this
position, G-BOT, will know nothing about it. If G-BOT, later, is allowed to
"close" this position (because you have not switched it to "manual"
mode), then the IB account will show 2 contracts short.
So, all computations are relative to the orders actually executed by G-BOT in the current instance and
based on the tickdata received realtime through the TWS.
G-BOT does not take or use any account information for trading.
[Only the account margins
or account info can be optionally just "shown" (for user
convenience),
and in such a case those are info directly reported by IB.
So if
multiple robots are working on the account or you have other position opened
manually with the TWS, keep in mind those figures are for the whole account,
just as
reported by the TWS.
G-BOT does not use this information for its operation.
No user account information is ever used by G-BOT for
trading:
everything is striclty self contained within each instance.]
The PNL shown by G-BOT is "net", in the sense that its meaning, at any time, is what it is actually pocketed by closing all positions, at that precise instant. It is "net" of spread and commissions. It is computed based on the current bid/ask, assuming that a limit order would be able to close the position at the current bid/ask.
We will not go into eccessive details in our explanation as the traders using G-Bot are necessarily smart ;-)
Menu and Folio Monitor
Right clicking the mouse on the trading monitor, will show a large context menu,
where you can have access to several features.
One useful feature is the Folio Monitor, which as trading progresses
will provide statistics about the current folio (images can be moved by left
click and dragging, or resized by right click and dragging). A
shortcat to the same panel can be found as an icon, below the the trading
monitor.

Meaning of some symbols and colors
In the "Trading monitor" window, price curves are represented.
Balls, squares and triangles indicates orders.
Blue: BUY, Maroon: SELL ("manual" orders will have a lighter hue, compared to automatic orders)
Ball: position was 0 before order
Square: position was 0 after order
Triangle: remaining cases
In the "Global result window" the curves represent the 4 component of the
PNL decomposition.
PNL: Profit and loss (the same as computed by IB. G-Bot maintains
indepedent computations) Cyan Line
Gain: Outcome of "positive" scalps
Green Bold Dotted line
Loss: outcome of "negative" scalps
Dotted Red line
Unrealized: residual part of PNL
Cyan-Green Dotted line
Note that the definition of realized we use is different from IB (which is used
for taxes). We use an algorithm more suitable for algorithmic trading (a
specific lot identification criterion, instead of FIFO, which is a totally
arbitrary), which, by design, tends to maximize the realized component.
See this post where the algorithm is explained:
http://www.elitetrader.com/vb/showthread.php?s=&threadid=222126&perpage=6&pagenumber=6
Strategies
The "chess" icon under the trading monitor (or the strategy button on the start page will allow to change the "folio strategy"); this represents the strategic game played at folio level when no istrument-specific strategy is defined. In addition, to the folio strategy, each instrument can play a different specific strategy, selected through the instrument setting panel.
Go ahead exploring the functionalities associated with the other icons too, and in particular the order enqueuer.