RelativelyShittyIndicator (description of what exactly is inside below)
stableDescription
'Original HaasOnline Real Simple Indicators (3 in one)
UPDATE for dependency
CC_SmoothMoneyFlowArray(interval you first need CC_SMMA]
https://www.haasscripts.com/t/cmd-smoothed-moving-average-smma/
https://www.haasscripts.com/t/smmasmoothedmfi-array/
This first new start of the series after RSI+ROC+CMO: SMMAsmoothedMFI + RSI + ROC/3
+ etc are non allowed characters but fortunately other shit is... :D
Here many things did and did not go as planned, my enhancement in mind still to 'achieve' at later date was to include EasyMFI with delayed buy signal. made that even hacked around the Settings inputs to include my shit*pardon*but didn't think about how summing a signal with these actual values would be 'misunderstood' by the editor and an error on my part.. So hence the SMMA dependant.. dependency: SMMAsmoothedMFI Array
then...
I even failed at the DelaySignal attempt inside this one in SE at the stage when we have a signal to delay....
=VERY SHITTY Kobalt! Yes! I agree, still better than nothing .. will do better... Soon...
From a personal amusing scrap from bear market frustrations to an on the fly replacement used elsewhere
2 Shit(=dump/short) or not 2 Shit? That is... Entirely up to you my friend!.. Your "relatively shitty investment" might still make a profit!
Might make this in to a series of Random Selected Indicators to sum
(they will in secret not be random at all!... but carefully curated before union....)
thinking: SchaffTrendCycle+TSI and maybe weigh those 2x and add 1x TRIX with appropriate length for SchaffTSICycleTRIXTrend who knows what gold will turn of it.,.
HaasScript
--dependencies -- Define command
DefineCommand('RelativelyShittyIndicator', 'RSI + other Relative "Stuff" Inside.')
--2 Shit(=dump/short) or not 2 Shit? That is... Up to you my friend!.. Your "relatively shitty investment" might still make a profit!
-- Original Haasonline Relatively Simple Indicator.
-- Define command parameters.
local chartIndex = DefineParameter(NumberType, 'chartIndex', 'The index on which to chart', true, 8, 'Number')
local name = DefineParameter(StringType, 'name', 'Unique name of the indicator.', true, 'RelativelyShittyIndicator', 'Text')
local interval = DefineParameter(NumberType, 'interval', 'Used interval for price data. Default is 0 and the main interval will be used.', false, 0, 'Number,InputInterval')
-- This will improve our backtest speed when using the command.
DefineIntervalOptimization(interval)
-- Input fields for the indicator.
InputGroupHeader(' '..name..' Settings')
-- Inputfields
local interval = InputInterval( ' Interval', 3, 'Used for all three..')
local rsilength = Input(' RSI length', 16)
local roclength = Input(' ROC length', 3, 'on')
local mfilength = Input(' MFI length', 14)
local smmamfi = Input(' MFI SMMAhoothing', 6)
local sellline = Input(' Dump it', 90)
local buyline = Input(' Pump it', 30)
-- Get information
local prices = HLCPrices(interval)
-- Calculation
local rsi = RSI(prices,rsilength)
local roc = ROC(prices,roclength) -- changing ROC and all references to something else like TSI etc... local tsi = TSI(prices,tsilength) doesn't seem to work as eaqsy as I expected..
--local ezmfi = EasyMFI(chartIndex+2, '', InputInterval( ' Interval', 0, '', 'EasyMFI Settings'))
--ChartSetOptions(chartIndex+2, 'EasyMFI')
-- Plotting the lines in Easy's isn't what it used 2 B...[PlotLineBuySellZone: sell line bug]
--Easy obviously return signals not a value easy to add..hence the quick limited aproximation of EasyMFI MA Types:
local smfi = CC_SmoothMoneyFlowArray(interval, mfilength, smmamfi, chartIndex)
local ShitInside = rsi[1] + roc[1] + smfi[1] / 3
Plot(chartIndex, 'DumpOrPump?', ShitInside, Yellow)
PlotHorizontalLine(chartIndex, '2 DUMP or not 2 dumb: Sir? I NEED to DUMP! Quick please! at a discount...', Green, buyline)
PlotHorizontalZone(chartIndex, 'diamondhands', Gold(13), buyline, sellline)
PlotHorizontalLine(chartIndex, 'Sir? May I buy that good "premium shit" again please?', Red, sellline)
ChartSetAxisOptions(chartIndex, RightAxis, 0, 100)
ChartSetOptions(chartIndex, 'relatively shitty index')
--PlotLineBuySellZone(chartIndex+1, 'plotLineBuySellZone UPPER LINE IS MISSING..', ShitInside, buyline, sellline )
--ChartSetOptions(chartIndex+1, 'plotLineBuySellZone UPPER LINE IS MISSING..for a few weeks? Does anyone know?')
-- Determine the signal.
local signal = GetBuySellLevelSignal(ShitInside, buyline, sellline)
--if signal == SignalBuy then
--DelaySignal(SignalBuy, Input('Delay Buy signal', 30, 'minutes.', ' '..name..' Settings'))
-- 'the' end for today..
DoSignal(signal, 'awww sjeeet!')
DefineOutput(EnumType, signal, 'Signal result', 'TradeBotContainer, IndicatorContainer, Signal Helpers')
1 Comment
Sign in to leave a comment.
Hello! When I save this command, get error in string 32 "16. 21 Feb 2022 16:27:07 ERROR: Command script is invalid and can not be used.15. 21 Feb 2022 16:27:07 ERROR: Index out of range exception." How to fix this? SMMAsmoothedMFI Array save as command.