A community for trading strategies, indicators, and utilities developed with HaasScript.
Join for Free Browse Scripts![HaasOnline TradeServer with HaasScript HaasOnline TradeServer with HaasScript](/wp-content/themes/haas-scripts/img/yes3.png)
HaasOnline’s purpose is to help more people gain control of their financial freedom as the new age of finance evolves. As a trusted partner to investors and a leading provider of financial technology, our customers look to us for the solutions they need when designing and executing on their most important trading strategies.
-- Author: Giankam DefineCommand('NQK', 'Nadaraya Quadratic Kernel') local function kernel_regression (_src, _alpha, _r, _h) local _currentWeight = 0 local _cumulativeWeight = 0 for i = 1, _alpha + 26 do local y = _src[i] local w = Pow( 1 + (Pow(i, 2) / (Pow(_h, 2) * 2 * _r )), -_r) _currentWeight = _currentWeight + (y*w) _cumulativeWeight...
This is an envelope implementation of non-repainting Nadaraya-Watson indicator using the Rational Quadratic Kernel: Nadaraya-Watson What is Nadaraya–Watson Regression? Nadaraya–Watson Regression is a type of Kernel Regression, which is a non-parametric method for estimating the curve of best fit for a dataset. Unlike Linear Regression…
-- ============================================================================ -- Firetron's Hedged DCA Dipper -- -- Runs a long and a short each doing dollar cost averaging strategy. -- Expands positions on an interval and exits whenever there is a profit. -- Only expands a position when its profit is less than a trigger. -- -- Custom Command Dependencies: -- Firetron'...
Runs a long and a short each doing dollar cost averaging strategy. Expands positions on an interval and exits whenever there is a profit. Only expands a position when its profit is less than a trigger. Custom Command Dependencies: Firetron’s CurrentVsEntry Firetron’s FormatRoundedPercent Firetron’s FormatRoundedQuoteCurrency…
NobwRAGmBcCMCcAGRAaMBNGsDMA2VYA6jAQBIloDiArgJYAmMYphANgELsD2AZgPIARdAAsA7gFYAjgCN2AOQBqfHGDQAVAJ4AHAKYwA7MmxoAwlwC25gIYA7enKvm90MGoBOV+ju4AXMzZ8rWhsdN1UwfxCAYx8uMOhwGgYmVi1RaQAFAGUAFgBpDPgAGQBraVIAcyzxdlpJYXDInRjaLhsAZxhgAF00DKsPJx9QmHAHJyYdAA9m6mHwzV0YYzAASXaAJR1JOjcdRmgeK1Z2nTR10gYvGxgjk7O19oAxWh1WA7vTtABBVlYuURyah/W7HL5gAQ6dpRNy0LQ+Vo3FzhLLUCoVKEItpdbAAJlguJQeNgqDxiGMZNwRPxsCJ2GQ1MQhLJ4kZ8EZORQ...
This is a short scalper based on a very rough approximation of the following conditions: - Open MACD & EMA200 on 5 min timeframe - Condition 1: price must trade below EMA200 - Condition 2: MACD is above 0 line - Condition 3: Blue line…
-- [pshaiBot] Triangle-Arbitrage, PROOF-OF-CONCEPT -- Author: pshai --[[ -- WARNING, PLEASE READ -- This bot executes trades based on estimations and on the assumption that prices do not change when orders are sent out! Please do not use this bot for actual trading, unless you want to prove to yourself that this type of trading IS NOT profitable! ]] EnableHighSpe...
Hey fellas! Here is an actual trading tri-arb bot. However, I don't have much else to say than this: -- WARNING, PLEASE READ -- This bot executes trades based on estimations and on the assumption that prices do not change when orders are sent out!…
--If you would like to buy me a cup of coffee or diamond: --ENS: smokyho.eth EnableHighSpeedUpdates() HideTradeAmountSettings() -- Inputfields InputGroupHeader('Bot Settings') local startingBalance = Input('Starting Balance '..ProfitLabel(), 0) local startingAmount = Input('Starting exposure '..AmountLabel(), 1) local amountFactor = Input('Trade amount facto...
My modification for Haasonline's original Zone Recovery Bot for HEDGE trading mode. The bot use balance ratio as stop loss and not position size like the original bot. "Closing all positions when working balance (total used margin - total unrealized profit) / bot balance (starting…
--[[ MK4.2.2 If you would like to buy me a cup of coffee or diamond ENS: smokyho.eth --]] EnableHighSpeedUpdates(true) HideOrderSettings() HideTradeAmountSettings() --INPUTS InputGroupHeader('Trade Settings') local mainInterval = CurrentInterval() local okLong = Input('Long Entry', false, 'Allow bot to open Long') local okProfitL = Input('Long Exit', fa...
Hi guys...thank you for everyone who use my previous bots and everyone who inspired me with their snippets and sharing their knowledge in DIscord. So..version 4 now. The basic trading risk management is the same as MK3. Still using balance risk to determine the order…
-- [pshaiTool] Buy & Sell buttons -- Author: pshai if not init then EnableHighSpeedUpdates(true) HideTradeAmountSettings() HideOrderSettings() order_size_types = { 'Base', 'Quote', '% of Total Wallet', '% of Available Wallet', } lpid = NewGuid() spid = NewGuid() init = true end local order_size = Input('Ord...
From GPT: The [pshaiTool] Buy & Sell buttons script is an advanced trading tool designed to streamline the process of executing buy and sell orders directly from a trading platform interface. Created by pshai, this tool enhances user experience by providing a simplified, high-speed method…
-- Potentially very counter-intuitive trading strategy -- Author: pshai ma_len = Input('MA Length', 13) ma_type = InputMaTypes('MA Type', EmaType) bb_len = Input('BB Length', 3) bb_dev = Input('BB Deviation', 2) bb_type = InputMaTypes('BB Type', EmaType) bw_thres = Input('BBand Width Threshold %', 0.7) / 100 cci_len = Input('CCI Length', 50) cci_br = Input('CCI Base Range', 100) cci_ar...
Hey folks! In search of dynamic and counter-intuitive (but smart) trading strategies, I happened to create this. It's a bi!@$ to finetune... But it looks good on the charts. :pepeshrug: Let me know if you want to see a full bot using this strategy! ~May…
DefineCommand('VPCI_Signal', 'Signal generation using Volume Price Confirmation Indicator (VPCI) with Plots and Highlight Breaches') -- Define parameters and inputs local name = DefineParameter(StringType, 'name', 'Unique name of the indicator.', false, 'VPCI_Indicator', 'Text') local chartIndex = DefineParameter(NumberType, 'chartIndex', 'The index on which to chart', false, 6, 'Number') ...
Signal generation using Volume Price Confirmation Indicator (VPCI) with Plots and Highlight Breaches' Developed by Buff Dormeier, VPCI won 2007 Charles H Dow award by the MTA. VPCI plots the relationship between price trend and the volume, as either being in a state of confirmation…
DefineCommand("GetOrderbookImpact", "Calculates the impact on orderbook based on trade amount, returns the price impact in percentages.") local tradeAmount = DefineParameter(NumberType, 'tradeAmount', 'The trade amount to calculate with. Default is TradeAmount()', false, TradeAmount(), 'TradeAmount, MaxLongAmount, MaxShortAmount, LongAmount, ShortAmount') local isLong = DefineParameter(Boolean...
Found another one... Old script, never got published anywhere iinm. The command simply "Calculates the impact on orderbook based on trade amount, returns the price impact in percentages." Hope you find good use for it! ~pshai
NobwRAGmBcBsAsAGANGAmjATJlYDqMuAEoagOICuAlgCYz7wCMATgFIDmRAdgFYByXAMYAjAMoBOAEIBZGgGsAZgGcwqACoBPAA4BTGI0SJGqAMIB7ALYWAhlxp9rFvdDB8dANx3MAogA8qAC54gQAWADJmSiqmZlxcOoIBZsww4JS09GHwcgDSACKi1gCq7ADuEACOeewA8iZKAKwmsBSqYOZxCQFUsSrQwAC6qAAK1syOOgFeqa4T9Dq+CRRTbZq6MADMqACSSgBKOhXUzDp00ArWADZKOjtKRLQ0OlwwF9e3YLsAYlQ6l2dvG6oACCl0uZlKfAoYNeVyBYDyOiUgmYVC03Vi9Daogo7HYSIxL36G0wjEwyBJBgpOC2JMQsGpjGMGw2hmpiHJd...
StopLossCooldown OvercomeFeeCosts NoLoss set 0 what you don't use.
NobwRAGmBcBMAMAaMBNGBGByDqMlgAk9kBxAVwEsATGMAIQBsUAHAFQEUBJAaQAsqGAdgBiARwBa2XhXEBnWWGSsAnswCmMAGzx0yAMIB7ALZGAhgDsqAOVNGN0MABE1AMwrm1hkxZr6D5jwBjABcDACcYcHJqWl4CPW4CNVgAdwB5SwAvACMAVlMAK3Ng81MGRTBDALUQin8FaGAAXWQABVMw2zVgtQjocBs7WjUADxqyHoqVdRgAZmROWQAlNVFKMLUaaBcy2TUF2QJqKjVzGB2GPYPhCjUGLYursABBBgYDFKsyN/Pd/ac1LJAmEKMxgnUzg4KgBlMgAczhgPB/hgwFmsEwiHR6CQ6Pg8zxmixGN0s1m8FxCFgxPguRpAE4aQAWRBMgAc+NZH...
InsuredMH: StopLossCooldown + OvercomeDoubleFeeCosts
-- [pshaiCmd] Trailing Arm Stop-Loss (TASL) ---- TrailBlaze Author: Giankam --- modified TrailBlazeArmStopLoss by @Criptics DefineCommand('TrailBlazeArmStopLoss', 'Educational TASL') InputGroupHeader('TBA_StopLoss Settings ') local arm = DefineParameter(NumberType, 'arm', 'Activation distance in percentage. Default is 0.2%.', false, Input('Arm', 1.5), 'Number') local atrLength = Defin...
TrailBlazeArm Stop-Loss (TBASL) Overview The TrailBlazeArm Stop-Loss (TBASL) is an advanced trading script designed to help traders protect their positions by dynamically adjusting stop-loss levels based on market conditions. This script, originally authored by Giankam and modified by @Criptics, combines several market indicators to calculate…
-- Author: tedo -- SuperTrend Trailing Stop-Loss with Enhanced Features (Integration of Trail_Blaze) DefineCommand('STTSLXL', 'SuperTrend Trailing Stop-Loss Enhanced EXTRA') -- Parameters local atr_len = DefineParameter(NumberType, 'atr_len', 'ATR Period length', true, 20) local atr_mult = DefineParameter(NumberType, 'atr_mult', 'ATR Multiplier', true, 2) local interval = DefineParameter(N...
This script represents a dynamic approach to managing trailing stop-loss orders in trading. It is a culmination of strategic methodologies originally inspired by "pshai's" SuperTrend Stop-Loss strategy, with an integration of the "Trail Blaze" function from "Giankam". How It Works Dynamic Trailing Stop-Loss Calculation: At…
DefineCommand("PTQpamt", "ProfitTrailer Quiet, Plotting, ROI, pamt, NO Inputs, 0, 0") local trailStartPrc = DefineParameter(NumberType, "trailStartPrc", "Profit level (as percentage) where the trailing starts.", true, 12, "Input") local trailDistPrc = DefineParameter(NumberType, "trailDistPrc", "Trailing distance (as percentage) from the highest recorded profit.", true, 3, "Input") local tra...
custom ProfitTrailing to log, log verbose, plot start, if logging only when position is not closed. dependency in:
-- Switch-case implementation for HaasScript -- Author: pshai function switch(args) local t = args.select local rf = args.run_funcs or false for c, r in pairs(args.cases) do if t == c then if rf and GetType(r) == FunctionDataType then return r() end return r end end end...
Any potential updates or changes can be found in HaasOnline Discord server. Here's my implementation for a switch-case system. Usage: local c = ClosePrices() local len = 20 local indicator = 'sma' local values = switch({ select = indicator, run_funcs = true, cases = {…
-- Modified by Strvninmarvin on 2021-11-02 -- ============================================================================ -- Strvinmarvin's ReportMaxMargin -- -- Adds a custom report on your maximum margin used. -- -- * Note: Thanks to Firetron, for I have shamelessly ripped off his ReportMaxRiskPoint -- command and used the template and framework to make this. ...
Adds a custom report on your maximum margin used.
DefineCommand('Volatility_Trader_Tools', '[Kobalt] Volatility_Trader_Tools (VOLTT) Keltner Channel based ATR Bands, StdDeviation BBands VWAP bands (the big 3) added ATR as oscillator to confirm the exhaustion points(reversal best dip, peak)') local pIsBt = DefineParameter(BooleanType, 'isBacktestt', '', true, true) local pPlotIndex = DefineParameter(NumberType, 'index to plot', 'For ATR sub ch...
Add MFA to Max Draw Down/MAE for back testing/reports What does MFE mean? MFE stands for Maximum Favorable Excursion. MFE marks the highest price during a long trade and the lowest price during a short trade. This shows you what the highest profit was during…