⏰ Timer Template
📋 Description
Timer template is used to generate the trigger event based on Pre and Post Timer settings on Timer Square-Off Template for respective combination of Market Segment and Product Type. Once an event is generated respective action is taken as defined below.
Timer Template can be added in the combination of Market Segment + Product Type + DayName/Date. For same combination of (Market Segment + Product), Day Name Wise and Date Wise record is allowed to be added in single template.
Priority of validation is on “Date Wise” record and then “Day Name Wise” for same combination of Market Segment + Product Type.
⚙️ Timer Event Types
Pre-Timer Event
Action: Auto restrict the fresh position and restrict the position conversion of that respective combination (i.e. Segment + Product)
- System should allow to define the Pre square-off time in the format of HH:MM:SS.
Post-Timer Event
Action: System will auto generate the request for "Cancellation of Pending Orders" first and then generate the Square-Off Open Position request for respective combination (i.e. Segment + Product).
- On generating the Square-Off order for open position, system shall refer the "Default Base Exchange- Square-Off/Market Data" flag in Interop settings for the segments where Interop is ON and Square off Price Method and Square off LTP Percentage settings for square off price on Master Configuration.
🔗 Template Mapping
Mapping of a timer template to an Entity / Entity Profile / Entity Type can be done via Template Mapping option in the Template menu of ADMIN. Timer Template created here will be allowed to map to entities like Client, Dealer, Branch and Member as well as for users through the Template Mapping window.
📝 Template Creation
Square-off timing can be defined in the combination of Segment, Product and Day wise in template format. System should have following fields to create, view and fetch Template.
Template Configuration
Timer Templates can be added with combinations of:
- Market Segment + Product Type + Day Name/Date
For the same combination of (Market Segment + Product), Day Name Wise and Date Wise records can be added in a single template.
🎯 Validation Priority
Validation priority: Date Wise record → Day Name Wise record (for same Market Segment + Product Type)
Template Controls
| Control Name | Control Type | Business Logic |
|---|---|---|
| Template | Entry Field + Drop-down | Control Type: Entry Field + Drop-Down list. Should allow to enter the Template Name with Alpha Numeric and allowable Special Characters. Template Name should not be more than length mentioned in API. Duplicate Timer template name creation should not be allowed. Should display the list of Template Name on search of Key Name. System should fetch and display the available records in the Timer Square-off gird view as per the template name/id selected in this field. System should allow to create multiple Timer Square-off template with different template name. Within a single template, system should allow to create timer configuration for multiple segments and products. |
| Save | Button | On click of SAVE button, system should validate following conditions. Popup message should be displayed while on click of SAVE button without entering the template name. Popup String should be like “Template Name should not be blank”. |
| Save As | Button | “SAVE AS” option is used to create the copy of existing template with new template name with a small modification in the records available in the existing template (or) without any modification. “Save As” option should get enabled after selecting the template Name in the “Template” drop-down list. On Click of “Save As” button - system should popup a child Window with label as: “Template” and an entry field should be available to enter the ‘New template Name’ with “OK” and “CANCEL” options. If “OK” is selected, then new Timer template should get saved into the system with all Timer Parameters configured in the template else if “CANCEL” is selected then Child window should get closed without saving the record. System should validate the New template name with the existing templates available in the system, if same name is entered, then system should popup an alert message as “Template Name Already Exists”. |
🔧 Timer Square-off Rule Configuration
Combination Selection Controls
| Control Name | Control Type | Business Logic |
|---|---|---|
| Segment | Drop-down | Should display the list of Market Segment on basis of Exchange Category Id. (1 and 2). If license is updated with New Segment, same should display here in the Dropdown list. If Interop configuration key is ON - System should display the list of Segment available (All Equity, All FNO, All CDS, All Comm). If Interop configuration key is OFF - System should display the list of exchanges available (NSE EQ, BSE EQ, MSE EQ, NSEFAO, BSEFAO, MSEFAO). “All” option will not be available in the dropdown list. “All Equity”, “All FNO”, “All CDS”, “All COM” have the combined meanings as described in the HTML. |
| Product Type | Drop-down | Should display the list of Product types available in the system. If New product type is added by the member in the system, then same should be displayed here in the dropdown list. Following items should be displayed in the drop-down list: Margin, Delivery, Intraday, Carryforward, Margin-Plus, Bracket Order. |
| Config Type | Drop-down | System should display the following two options in config type for configuring the timer setting: Day name wise, Date wise. If Day name wise is selected then Day wise field selection will be enabled. If Date wise is selected then Date wise field selection will be enabled. |
| Day | Drop-down (Multi-select) | Drop-down list should consist of Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. ‘Select All’ option should also be available. Multi select checkbox option should be available. By default, checkbox should be un-checked. System should allow to select multiple days. |
| Date | Date (DD:MM:YYYY) | By default, "Current Date" shall be displayed on Date field while config type is selected as "Date Wise" for adding a record. System should allow to select the preferred date. |
| Pre-Timer | Date Time Entry | System should allow to define the Pre square-off time in the format of HH:MM:SS. |
| Post-Timer | Date Time Entry | System should allow to define the Post square-off time in the format of HH:MM:SS. |
| Popup | Drop-down | Should display the following items in the list: Enable and Disable. |
| Status | Drop-down | Should display the following items in the list: Active and Inactive. |
| Add | Button | On Click of Add button, Selected options in the dropdown list like Segment, Product, Day Name, Pre-Timer, Post Timer, Pop-up and Status should be added to the Timer configuration grid view. On Click of “Add”, If Same combination record is already available in the system for the template, then system should display an alert Popup Window with message: “Record already available for Combination in the system”. |
📊 Timer Configuration Grid View
Following list of columns should be displayed in the Timer grid view:
- Segment
- Product
- Config Type
- Day Name/Date
- Pre-Timer
- Post-Timer
- Pop-Up
- Status
💡 Configuration Examples
Example
Template: TIMER1 has following combination of record
| Seg. | Prod. | Config Type | Day Name | Date | Pre-Timer | Post-Timer |
|---|---|---|---|---|---|---|
| ALLEQ | Margin | Day Wise | MON,TUE | - | 15:00:00 | 15:15:00 |
| ALLFNO | Intraday | Day Wise | MON,TUE | - | 15:00:00 | 15:15:00 |
| ALLFNO | Intraday | Date | - | 26/10/23 | 14:45:00 | 15:00:00 |
Scenario: ALLEQ + Margin (Day-based)
- Pre-Trigger event at 15:00:00 on Monday and Tuesday: System should auto restrict fresh position and position conversion requests for ALLEQ segment on Margin product type.
- Post-Trigger event at 15:15:00 on Monday and Tuesday: System should auto-generate cancellation of pending order requests and then auto-generate square-off open position requests for ALLEQ + Margin.
Scenario: ALLFNO + Intraday (Date-based)
- System should consider Date wise record if current system date equals the defined date in the record.
- On 26/10/2023, Pre-Trigger at 14:45:00 and Post-Trigger at 15:00:00. System should auto-restrict fresh positions and block position conversion at Pre-Trigger, then cancel pending orders and square-off open positions at Post-Trigger.
🔄 Square-off Price Determination
When Post-Timer triggers square-off orders:
- If Interop is ON: reference "Default Base Exchange - Square-Off/Market Data" flag.
- Use Square-off Price Method from Master Configuration.
- Apply Square-off LTP Percentage settings.
📊 Multi-Segment Configuration
Within a single template, system should allow to create timer configuration for multiple segments and products. The TIMER1 example above demonstrates multiple rows/configurations inside a single template.