New Order
Last updated May 19, 2024
New Order Story Item is where any new orders are configured and executed within TradeStory. This is a sophisticated item that allows for many different order types and configurations.
By default, when adding this item, it sets up a basic market buy order, which you can configure from there.
By clicking on the Order Type (in this case BUY MARKET), it brings up the order configuration toolbox on the right where you can change order types, add stop loss/take profit, and trailing stops.
Order Type: There are many different types of order depending on your broker. TradeStory attempts to standardize these order types and provides you with the same interface when building strategies across multiple brokers and accounts. You have Market Buy/Sell, Limit Buy/Sell, Stop Buy/Sell order types.
(note) - we are adding other types coming soon - OCO (one cancels the other).
You can add a Stop Loss and a Take Profit configuration to your order by selecting the checkboxes. You can also select a more complex trailing stop loss configuration if you wish also.
Async: Select this if you want the order to be executed in the background without your story item waiting for it to finish executing.
Stop Loss & Take Profit Configuration
When selecting a stop loss or take profit in the options, you have the option to configure using a number of different units.
Absolute Price (sl/tp at specific price)
Relative Price (sl/tp at specific price value in relation to current price)
Relative Pips (sl/tp at specific number of pips distance in relation to current price)
Relative Points (sl/tp at specific number of points distance in relation to current price)
Relative Balance Percentage (sl/tp set at distance where the size of your trade results in % of balance risk).
The selected configuration sections will be added to your Order story item as value Data Items where you can enter the value directly here or refer to other data Items:
Setting a Reference for your order.
When TradeStory places an order, if you wish to modify it or close it later using other Story Items, you must set a reference for the order so that you can identify it later. This can be set in the REFERENCE section of the order item.
By clicking on the green ‘plus’ icon in the STOP LOSS or TAKE PROFIT section, you can refer to other type of data items.
For example, if your Story is running in response to a Webhook received from Tradingview that contains specific data about where your stop loss should be set you can refer to Webhook data in the STOPLOSS section:
Setting a Trailing Stop:
By default, when selecting a trailing stop configuration, TradeStory adds a basic 20 point relative trailing stop, which you can configure from there. By clicking on the Distance title, you can setup more advanced settings.
Distance Trailing stop works in exactly the same way as a fixed stop in its Units - except that it will trail with live price movements by the number of units you specify.
Threshold Stop: When selected allows you to set up different thresholds (or steps) to allow for more complex trailing rules.
The Trailing Stop section of your story item will change to allow you to add any number of steps.
To add more steps, click on the pink ‘plus’ icon. You can remove steps by clicking on the pink ‘trash bin’ icon.
To see how to configure your volume based on % balance/equity risk, or a fixed risk amount, see Data Item: Volume Fixed Risk Calculator and Data Item: Volume % Risk Calculators