Adding and managing strategies: Difference between revisions
Created blank page |
No edit summary |
||
| Line 1: | Line 1: | ||
To add a strategy you need to press Add Strategy button an the bottom of the list in '''Strategies''' section and select the required strategy from the drop-down menu in the dialog window. For Lock strategies there is an option to create a single session (1 account) strategy. | |||
[[File:Ss.png|left|frameless|767x767px]] | |||
After you selected strategy pressed OK pop-up window will appear offering to create a symbol list from template. If you accept it you will be able to select one of the available templates. Click the desired template to add it. | |||
[[File:Ss1.png|left|frameless]] | |||
[[File:Ss2.png|border|frameless|305x305px]] | |||
On the next step you will see strategy window that contains several buttons and tabs: | |||
'''''Buttons:''''' | |||
'''Apply changes''' – allows to apply changes when parameters in Settings tab are modified | |||
'''Run''' – starts strategy | |||
'''Close All''' – allows to close all open position in one click. | |||
'''Clear All''' – clears all orders and position from strategy memory. | |||
'''View log''' – opens log window | |||
'''Launch on startup''' - allows to automatically start the strategy on the software startup. | |||
[[File:Ss3.png|left|frameless|744x744px]] | |||
'''''Tabs:''''' | |||
'''Instruments and orders –''' contains trading instruments settings. Detailed description of the parameters can be found in corresponding strategy section of this manual. | |||
'''Logs –''' opens strategy performance log. | |||
'''Settings –''' contains global strategy settings. Detailed description of the parameters can be found in corresponding strategy section of this manual. | |||
In the bottom half of the strategy window you can see orders section where you can find comprehensive information about open and closed orders. | |||
'''Opened orders''' – contains list or open orders | |||
'''Closed orders''' – contains list of closed orders. | |||
After creation strategy is added to the list of strategies in Strategies section that provides quick access to the most essential information about strategy and to Equity manager. | |||
[[File:Ss4.png|left|frameless|1121x1121px]] | |||
Here you can enable or disable strategy, check it's status, error notifications, number of open orders, configure equity manager, check current profit status, access to settings, stop, start, clone or remove it. | |||
== '''MAPPING INSTRUMENTS''' == | |||
Symbols in latency arbitrage strategies should be set in fast feed session format (BJF feed or session you are using as a fast feed instead). | |||
But it often happens that brokers which are used as slow have different symbols format, for instance, symbols with suffixes (EURUSD.r) or with completely different spelling (GOLD instead of XAUUSD, GER40 instead of GDAXI etc.), and to make them work properly you will need to set mapping. | |||
[[File:M.png|left|frameless]] | |||
[[File:M1.png|border|frameless|363x363px]] | |||
For this purpose each strategy except Hedge and has mapping field or fields in setting tab. | |||
Suffix field in mapping section allows to apply necessary suffix to all the slow broker symbols at once. | |||
But if part of the instruments has suffix and the other part doesn't, or has a special symbol format, you will need to specify mapping in mapping field, separately for each instrument. | |||
Each mapping should be set in a separate line and in the following format: | |||
'''Symbol name on a fast feed=Symbol name on a slow broker''' | |||
Example: | |||
[[File:M2.png|left|frameless]] | |||
'''XAUUSD=GOLD''' | |||
'''GDAXI=GER40''' | |||
Mapping field has priority over suffix field. So if both fields are filled it will apply special mapping for symbols listed in mapping field and suffix to all the rest instruments. | |||
== '''RISK MANAGEMENT''' == | |||
In Strategies section yo can configure equity management parameters for each session: | |||
[[File:R.png|left|frameless|907x907px]] | |||
'''Equity manager''' – enables or disables equity manager | |||
'''Units''' – allows to set units for equity calculation | |||
'''Max profit''' (adjustable) – target profit. Once hit, strategy is disabled from trading. | |||
'''Max loss''' (adjustable) – maximum allowed loss. Once hit, strategy is disabled from trading. | |||
'''Initial equity''' – shows initial equity for strategy. For strategies that involve 2 or more accounts it displays sum of account equities. | |||
'''Current equity''' – displays current strategy equity. For strategies with 2 or more accounts it shows sum of account equities. | |||
'''Loss border''' – calculates and displays strategy global SL based on the Max loss value. | |||
'''Profit border''' - calculates and displays strategy global TP based on the Max loss value. | |||
'''Current PnL''' – displays current equity change. | |||
== '''LOGGING''' == | |||
SharpTrader provides comprehensive logging of accounts connections and trading activity. | |||
In sessions section you can get access to Quote and Trade connections logs for corresponding account by double-clicking on connection indicators. Here you can find full information about connection status and and errors. | |||
[[File:L.png|frameless|628x628px]] | |||
In the Logs tab strategy window you can check strategy performance logs or click '''View log''' button to open logs in a separate window. | |||
Performance logs contains full information about arbitrage deals, trading conditions, like execution time and slippage, and errors. | |||
[[File:L1.png|left|frameless|623x623px]] | |||
'''Orders''' section stores comprehensive information about all open orders on all strategies. | |||
Search by order status, period, session, strategy or ticket allows to easily find the necessary information for review and analysis. | |||
[[File:O.png|left|frameless|628x628px]] | |||
== '''BRIEF STRATEGIES OVERVIEW''' == | |||
Based on the core logic SharpTrader strategies can be divided into 3 groups: | |||
'''''Latency arbitrage based:''''' | |||
'''Latency (1-leg)''' – classic latency arbitrage strategy based on latency difference between fast and slow broker. | |||
'''Lock CL2''' – advanced latency arbitrage strategy that uses 2 accounts with opposite opposite positions on each (lock). It enters arbitrate deal by closing position on one accounts and then reopens it on a different account to camouflage arbitrage activity. | |||
'''Lock''' – modification of CL2 that opens initial lock by arbitrage signals and than closes both positions after a specified time or at a specified distance from entry price. | |||
'''Lock CL''' – modification of CL2 for netted accounts that does not open hedging positions on the same account and close both positions after each 2<sup>nd</sup> arbitrage signal. | |||
'''Lock CL3''' – modification of CL2 that allows to set 'active' and 'passive' accounts and enter arbitrage deals only on active one. | |||
'''Bright Trio''' – latency arbitrage strategy for 3 accounts, it does not open hedging positions on the same account and switches account for hedging position after each arbitrage entry. Provides even better camouflage effect. | |||
'''Bright Duo''' – the most sophisticated strategy lock strategy with partial closing. When it detects arbitrage signal it partially closes position and creates up to 3 virtual orders with different trailing parameters depending settings. As closing conditions are met for these virtual orders it closes parts of real position on opposite side. Trading pattern with partial closing looks very similar to swing trading. | |||
'''''Hedge arbitrage based:''''' | |||
'''Classic Hedge''' – compares 2 different accounts between themselves. Fast feed is notifications used. | |||
'''Multi Hedge''' – compares multiple accounts between themselves | |||
'''''Auxiliary:''''' | |||
'''Statistical''' – based on the historically strong correlation between two financial instruments, for example, WTI and Brent, DE30 and F40, Amazon and Apple. Users can set a period for correlation determination, timeframe, and strong correlation level. The software sells strong and buys weak instruments when their correlation diverges beyond a certain level. | |||
'''Triangular''' – Triangular arbitrage is based on a discrepancy between three foreign currencies, for instance, between EURUSD, GBPUSD, and EURGBP. A triangular arbitrage opportunity occurs when the exchange rate of a currency does not match the cross-exchange rate. | |||
'''L-pouring''' – developed to move funds between accounts, for instance from problem one to the one where withdrawal is available. It opens 2 hedging orders based on arbitrage signal statistics that allows with good chances to open positions in proper directions in order to move funds to the required account. | |||
Revision as of 16:51, 4 September 2023
To add a strategy you need to press Add Strategy button an the bottom of the list in Strategies section and select the required strategy from the drop-down menu in the dialog window. For Lock strategies there is an option to create a single session (1 account) strategy.

