I will give you some basic Routines, which you can work upon. You will get ideas to create your own personality suiting auto systems, including time based OMS entry exit, SAR, auto position sizing basis volatility, monitored or non monitored OMS etc.
You can also use VB to manage OMS of multiple account on the same machine, like what you mentioned in the other post.
Examples:
Sub Enter_Position_Buy_Option()
AppActivate ("Welcome XXXXX To NEST Trader ( 3.11.4 ). Zerodha")
Application.Wait Now + TimeValue("00:00:01")
SendKeys "{Esc}"
SendKeys "{F1}"
SendKeys "+{TAB}"
SendKeys "+{TAB}"
SendKeys "+{TAB}"
SendKeys "+{TAB}"
If Range ("BO") = "L" Then
SendKeys "c" ' for Call Buy
ElseIf Range ("BO") = "S" Then
SendKeys "p" ' for Put Buy
End If
SendKeys "{TAB}"
SendKeys Range("B4") 'Strike price selection
SendKeys "{TAB}"
SendKeys "{TAB}"
SendKeys "{TAB}"
SendKeys "{Enter}"
TalkIt ("Position Taken")
Application.Wait Now + TimeValue("00:00:01")
AppActivate ("Excel")
End Sub
'>>>>>>>>>>>>>>>>>>
Sub Exit_Position()
AppActivate ("Welcome XXXXX To NEST Trader ( 3.11.4 ). Zerodha")
Application.Wait Now + TimeValue("00:00:02")
SendKeys "{Esc}"
SendKeys "{F2}"
SendKeys "+{TAB}"
SendKeys "+{TAB}"
SendKeys "+{TAB}"
SendKeys "+{TAB}"
SendKeys "+{TAB}"
SendKeys "+{TAB}"
SendKeys "+{TAB}"
SendKeys "+{TAB}"
SendKeys "m"
SendKeys "{TAB}"
SendKeys "{TAB}"
SendKeys "{TAB}"
SendKeys "{TAB}"
SendKeys "c"
SendKeys "{TAB}"
SendKeys Range("B4")
SendKeys "{TAB}"
SendKeys "{TAB}"
SendKeys "{TAB}"
SendKeys "{Enter}"
Application.Wait Now + TimeValue("00:00:01")
AppActivate ("Excel")
End Sub
'>>>>>>>>>>>>>>>>>>>>
Sub Order_Trade_Book()
AppActivate ("Welcome XXXXX To NEST Trader ( 3.11.4 ). Zerodha")
Application.Wait Now + TimeValue("00:00:01")
If Range("AM20") = 99 Then
SendKeys "{F8}" ' for viewing Trade Book
Else: SendKeys "{F3}" 'for viewing Order Book
End If
Application.Wait Now + TimeValue("00:00:05")
SendKeys "{Esc}"
AppActivate ("Excel")
Workbooks("Mybook.xlsm").Activate
End Sub
'>>>>>>>>>>>>>>>>>>
Sub One_Key_Touch_Activate()
Application.OnKey "b", "Enter_Position_Buy_Option" ' alphabet b
Application.OnKey "e", "Exit_Position" ' alphabet e
Application.OnKey "o", "Order_Trade_Book" ' alphabet o
End Sub
'>>>>>>>>>>>>>>>>>>