A community for trading strategies, indicators, and utilities developed with HaasScript.
Join for Free Browse Scripts
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.
-- Simple Market Maker -- by pshai @ 2020 -- -- Introduction: -- This simple market maker makes the market! -- It doesn't stop, it has no limits (other than max. pos. size) -- and it's amazing. Get familiar with the bot before using it! -- I strongly suggest doing backtests and especially running it -- using a simulated account until you are confident that you know that -- this bot knows...
Simple Market Maker by pshai @ 2020 Introduction: This simple market maker makes the market! It doesn't stop, it has no limits (other than max. pos. size) and it's amazing. Get familiar with the bot before using it! I strongly suggest doing backtests and especially…
Log('Tip wallet ERC20/BSC: 0xaa28dE4372CA0a8BC36722886E9749f70DF32382') EnableHighSpeedUpdates(true) HideOrderSettings() HideTradeAmountSettings() -- This bot is optimized for HEDGE mode. -- Suggested main interval is 15 minutes and 1 hour for momentum or ratio 1:4 or 1:6. -- Using 1:1 time interval also works. Who knows might give your better profit. -- Always start with ALL Trade Setti...
-- This bot is optimized for HEDGE mode. -- Suggested main interval is 15 minutes and 1 hour for momentum or ratio 1:4 or 1:6. -- Using 1:1 time interval also works. Who knows might give your better profit. -- Always start with ALL Trade…
EnableHighSpeedUpdates(true) -- KGB: -- use 1 active slots per side. once slot order is filled, activate next and take the placement from -- the band value in the moment of fill. place take-profit taking the average entry price into account. -- use either hard SL -- or re-activate slots -- or decrease take-profit distance as time goes on (should have setting to allow it to move to the lo...
DISCLAIMER: This script is EXPERIMENTAL and might not be fully functional. Use at your own RISK! Hey! Happened to look back into this bot and.. Well. Ideas just started to fly around, OK!? So anyway. This time the approach is different. And the bot can…
-- [HaasOnline] Simple Grid Bot (Futures) v1.4 -- Author: pshai HideOrderSettings() HideTradeAmountSettings() EnableHighSpeedUpdates(true) InputGroupHeader('Price Range') local pr_lower = Input('Lower Limit', 0, 'Lower price limit.') local pr_upper = Input('Upper Limit', 0, 'Upper price limit.') InputGroupHeader('Grid mode & quantity') local mode = InputOptions('Mode', 'Arithmetic...
Hey YOU! Having trouble modifying SGB Spot to Futures? There's no need for that! Simple Grid Bot makes grid trading simple AF. All you need to do, is set your price range, amount of grids and the amount of your total investment and the bot…
-- [HaasOnline] Simple Grid Bot v1.2 -- Author: pshai HideOrderSettings() HideTradeAmountSettings() EnableHighSpeedUpdates(true) InputGroupHeader('Price Range') local pr_lower = Input('Lower Limit', 0, 'Lower price limit.') local pr_upper = Input('Upper Limit', 0, 'Upper price limit.') InputGroupHeader('Grid mode & quantity') local mode = InputOptions('Mode', 'Arithmetic', {'Ari...
Hey YOU! Having trouble setting up FlashCrash bot? Don't worry! The solution is here! Simple Grid Bot makes grid trading simple AF. All you need to do, is set your price range, amount of grids and the amount of your total investment and the bot…
Log('Tip wallet ERC20: 0xaa28dE4372CA0a8BC36722886E9749f70DF32382') EnableHighSpeedUpdates(true) HideOrderSettings() HideTradeAmountSettings() -- Always start with ALL Trade Settings options UN-TICKED to let the bot preparing values. -- Test with default values before changing anything to understand the bot. -- PAY ATTENTION to the log warning if you feel something is off before screeamin...
- COMPATIBLE with server and cloud version. - Optimized for HEDGE mode. - Suggested main interval is 1H - Always start with ALL Trade Settings options UN-TICKED to let the bot prepare values. - Test with default values before changing anything to understand the bot.…
-- Author: Giankam DefineCommand('Trail_Blaze', 'Trail_Blaze') local atrLength = DefineParameter(NumberType, 'atrLength', 'atrLength', true, 8) local atrMult = DefineParameter(NumberType, 'atrMult', 'atrMult', true, 1) local tslPercent = DefineParameter(NumberType, 'Trailing %', 'Trailing %', true, 0) local triggerLength = DefineParameter(NumberType, 'triggerLength', 'triggerLengt...
The main set of features includes: Three independent trailing types each with their own +/- multipliers: - Standard % change - ATR (aka Supertrend) - IQR (inter-quartile range) These can be used in isolation or summed together. A subsequent pair of direction specific multipliers are…
-- 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…
--- Author: Giankam DefineCommand('JMA', 'Jurik Moving Average') local src = DefineParameter(ListNumberType, 'source', 'Data source to transform', true, ClosePrices()) local period = DefineParameter(NumberType, 'period', 'JMA period', true, 14) local phase = DefineParameter(NumberType, 'phase', 'JMA phase', true, 0) --range 1-199 local exp = DefineParameter(NumberType, 'exp', 'JMA exp', tr...
Based on the original Jurik Moving Average this is one of the most sought after moving averages. Due to the recursive logic it the code uses Pshai’s CC_IndicatorMemory. Example: local src = ClosePrices() local length = 20 local phase = 0 local exp = 2…
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
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:
-- Author: Kobalt DefineCommand("PTpExits", "last step to including Interim managed order placement--only add the result trigger, order specs..check inputOrderOptions integration A price-based ProfitTrailer implementation by Pshai TEST InterimManaged handle order placements inside--Loging--verbose logging") local ptqname = DefineParameter(StringType, "name", "Name to distinguish it from others i...
early test will further look into Firetron's OrderOptions this needs to be cleaner.. But Trailing, logging, plotting and fwd compatibillity should be better with the reduceOnly addition, to only use PlaceSellOrder, PlaceBuyOrder on Spot and on Leverage use PlaceShortOrder, PlaceLongOrder with isReduceOnly enabled to close,…
-- [pshaiCmd] Trailing Arm Stop-Loss (TASL) -- Author: pshai DefineCommand('TrailingArmStopLoss', 'Educational TASL') local percentage = DefineParameter(NumberType, 'percentage', 'Trailing distance in percentage', true, 1) local arm = DefineParameter(NumberType, 'arm', 'Activation distance in percentage', true, 0.2) local positionId = DefineParameter(StringType, 'positionId', 'Optional po...
A custom command implementation of the built-in TrailingArmStopLoss command for educational purposes.
-- 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…
local zzz, ddd, rsi, a DefineCommand("o", "order helpers") function zzz() Log("this is from zzz") end function ddd(str) Log("this is from ddd"..str) end function rsi(prices, period, offset) local rsi_with_offset = RSI(prices, period) + offset return rsi_with_offset end a={} a.ddd = ddd a.zzz = zzz a.rsi = rsi DefineOutput(ListDynamicType, a)...
Update: see at the bottom for important note from pshai about using memory in CCs! I wanted to port some open-source scripts from TradingView to Haas and wanted to have a neat way of collection all the PineScript functions that I needed in 1 place.…