After you selected strategy pressed OK pop-up window will appear offering to create a symbol list from template. If you accept it you will be able to select one of the available templates. Click the desired template to add it.

On the next step you will see strategy window that contains several buttons and tabs:
Buttons:
Apply changes – allows to apply changes when parameters in Settings tab are modified
Run – starts strategy
Close All – allows to close all open position in one click.
Clear All – clears all orders and position from strategy memory.
View log – opens log window
Launch on startup - allows to automatically start the strategy on the software startup.

Tabs:
Instruments and orders – contains trading instruments settings. Detailed description of the parameters can be found in corresponding strategy section of this manual.
Logs – opens strategy performance log.
Settings – contains global strategy settings. Detailed description of the parameters can be found in corresponding strategy section of this manual.
In the bottom half of the strategy window you can see orders section where you can find comprehensive information about open and closed orders.
Opened orders – contains list or open orders
Closed orders – contains list of closed orders.
After creation strategy is added to the list of strategies in Strategies section that provides quick access to the most essential information about strategy and to Equity manager.

Here you can enable or disable strategy, check it's status, error notifications, number of open orders, configure equity manager, check current profit status, access to settings, stop, start, clone or remove it.
MAPPING INSTRUMENTS
Symbols in latency arbitrage strategies should be set in fast feed session format (BJF feed or session you are using as a fast feed instead).
But it often happens that brokers which are used as slow have different symbols format, for instance, symbols with suffixes (EURUSD.r) or with completely different spelling (GOLD instead of XAUUSD, GER40 instead of GDAXI etc.), and to make them work properly you will need to set mapping.

