NexusFi: Find Your Edge


Home Menu

 





Live SPX on your desktop


Discussion in Brokers

Updated
    1. trending_up 3,922 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 1 posts
    2. attach_file 1 attachments




 
 

Live SPX on your desktop

 
 TraderSU 
New York
 
Experience: Intermediate
Platform: NinjaTrader, Custom Platform
Broker: IB
Trading: ES, YM, Currency Futures
Posts: 79 since May 2010
Thanks Given: 46
Thanks Received: 75

The code below runs using AutoIt (compiled exe is also attached). It shows SPX value in semi-transparent layer near system tray clock (bottom right). Great tool if you work full-time and trade for fun.

Next version will have price level alerts too :-)

 
Code
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Opt("TrayAutoPause", 0)

; User default proxy
HttpSetProxy(0)

#Region ### START Koda GUI section ### Form=C:\PortableApps\koda_1.7.3.0\Forms\GF.kxf
$Form1 = GUICreate("SPX", 108, 26, @DesktopWidth - 132, @DesktopHeight - 52, $WS_POPUPWINDOW, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
$Label1 = GUICtrlCreateLabel("0,000.00", 2, 2, 116, 22)
GUICtrlSetFont($Label1, 16, 800, 0, "Courier New")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

WinSetTrans("SPX", "", 160)

DirCreate(@TempDir & "\gf\")
$fName = @TempDir & "\gf\" & @AutoItPID & ".json"

$q = ".INX"

While @HOUR * 100 + @MIN >= 930 AND @HOUR * 100 + @MIN <= 1600
    ; pull SPX data every 15 seconds
    InetGet("http://www.google.com/finance/info?q=" & $q, $fName, 1, 1)
    Sleep(2000)
    $json = FileRead($fName)
    $array = StringRegExp($json, '"l_cur" : "(.*)"', 3)
    GUICtrlSetData($Label1, $array[0])
    Sleep(13000)
WEnd

Attached Files
Elite Membership required to download: GF.au3.txt
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread
Thanked by:

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
What broker to use for trading palladium futures
Commodities
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 

 



Last Updated on September 30, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts