Skip to content

Instantly share code, notes, and snippets.

View Fyzu's full-sized avatar
👊
Let's Code!

Dmitry Petrov Fyzu

👊
Let's Code!
View GitHub Profile
@Fyzu
Fyzu / dxlink.proto
Created May 9, 2025 17:53
dxLink Proto experiments
@Fyzu
Fyzu / SNAPSHOT.json
Created April 17, 2025 13:45
dxLink DOM Service
{
"type": "DOM_SNAPSHOT",
"channel": 0,
"asks": [{
"price": 123,
"size": 1,
"orders": [{
"price": 123,
"size": 1
}]
@Fyzu
Fyzu / 1.js
Last active April 10, 2025 10:40
dxScript JS API
input.n = 9
const n = input.n
let logPrice = ResultSeries.apply("logPrice", () => { return Math.log(close.last()) })
let logPrevPrice = ResultSeries.apply("logPrevPrice", () => { return Math.log(close.last(1)) })
let triple = trix(logPrice, n);
let triplePrev = trix1(logPrevPrice, n)
output.TRIX = (triple - triplePrev) * 10000
@Fyzu
Fyzu / example.ts
Created November 20, 2024 15:32
dxLink CHART JS API
const dxScriptCodeList = [
```in depth = 10
out sma = sma(close, depth)
```,
```in depth = 10
out sma = sma(open, depth)
```,
```in depth = 10
out sma = sma(high, depth)
```
@Fyzu
Fyzu / 0-api.ts
Last active November 20, 2024 15:55
dxLink CHART Service
interface DXLinkChartIndicator {
lang: string
content: string
}
interface IndicatorParameter {
type: 'number' | 'string' | 'boolean'
name: string
}
@Fyzu
Fyzu / some.ts
Last active September 3, 2024 14:50
interface CandleData {
subscribeData(
symbol: string,
aggregation: AggregationPeriod,
/**
* `fromTime` and `toTime` options are candles timestamps which should be used when requesting more candles data (lazy loading)
* `fromTime` is an oldest candle's timestamp which should be data get from, `toTime` is the newest (usually toTime candle equals the oldest visible candle)
*/
options?: ChartDataOptions,
@Fyzu
Fyzu / README-v2.md
Last active March 25, 2024 13:38
Candle Snapshot Reconstruction

Our system (QD) incorporates a mechanism designed for transferring indexed states for events such as: Candle, Order.

The fundamental operation of this mechanism involves transferring a snapshot initially and subsequently applying incremental updates to this snapshot.

Candle event is an indexed event in our system that contains specific fields such as:

  • flags - flags for processing updates
  • index - event index, which represents order of the event

Note: Events arrive in a special order in which order these events need to be handled so as not to break the sequence of state.

@Fyzu
Fyzu / 1-CHANNEL_REQUEST.json
Last active April 21, 2025 15:10
dxLink Depth Of Market Service
{
"type": "CHANNEL_REQUEST",
"channel": 5,
"service": "DOM",
"parameters": {
"symbol": "AAPL",
"sources": ["NTV"]
}
}
@Fyzu
Fyzu / obsidian-indent.js
Created October 18, 2022 17:54
Obsidian indent logic
e.prototype.updateDom = function() {
var t = this.view
, n = this.indentCache
, i = t.contentDOM;
if (i.offsetParent) {
for (var r = this.tree, o = [], a = 0, s = Array.from(i.childNodes); a < s.length; a++) {
if ((f = s[a]).instanceOf(HTMLElement) && f.hasClass("cm-line")) {
var l = t.posAtDOM(f)
, c = t.state.doc.lineAt(l);
if (r.length < c.to)
@Fyzu
Fyzu / obs-widget.html
Created April 14, 2019 12:42
Google Play Music Desktop Player OBS Widget
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Google Music Player</title>
<meta name="author" content="https://github.com/Fyzu" />
<link
href="https://fonts.googleapis.com/css?family=Open+Sans"
rel="stylesheet"
/>