T29 Simple Breakout Bot
Overview
An auto-trader assistant bot to help with entering trades where one wishes to enter on a breakout from a range. Often this involves waiting for price to breakout from one of the range (either from the top or the bottom).
How Does it Work
User sets reference to signal
User sets reference to long entry price
User sets reference to short entry price
User sets the entry quantity
When signal is fired the following happens:
- Buy Stop entry order is placed above at the long entry price
- Sell Stop entry order is placed below at the short entry price
These entry orders are placed as OCO's. When one gets filled, the other will get canceled.
SC Trade Window definitions are used for setting attached orders for the exits.
Once a trade triggers, no more trades are taken till flat. All further signals are ignored.
Automated Entry vs. Manual (Enter Now)
There are two ways in which entry orders can be placed:
Automated - User sets an "Entry Signal Reference". When the signal fires, orders will be placed. The bot must be enabled
Manual - At any time, users can press the Enter Now button. This will cause orders to be placed at the long and short reference prices (same as if there was a signal)
Enable button - this button is used to switch automated entries on/off. when green and reads "Enabled", automated entries are turned on. When gray and reads "Disabled", automated entries are disabled and signals will be ignored
Entry Offset
Users set the entry prices by setting the long and short price references.
Entry Offset (in ticks) can be used to add another offset to the reference. This is convenient for example to create an entry level that is X ticks above the high, x ticks below the low.
Entry price calculations
long_entry_ price = long_reference_price + offset
short_entry_price = short_reference_price - offset
So with a positive offset value, the entry price is moved further away
Users can also set the offset to a negative value in which case the entry price is moved closer so to speak
Inputs
Entry Signal Reference - reference to a subgraph - when this subgraph has non-zero value, entry orders are placed
Long Entry Price Reference - Reference to subgraph - Buy Stop order will be placed at this price level
Short Entry Price Reference - Reference to subgraph - Sell Stop order will be placed at this price level
Entry Offset - see comment above
Enter On Bar Close - when "yes", bot will wait for bar close. At bar close, if there is an entry signal, orders will be placed
Auto Enable at Start Time - when "yes", at Start Time, if the bot is currently disabled it will automatically enable itself. The main use case for this is when "Auto Disable After Entry" is enabled. Using the two together one can configure the bot to trade continuously across multiple session while taking a single trade per session.
When Are Signals Ignored
Signals are ignored in the following situations:
- If price is outside the range (i.e., above the long entry price or below the short entry price)
- If there is an open position signals will be ignored