For this purpose each strategy except Hedge and has mapping field or fields in setting tab.
Suffix field in mapping section allows to apply necessary suffix to all the slow broker symbols at once.
But if part of the instruments has suffix and the other part doesn't, or has a special symbol format, you will need to specify mapping in mapping field, separately for each instrument.
Each mapping should be set in a separate line and in the following format:
Symbol name on a fast feed=Symbol name on a slow broker
Example:

XAUUSD=GOLD
GDAXI=GER40
Mapping field has priority over suffix field. So if both fields are filled it will apply special mapping for symbols listed in mapping field and suffix to all the rest instruments.
RISK MANAGEMENT
In Strategies section yo can configure equity management parameters for each session:

Equity manager – enables or disables equity manager
Units – allows to set units for equity calculation
Max profit (adjustable) – target profit. Once hit, strategy is disabled from trading.
Max loss (adjustable) – maximum allowed loss. Once hit, strategy is disabled from trading.
Initial equity – shows initial equity for strategy. For strategies that involve 2 or more accounts it displays sum of account equities.
Current equity – displays current strategy equity. For strategies with 2 or more accounts it shows sum of account equities.
Loss border – calculates and displays strategy global SL based on the Max loss value.
Profit border - calculates and displays strategy global TP based on the Max loss value.
Current PnL – displays current equity change.
LOGGING
SharpTrader provides comprehensive logging of accounts connections and trading activity.
In sessions section you can get access to Quote and Trade connections logs for corresponding account by double-clicking on connection indicators. Here you can find full information about connection status and and errors.
In the Logs tab strategy window you can check strategy performance logs or click View log button to open logs in a separate window.
Performance logs contains full information about arbitrage deals, trading conditions, like execution time and slippage, and errors.

Orders section stores comprehensive information about all open orders on all strategies.
Search by order status, period, session, strategy or ticket allows to easily find the necessary information for review and analysis.

BRIEF STRATEGIES OVERVIEW
Based on the core logic SharpTrader strategies can be divided into 3 groups:
Latency arbitrage based:
Latency (1-leg) – classic latency arbitrage strategy based on latency difference between fast and slow broker.
Lock CL2 – advanced latency arbitrage strategy that uses 2 accounts with opposite opposite positions on each (lock). It enters arbitrate deal by closing position on one accounts and then reopens it on a different account to camouflage arbitrage activity.
Lock – modification of CL2 that opens initial lock by arbitrage signals and than closes both positions after a specified time or at a specified distance from entry price.
Lock CL – modification of CL2 for netted accounts that does not open hedging positions on the same account and close both positions after each 2nd arbitrage signal.
Lock CL3 – modification of CL2 that allows to set 'active' and 'passive' accounts and enter arbitrage deals only on active one.
Bright Trio – latency arbitrage strategy for 3 accounts, it does not open hedging positions on the same account and switches account for hedging position after each arbitrage entry. Provides even better camouflage effect.
Bright Duo – the most sophisticated strategy lock strategy with partial closing. When it detects arbitrage signal it partially closes position and creates up to 3 virtual orders with different trailing parameters depending settings. As closing conditions are met for these virtual orders it closes parts of real position on opposite side. Trading pattern with partial closing looks very similar to swing trading.
Hedge arbitrage based:
Classic Hedge – compares 2 different accounts between themselves. Fast feed is notifications used.
Multi Hedge – compares multiple accounts between themselves
Auxiliary:
Statistical – based on the historically strong correlation between two financial instruments, for example, WTI and Brent, DE30 and F40, Amazon and Apple. Users can set a period for correlation determination, timeframe, and strong correlation level. The software sells strong and buys weak instruments when their correlation diverges beyond a certain level.
Triangular – Triangular arbitrage is based on a discrepancy between three foreign currencies, for instance, between EURUSD, GBPUSD, and EURGBP. A triangular arbitrage opportunity occurs when the exchange rate of a currency does not match the cross-exchange rate.
L-pouring – developed to move funds between accounts, for instance from problem one to the one where withdrawal is available. It opens 2 hedging orders based on arbitrage signal statistics that allows with good chances to open positions in proper directions in order to move funds to the required account.