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
// ==UserScript== | |
// @name TradingView SQN Calculator | |
// @namespace https://ignizbot.com/ | |
// @version 0.6 | |
// @description try to take over the world! | |
// @author Ignasius Wahyudi | |
// @match https://www.tradingview.com/chart/*/ | |
// @require https://unpkg.com/[email protected]/dist/math.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/date-fns/1.30.1/date_fns.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js |
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
class MAcrossover(bt.Strategy): | |
#Moving Average Parameters | |
params = (('pfast',20),('pslow',50)) | |
def log(self,txt,dt=None): | |
dt = dt or self.datas[0].datetime.date(0) | |
print('%s, %s' % (dt.isoformat(),txt)) | |
def __init__(self): | |
self.dataclose = self.datas[0].close | |
# Order variable | |
self.order = None |
NewerOlder