In my previous article, I discussed how to backtest a strategy using the expired contract data. This is a step-by-step guide for all new users and in this article, we are going to talk about what actually happens when a strategy deployed using Streak, i.e order flow. It is assumed that you have already gone through the process of backtesting a strategy and you deployed the strategy.
After you deploy the strategy, the strategy will move to the ‘Waiting’ state. These are the series of events that can occur –
- Streak will check the strategy condition, periodically. If your strategy has a timeframe of 5 min, the system will keep checking the strategy conditions after every 5 minutes.
- When your condition is met an Entry notification will be sent to your web browser or the Streak mobile app
- Once you receive the notification, only three things can happen, you can either
If you do not take any action, i.e ignore, the strategy will remain in the ‘Waiting’ section and wait for the user to take action.
Here, it is important to mention that the notification that is sent to a user can be viewed in two places i. Notification pane ii. Deployed section. The actionable notification in the notification pane will get deactivated/ non-responsive after 5 minutes. But you in case the user goes to the strategy ‘Waiting’ section and takes action on the notification it will get processed.
If you reject the order notification by pressing ‘cancel’, the strategy will be stopped immediately. And in case, you click and act upon the notification an order will be sent to the exchange to be processed. On execution of the order, the strategy will move to the ‘Entered’ section.
As a risk management measure, an Sl-M notification is sent immediately when the Entry order gets executed at the exchange and the strategy moves to the ‘Entered’ section. After the SL-M notification is sent. You will either
Rejecting an SL-M notification will not stop the strategy. Ignoring or rejecting the SL-M notification will have the same result.
If you accept the notification, an SL-M order will be placed and it will be waiting at the exchange orderbook to be triggered when your stop loss level is met. Once the stop loss level is met, the SL-M will get executed and the active position will be exited and the strategy will be stopped.
Now, if the stop loss level is not triggered, the strategy can exit because of the following reasons
- mandatory Square Off
- Target/Exit condition is met
If the Target/Exit condition is met, an order notification is sent, once accepted, the order is placed for execution. After the order is executed, the active position will be exited and the strategy will be stopped.
Note: Remember to cancel the SL-M once the Target/Exit condition is executed.
Now finally, let’s talk about a situation where you are not placing SL-M. In case you don’t accept the SL-M order when your SL or Target or Exit condition is met you will receive an actionable notification for the same. Once you act on the notification, an order will be sent to the exchange to be executed. After execution, the position will be exited and the strategy will be stopped.
Note: the startegy cycle here has been assumed as 1 i.e. one entry followed by one exit. In case the strategy cycle is greater than 1, the strategy will move to ‘Waiting’ state after a successful completion of one whole cycle.
Hope this was helpful. Let me know if there are any other topics, you want me to write on. If you have any feedback please write to firstname.lastname@example.org or mention it in the comments section below.