kimsam Posted Monday at 02:39 PM Report Posted Monday at 02:39 PM im sharing my own script please .. you need some basic Payton edit logic .. dont ask stupid questions .. ask gpt for help .. https://workupload.com/file/CJ7ZDjxyxt2 i will add more info soon ... trader88, Ac423, RamAli and 15 others 10 8
Starlet8223 Posted Monday at 02:43 PM Report Posted Monday at 02:43 PM 4 minutes ago, kimsam said: im sharing my own script please .. you need some basic Payton edit logic .. dont ask stupid questions .. ask gpt for help .. https://workupload.com/file/CJ7ZDjxyxt2 i will add more info soon ... THE GOAT
Denis Posted Monday at 03:43 PM Report Posted Monday at 03:43 PM pwd mate? thank you for your efforts
sunsay Posted Monday at 03:50 PM Report Posted Monday at 03:50 PM 7 minutes ago, Denis said: pwd mate? thank you for your efforts kimsam
axsx Posted Monday at 06:03 PM Report Posted Monday at 06:03 PM (edited) Hi Kimsam, Thank you for the script I had been looking for this for a long time. You managed to write this out in a day. Kudos. Reg setup I have one question, Py files were stored in a C:\ GEX enhancement\ directory. Python requirements were installed using pip sucessfully The .env.example file was renamed to .env and api secret and callback url was added/changed. I am assuming the callback url is what I have setup in the schawb portal and is not always 127.0.0.1.8080. Next the cs file was compiled and added to the nq chart with realtime data. The parameter python script Path now has the path set to C:\ GEX enhancement\Schwab_GEX_Publisher.py Ran the schwab reauth py script and generated the token The popup now shows the correct data and chart lines are also drawn see attachments. Is it possible to send the Truth GEX engine output to a csv file ? I have attached NQ_GEX_Summary_Latest.csv and a sample ndx.png file. If you can enhance this py script to output this would be fantastic. A valuable enhancement. pl check the files attached. NQ_GEX_Summary_Latest.csv Finally got it working. Amazing early christmas gift !!!!! Edited Monday at 07:31 PM by axsx
axsx Posted Monday at 06:04 PM Report Posted Monday at 06:04 PM (edited) ignore, working now Edited Monday at 07:22 PM by axsx more information
kimsam Posted Monday at 07:42 PM Author Report Posted Monday at 07:42 PM 1 hour ago, axsx said: ignore, working now Good job.. enjoy it🙂
kimsam Posted Monday at 07:45 PM Author Report Posted Monday at 07:45 PM 1 hour ago, axsx said: 1 minute ago, kimsam said: Good job.. enjoy it🙂 As u know u can use it on GC NQ ES ... and other .. just change the port .. from the indicator settings .. axsx 1
kimsam Posted Monday at 07:47 PM Author Report Posted Monday at 07:47 PM Make sure the Offset price ✔️ checked axsx 1
axsx Posted Monday at 08:31 PM Report Posted Monday at 08:31 PM (edited) the truth engine runs every 3 mins. Can you provide a parameter in the cs file to control this ? say default 30min and overide 3min or user sets the time in minutes. ? What is the offset price check mark (converted levels ?). Another parameter in the NT script would be % of Option expiration that should be used in the GEX calculation. Currently I am not sure if the engine is using all the 1400s option chain expiry Edited Monday at 09:30 PM by axsx more information
kimsam Posted Monday at 09:36 PM Author Report Posted Monday at 09:36 PM 1 hour ago, axsx said: the truth engine runs every 3 mins. Can you provide a parameter in the cs file to control this ? say default 30min and overide 3min or user sets the time in minutes. ? What is the offset price check mark (converted levels ?) Will add it .. * the offset price i added it to adjustable the stokes gex prices to the futures prices
axsx Posted yesterday at 04:20 AM Report Posted yesterday at 04:20 AM (edited) Great tool to get Gamma Flip level, Peak Gamma (strike with highest absolute GEX), Top 5 call/put walls, net GEX, the unique way you have addressed Fills missing Schwab gammas with a clean Black–Scholes fallback and logs live vs BS fill percentage . Please include if you can volume‑based GEX (flow‑oriented), major positive/negative GEX by volume, zero‑gamma by volume. Ability to filter out far end strikes, ability to export to csv file, png chart output, support for CBOE API (free), buttons appear in the middle of the chart and can be pushed to the top. dashboard toggle. The truth engine keeps on running every 3mins. a configurable parameter needed. Disconnect/Connect can be expanded to shut down the truth engine as I see it runs whenever the chart is loaded. One more thing is Top GEX markers P #5 | 3.16B, include the price level also like P#5 | 3.16B | 24250 for example. Edited yesterday at 04:39 AM by axsx kimsam and Harrys 2
kimsam Posted 14 hours ago Author Report Posted 14 hours ago making some updates .. RO] Starting Native TCP Engine for SPY on Port 5602 [FETCH] Querying Schwab for SPY... [DEBUG] Fetching Chain (Light): SPY... [SUCCESS] SPY Chain loaded: 34 Calls, 34 Puts. [DEBUG] Truth Engine: Spot 653.38 | Net GEX -0.12B | Flip 646.0 | FlowZero 641.0 axsx 1
axsx Posted 14 hours ago Report Posted 14 hours ago You can also add the conversion ratio ( say QQQ to NDX is 1:42) and GEX Ratio: 0.48 ; Flow Ratio: 1.00; Strike filter (±3%); distance_from_flip; Gamma Intensity: MODERATE ==> --> 42.8% expiring in 7 days; Market Stability: STABLE; Pin Force: +0.0014 and Pin Confidence (if available). few of these may not fit into the model of realtime publication of your important metrics that is currently implemented, but this could act as a overall session summary metrics or a different timeframe summarization like 30min summarization. some ideas GEX_SUMMARY| spot=…;flip=…;peak=…;net=…; pos_wall=…;neg_wall=…; vol_zero=…;vol_pos=…;vol_neg=…; vix_regime=Risk-Off;vix_multiplier =1.35; hmm_regime=BULL;hmm_conf=0.8 Divergence flags: price crossing flip while net GEX sign unchanged, etc. VIX adjusted walls = Flip × VIXMultiplier, PosWall × VIXMultiplier, etc. GammaRegime = {LongGamma, ShortGamma} Distance from flip = (future price - schwab flip) / ATR volume weighting vs OI weighting. some of the ideas I am writing so that you can think about. bryandarktuni and kimsam 1 1
Ninja_On_The_Roof Posted 12 hours ago Report Posted 12 hours ago You guys are really going at it hard huh!🤗 I truly admire and envy all of your sheer dedication and hardwork to iron this one project out. Not to mention, your precious time. I can see your knowledge flowing through every single line.❤️ kimsam 1
prodisoft Posted 11 hours ago Report Posted 11 hours ago (edited) Thanks for all your work, i have a question, You only open a developer account? Or we need to an Schwab account, i have a denied api for two times Edited 11 hours ago by prodisoft
kimsam Posted 10 hours ago Author Report Posted 10 hours ago 26 minutes ago, prodisoft said: Thanks for all your work, i have a question, You only open a developer account? Or we need to an Schwab account, i have a denied api for two times I have both
bryandarktuni Posted 8 hours ago Report Posted 8 hours ago Hi Kim is it possible to add QQQ (levels are accurate too or even better than NDX) I know it s lot of work for you. Thanks a lot for your help !!
kimsam Posted 8 hours ago Author Report Posted 8 hours ago 13 minutes ago, bryandarktuni said: Hi Kim is it possible to add QQQ (levels are accurate too or even better than NDX) I know it s lot of work for you. Thanks a lot for your help !! Yes .. its available can add it bryandarktuni 1
kimsam Posted 8 hours ago Author Report Posted 8 hours ago @axsx check this update .. https://ibb.co/RT7YTSyn axsx and babaluFlow 2
ampf Posted 6 hours ago Report Posted 6 hours ago Not related with GEX but @kimsam could you create something similar to bestorderflow MBO?
axsx Posted 1 hour ago Report Posted 1 hour ago (edited) 6 hours ago, kimsam said: @axsx check this update .. https://ibb.co/RT7YTSyn Call/ Put walls or GEX 1 , GEX 2 GEX 3 and GEX 4 lines ? The Truth Engine is implemented per screen shot with “Put X @ level, Call Y @ level, FLIP, PEAK” is plotting discrete liquidity pockets (size of put/call open interest or gamma at specific strikes is it so ?), the primary gamma‑flip level, and the single strike with maximum absolute gamma (PEAK), are these the GEX 1 , 2, 3 and 4 levels ? Call Wall / Put Wall: strikes with the largest positive/negative call and put gamma exposure, aggregated across expiries. Gamma Wall: strike with the largest absolute total gamma ( I think you call it as PEAK ), Gamma Flip is FLIP in your screen shot, MAX PAIN (not yet in your charts), I think is theoretical minimum P&L point for options holders. This would mean expanding the range of metrics your system outputs without limiting to single “peak” and “flip” line. In the nt script, all these should be selectable for display via check boxs. Currently everything is displayed. In summary, I think what is needed is Flip, Peak, GEX1–4, Call Wall, Put Wall, Max Pain level. Edited 1 hour ago by axsx
axsx Posted 1 hour ago Report Posted 1 hour ago (edited) MAX PAIN addition if possible. For a candidate settlement price P: Call payoff at strike K: max(0,P−K)×OI_call[K]max(0,P−K)×OI_call[K]. Put payoff at strike K: max(0,K−P)×OI_put[K]max(0,K−P)×OI_put[K]. Total payout to all option holders at P: TotalPayout(P)=∑K[max(0,P−K) OI_call[K]+max(0,K−P) OI_put[K]]TotalPayout(P)=K∑[max(0,P−K)OI_call[K]+max(0,K−P)OI_put[K]] You want the P that minimizes the above function if the Truth Engine has per‑strike open interest and option type, For each candidate settlement price, compute total payoff to calls and puts using OI. Choose the price with minimum total payout. This is the Max Pain level. Max Pain is the strike where option writers (dealers) pay out the least at expiration, i.e., where total option holder P&L is minimized. def calc_max_pain(call_oi, put_oi): strikes = sorted(set(list(call_oi.keys()) + list(put_oi.keys()))) if not strikes: return 0.0 best_price = strikes[0] best_payout = float('inf') for p in strikes: payout = 0.0 # Calls: holders get paid when price finishes ABOVE strike for k, oi in call_oi.items(): if oi <= 0: continue intrinsic = max(0.0, p - k) payout += intrinsic * oi # Puts: holders get paid when price finishes BELOW strike for k, oi in put_oi.items(): if oi <= 0: continue intrinsic = max(0.0, k - p) payout += intrinsic * oi if payout < best_payout: best_payout = payout best_price = p return best_price Edited 1 hour ago by axsx babaluFlow 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now