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…
— Author – Strooth – Find me on discord – strooth#4739 — Feel free to donate to support my work or if my script helped you in any way <3 — BTC Adress: 33MsEAbA8tg7SpohgnCpSrmPTBih2UkhxQ — InputGroupHeader('Main') local allowshort = Input('Enable Short', true, 'Enable short positions') local allowlong = Input('Enable Long', true, 'Enable long positions') local allowshortx = ...
Basic bot/template for managing multiple positions and single order per position with stoploss and take profit Get a signal from where ever you like either from another script or remote signal and it will manage multiple positions both long and short. Requires my other custom…
-- ============================================================================ -- 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…
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.…
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…
NobwRAGmBcBMsDYAMAaMBNGy0HUarAAl80BxAVwEsATGMSgQwAsAWAOQGsBbABQCsOAUQAeAGy6CAkgHsA7AFkArAAcwaACoBPZQFMYAZlgBGAgGFpXLgwB21Ngy57oYAIK21Yc9es6AxgBdpACcYcAoaOkF9ayYADi5/AHdZSWVE0SYAZTZ5IwA1awAxDy8fAMppawBnGGAAXTQeBiCHHX8dEOhwe0c6HWE/cnaPLV0DNEkqgCUdAEcqIJ1aaAAzBlEqnQmqwhpqHWsYNY2tsEnCyh1RZePNtBdRUWlEtnJHo/W7sAARHSrfIKUZT+CqHZweTLkADmUL+IMqtQaZyqkmsyiGMH8QXIOgAvmhMoEWrC6IVPno0L81m9/Hl1jjSeSwPizmihjVoKA...
A Template with the basics Similar to SMM, main idea is to enable directional dynamics by using the multipliers to avoid large counter position with conservative staged scale-ins . dependency: Added some entry logics -Typical Price reversal -filter first and additional entries with MFI suggest…
-- 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.…