Open ravikanthvishnubhotla opened 2 months ago
will all the trades be straddle (same strike price) always without any exception
Straddle Hedge will always be Same Strike Price with CE & PE Trades on either sides same time for Cross Hedge, It would be combination on Instruments like Nifty/BankNifty etc
which one of the below are valid Buy Hedge trades
11) different instruments
BUY NIFTY
BUY BANKNIFTY
22) straddle
BUY FINNIFTY18JUN24P22500
BUY FINNIFTY18JUN24C22500
33) strangle
BUY FINNIFTY18JUN24P22500
BUY FINNIFTY18JUN24C22700
44) calendar
BUY FINNIFTY18JUN24P22500
BUY FINNIFTY25UN24C22500
All of these are Valid Hedge Trades..as mentioned yesterday, thjere are two types of Hedge..Cross Hedge and Straddle Hedge Straddle Hedge will always be Same Strike Price with CE & PE Trades on either sides same time for Cross Hedge, It would be combination on Instruments like Nifty/BankNifty etc
can do it .. no issues ... i hope there wont be any SELL trade
No Short Trades
entry = [
"channel": SmsOptionsPremium,
"id": 2.17187E+15 ,
"symbol": NFO:NIFTY18JUN24C22550 | NFO:FINNIFTY18JUN24P22550,
"entry_range": 0,
"target_range": 0,
"sl": 0,
"quantity": 45 | 50,
"action": BHEDGE,
"timestamp": 18-06-2024 13:46,
]
cancel = [
"channel": SmsOptionsPremium,
"id": 2.17187E+15 ,
"symbol": NFO:NIFTY18JUN24C22550 | NFO:FINNIFTY18JUN24P22550,
"entry_range": 0,
"target_range": 0,
"sl": 0,
"quantity": 45 | 50,
"action": BHXXX,
"timestamp": 18-06-2024 13:46,
]
@ravikanthvishnubhotla ref our discussion, @MaheswaranPalaniselvan to send buy hedge related messages in above format.
for entry
only symbol
and quantity
are read.
for cancel
messages of BHEDGE
only the channel
name is monitored. if received the first available BHEDGE
trade is exited.
Ack
Tested with the below values. please check and confirm
msg = " Buy 1 Lot Nifty 21450 PE Only In Range @ 25 - 33 Target 50 75 100 125 150 & Above Buy 1 Lot BankNifty 45300 CE Only In Range @ 90 - 110 Target 140 170 200 230 275 & Above Ratio Of Today's Cross Index Hedge Trade BankNifty - 1 Lot N Nifty - 1 Lot Nifty 15 Feb 21450 PE @ 32 se 32 = 0 Point = 0/- Loss BankNifty 14 Feb 45300 CE Doubled @ 105 se 240 = 135 Points = 2025/- Profit Total Profits @ 2025/- Per Hedge Pair Book 70% To 80% Position Of Hedge Trade In Profits " i = SmsOptionsPremium(1707192066, msg) i.get_signal() msg = " Buy 1 Lot Nifty 21450 PE Only In Range @ 25 - 33 Target 50 75 100 125 150 & Above Buy 1 Lot BankNifty 45300 CE Only In Range @ 90 - 110 Target 140 170 200 230 275 & Above Ratio Of Today's Cross Index Hedge Trade BankNifty - 1 Lot N Nifty - 1 Lot Nifty 15 Feb 21450 PE @ 32 se 32 = 0 Point = 0/- Loss $$$$ BankNifty 14 Feb 45300 CE Doubled @ 105 se 240 = 135 Points = 2025/- Profit Total Profits @ 2025/- Per Hedge Pair Book 70% To 80% Position Of Hedge Trade In Profits " i = SmsOptionsPremium(1707192066, msg) i.get_signal()
[I 240625 22:04:01 telegram_message_parser_v2:174] {'channel_name': 'SmsOptionsPremium', 'symbol': 'NFO:NIFTY27JUN24P21450|NFO:BANKNIFTY26JUN24C45300', 'ltp_range': 0, 'target_range': 0, 'sl': 0, 'quantity': '15|15', 'action': 'BHEDGE', 'timestamp': '2170719206686817', 'normal_timestamp': '2024-02-06 09:31:06'} [I 240625 22:04:02 telegram_message_parser_v2:174] {'channel_name': 'SmsOptionsPremium', 'symbol': 'NFO:NIFTY27JUN24P21450|NFO:BANKNIFTY26JUN24C45300', 'ltp_range': 0, 'target_range': 0, 'sl': 0, 'quantity': '15|15', 'action': 'BHXXX', 'timestamp': '2170719206688590', 'normal_timestamp': '2024-02-06 09:31:06'}
@MaheswaranPalaniselvan please mind the lot size if symbols are different (NIFTY and BANKNIFTY) for example. i am not checking the symbols in cancel messages, just looking for the channel name.
Fixed the quantity:
[I 240625 23:54:53 telegram_message_parser_v2:170] {'channel_name': 'SmsOptionsPremium', 'symbol': 'NFO:NIFTY27JUN24P21450|NFO:BANKNIFTY26JUN24C45300', 'ltp_range': 0, 'target_range': 0, 'sl': 0, 'quantity': '25|15', 'action': 'BHEDGE', 'timestamp': '2170719206668927', 'normal_timestamp': '2024-02-06 09:31:06'} [I 240625 23:54:54 telegram_message_parser_v2:170] {'channel_name': 'SmsOptionsPremium', 'symbol': 'NFO:NIFTY27JUN24P21450|NFO:BANKNIFTY26JUN24C45300', 'ltp_range': 0, 'target_range': 0, 'sl': 0, 'quantity': '25|15', 'action': 'BHXXX', 'timestamp': '2170719206693376', 'normal_timestamp': '2024-02-06 09:31:06'}
Hedge trades will be NRML trades with exit @ 15:28 if not squared off by then
Comments from Maheswaran: Please ask if this is ok or if he wants LTP as 0, target as 1000000000 and sl as 0 and action as buy This way hedge would not need special handling in order management. This is my suggestion but please check with Karthik sir
Output from CSV is below:
SmsOptionsPremium 2.17187E+15 NFO:FINNIFTY18JUN24C22550 0.5 40|40 Buy-HEDGE-1 18-06-2024 13:46 SmsOptionsPremium 2.17187E+15 NFO:FINNIFTY18JUN24P22500 0.5 40|40 Buy-HEDGE-2 18-06-2024 13:46 SmsOptionsPremium 2.17187E+15 NFO:FINNIFTY18JUN24C22550 0.5 40|40 Buy-HEDGE-1 18-06-2024 13:49 SmsOptionsPremium 2.17187E+15 NFO:FINNIFTY18JUN24P22500 0.5 40|40 Buy-HEDGE-2 18-06-2024 13:49 SmsOptionsPremium 2.17187E+15 NFO:FINNIFTY18JUN24C22550 0.5 40|40 Buy-HEDGE-1 18-06-2024 15:03 SmsOptionsPremium 2.17187E+15 NFO:FINNIFTY18JUN24P22550 0.5 40|40 Buy-HEDGE-2 18-06-2024 15:03