I need help to split the following lines into separate variables so that I can assign them in separate Excel cells. They are as follows:
Buy or sell:= buy/sell/bot/sold
Quantity := preceded by + or -, 0 to 20 max
Strategy := in between Quantity and Name
Name := before "100". But with one exception, see middle example on /ESU21 which doesn't follow the same pattern
Date : self explanatory
Strike : Between Date and Put / Call
Type : Put or Call or Put/Call
Price : preceded by @
I know how to explain in English, but not in code. Hope someone can guide me along
So based on the first example, the output should be:
Code: Select all
SOLD
-5
Vertical
VALE
20 Aug 21
21/20
PUT
0.88
Code: Select all
SOLD -5 VERTICAL VALE 100 20 AUG 21 22/20 PUT @.88 CBOE
BUY +1 OKTA 100 20 AUG 21 260 CALL @9.20 LMT MARK
BUY +5 1/-1/1/-1 CUSTOM MU 100 17 SEP 21/17 SEP 21/17 SEP 21/23 JUL 21 80/72.5/67.5/82 CALL/PUT/PUT/CALL @2.25 LMT MARK
BUY +4 DIAGONAL SNOW 100 17 SEP 21/20 AUG 21 260/270 CALL @11.80 LMT MARK
SELL -6 VERTICAL CRSR 100 20 AUG 21 30/27.5 PUT @.85 LMT MARK
SELL -5 IRON CONDOR SPX 100 (Weeklys) 17 SEP 21/17 SEP 21 [AM] 4610/4620/4150/4140 CALL/PUT @3.00 LMT MARK
BUY +5 DBL DIAG FB 100 (Weeklys) 6 AUG 21/30 JUL 21 365/325/365/325 CALL/PUT/CALL/PUT @1.85 LMT MARK
BUY +2 TSM 100 20 JAN 23 120 CALL @16.50 LMT MARK
BOT +1 /ESU21:XCME 1/50 JUL 21 (Monday) (Wk4) /E3AN21:XCME 4285 CALL @12.00
SELL -4 DIAGONAL WKHS 100 (Weeklys) 6 AUG 21/30 JUL 21 9/12 CALL @1.70 LMT
BUY +1 DIAGONAL TSLA 100 17 SEP 21/20 AUG 21 660/675 CALL @23.60 LMT MARK
BUY +3 DIAGONAL V 100 17 SEP 21/20 AUG 21 235/240 CALL @5.45 LMT MARK
BUY +1 CONDOR FVRR 100 17 SEP 21 180/190/200/210 CALL @1.25 LMT MARK
SOLD -1 CONDOR FVRR 100 16 JUL 21 210/230/250/270 CALL @10.20 EDGX
BOT +2 DIAGONAL NFLX 100 17 SEP 21/20 AUG 21 500/520 CALL @16.20 ISE