Skip to content

Instantly share code, notes, and snippets.

View arlenner's full-sized avatar
🙃

Alexander arlenner

🙃
  • RogueWizards
View GitHub Profile
@arlenner
arlenner / PriceAxisVolumeDelta.js
Last active September 25, 2022 17:53
Price Axis Volume Delta indicator for the Tradovate platform.
const predef = require("./tools/predef");
const { min, max, du, px, op } = require('./tools/graphics')
class PriceAxisDelta {
init() {
this.byPrice = {}
this.openDate = new Date()
if(this.props.startsYesterday) this.openDate.setTime(Date.now() - 1000*60*60*24)
this.openDate.setHours(this.props.marketOpenHours, this.props.marketOpenMinutes)
@arlenner
arlenner / yourCustomStrategy.js
Last active September 25, 2022 17:53
Tradovate Custom Strategy template.
const { Strategy, TdEvent } = require('../strategies/strategy')
class YourCustomStrategy extends Strategy {
constructor(params) {
super(params)
}
init(props) {
return {
//your initial state here!
@arlenner
arlenner / Main.hs
Created April 30, 2021 02:45
CardanoNFTConcept
{-# LANGUAGE OverloadedStrings #-}
module Example where
import Language.Marlowe.Extended
main :: IO ()
main = print . pretty $ contract
{- Define a contract, Close is the simplest contract which just ends the contract straight away
@arlenner
arlenner / AddressUtils.sol
Created January 8, 2021 04:59
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=undefined&optimize=undefined&runs=undefined&gist=
//SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;
/**
* @dev Utility library of inline functions on addresses.
* @notice Based on:
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol
* Requires EIP-1052.
*/
@arlenner
arlenner / btfig1.js
Created October 19, 2020 16:13
Binary Tree article fig1
function BTNode(op, L, R) {
this.op = op
this.left = L
this.right = R
}
function BinaryTree(head) {
this.head = head
}