This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (struct fix-tag (tag contents)) | |
| (define fix-soh (string (integer->char 01))) | |
| (define (compute-checksum tags) | |
| 1) | |
| ;; creates tag string with SOH attached | |
| (define (create-tag id contents) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| testStr = "8=FIX4.2.\x019=65\x0135=A\x0149=S\x0156=C\x0134=177\x0152=20160125-18:30:55\x0198=0\x01108=30\x0110=065\x01" | |
| soh = Char(0x01) | |
| function fix_parse_split(str) | |
| ret = [] | |
| for chunk in split(testStr, soh) | |
| if length(chunk) > 0 | |
| push!(ret, chunk) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| soh = Char(0x01) | |
| function fix_parse_idx(str) | |
| ret = [] | |
| prev_idx = 1 | |
| for idx in 1 : length(str) | |
| # beware julia indexing starts at 1!! | |
| if str[idx] == soh && idx > 1 | |
| # we want to match parse_split so dont include SOH | |
| chunk = str[prev_idx:idx - 1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| soh = Char(0x01) | |
| function fix_parse_split(str) | |
| ret = [] | |
| for chunk in split(testStr, soh) | |
| if length(chunk) > 0 | |
| push!(ret, chunk) | |
| end | |
| end | |
| return ret |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; bofh.asm fasm 1.71 | |
| ;; [email protected] | |
| ;; example socket program that connects to BOFH quote generator and prints it | |
| format PE console 4.0 | |
| entry start | |
| include 'win32ax.inc' | |
| section '.rdata' data readable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ChartDot myDot; | |
| protected override void OnBarUpdate() | |
| { | |
| if (CurrentBar == 0) | |
| { | |
| //myDot = Draw.Dot(this, "myDot", true, Time[0], Close[0], Brushes.Orange); | |
| myDot = Draw.Dot(this, "myDot", true, 0, Close[0], Brushes.Orange); | |
| } | |
| else if (myDot != null && CurrentBar > 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Threading.Tasks; | |
| namespace asdf | |
| { | |
| class CheckCase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var guiAssembly = Assembly.LoadFile(@"C:\Users\DHaslem\Documents\nt8-git\NinjaTrader.Custom\bin\Debug\NinjaTrader.Custom.dll"); | |
| var drawType = guiAssembly.GetExportedTypes().FirstOrDefault(t => t.FullName == "NinjaTrader.NinjaScript.DrawingTools.Draw"); | |
| var methods = drawType.GetMethods(); | |
| foreach (var method in methods) | |
| Console.WriteLine(method.Name + "(" + string.Join(",", method.GetParameters().Select(p => p.Name)) + ")"); | |
| Console.Write((methods.Length - 4) * 3); | |
| ///////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Drawing; | |
| using System.Drawing.Drawing2D; | |
| using System.ComponentModel; | |
| using NinjaTrader.Cbi; | |
| using NinjaTrader.Data; | |
| using NinjaTrader.Gui.Chart; | |
| namespace NinjaTrader.Indicator | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module yahoo_iv | |
| open System | |
| open System.Net | |
| let stddev(values:seq<float>) = | |
| values | |
| |> Seq.fold (fun acc x -> acc + (1.0 / float (Seq.length values)) * (x - (Seq.average values)) ** 2.0) 0.0 | |
| |> sqrt |