change the below line 88 from:@samer800 , is there a way to avoid this apparent graphic distortion as you can see in the picture ? View attachment 19943
def FA = FLAT1;
to:
def FA = if FLAT1 then FLAT1 else na;
change the below line 88 from:@samer800 , is there a way to avoid this apparent graphic distortion as you can see in the picture ? View attachment 19943
You nailed it. Thank you so muchchange the below line 88 from:
def FA = FLAT1;
to:
def FA = if FLAT1 then FLAT1 else na;
check the belowgreat indicator can it be put into MTF version?
@samer800 is it possible to have this as an mtf version thanks
# https://www.tradingview.com/v/DlWtErRh/
#// © LOKEN94
#// Custom version based of [M2J] Indicator | MCDX
#study("LOKEN ? (v4) BULLISH MCDX v2.2", "?",precision=2)
# Converted by Sam4Cok@Samer800 - 09/2023
# Updated by Sam4Cok@Samer800 - 11/2023 - added MTF option
declare lower;
#declare zerobase;
input timeframe = {Default "Chart", "Custom"};
input customTimeframe = AggregationPeriod.FIFTEEN_MIN;
input RSIBaseBanker = 50;#, "Banker Base"
input RSIPeriodBanker = 50;#, "Banker RSI Period"
input RSIBaseHotMoney = 30;#, "Hot Money RSI Base"
input RSIPeriodHotMoney = 40;#, "Hot Money RSI Period"
input SensitivityBanker = 1.5;#, "Sensitivity Banker"
input SensitivityHotMoney = 0.7;#, "Sensitivity Hot Money"
input threshold = 8.5;
def na = Double.NaN;
def last = isNaN(Close);
def chart = timeframe==timeframe."Chart";
def c = if chart then close else close(Period = customTimeframe);
def v = if chart then volume else volume(Period = customTimeframe);
DefineGlobalColor("nor", CreateColor(132, 175, 201));
#vwma(source, length)
script VWMA {
input src = close;
input len = 15;
input v_ = volume;
def v = if isNaN(v_) then 1 else v_;
def srcV = src * v;
def VWMA = Average(srcV, len) / Average(v, len);
plot result = VWMA;
}
#rsi_function(sensitivity, rsiPeriod, rsiBase) =>
script rsi_function {
input src = close;
input sensitivity = 1;
input rsiPeriod = 50;
input rsiBase = 1;
def nRSI = RSI(Price = src, Length = rsiPeriod);
def rsi_ = sensitivity * (nRSI - rsiBase);
def rsi = if rsi_ > 20 then 20 else
if rsi_ < 0 then 0 else rsi_;
plot out = rsi;
}
def rsi_Banker = rsi_function(c, SensitivityBanker, RSIPeriodBanker, RSIBaseBanker);
def rsi_HotMoney = rsi_function(c, SensitivityHotMoney, RSIPeriodHotMoney, RSIBaseHotMoney);
def hot = rsi_HotMoney;
def bank = rsi_Banker;
def hotMoney = hot;#, "Hot Money"
def hotma2 = WildersAverage(hot, 2);
def bankma2 = Average(bank, 2);
def hotma7 = WildersAverage(hot, 7);
def bankma7 = ExpAverage(bank, 7);
def hotma31 = WildersAverage(hot, 31);
def bankma31 = ExpAverage(bank, 31);
def hotma = ExpAverage(((hotma2 * 34) + (hotma7 * 33) + (hotma31 * 33)) / 100, 2);
def bankma = Average(((bankma2 * 70) + (bankma7 * 20) + (bankma31 * 10)) / 100, 2);
def hotsignal = WildersAverage(hotma, 2);
def banksignal = WildersAverage(bankma, 4);
def hotline = hotma; # "Hot Money MA"
def bankline = bankma;# "Banker MA"
def hotline2 = hotsignal;# "Hot Money MA2"
def bankline2 = banksignal; # "Banker MA2"
#//
AddCloud(hotline , hotline2, Color.DARK_GREEN, Color.DARK_RED);
AddCloud(bankline, bankline2, Color.VIOLET, Color.DARK_ORANGE);
AddCloud(hot, hotline, Color.GREEN, Color.RED);
#//
def hbAvg = ((hot*10)+(hotma*35)+(hotsignal*15)+(bankma*35)+(banksignal* 5))/ 100;
def hbma = vwma(hbAvg, 2, v);
plot HBMA2 = hbma; # "Trend Tracker"
HBMA2.AssignValueColor(if hbma > threshold then Color.CYAN else Color.MAGENTA);
plot h1 = if last then na else threshold;#, "Bullish Confirmation Line"
h1.SetDefaultColor(Color.GRAY);
h1.SetStyle(Curve.SHORT_DASH);
#//Crossing signals
def downtrendsignal = Crosses(hotma, hotsignal, CrossingDirection.BELOW);
def uptrendsignal = Crosses(hotma, hotsignal, CrossingDirection.ABOVE);
plot dnSig = if downtrendsignal then hbma else na;# "Downtrend signal"
plot upSig = if uptrendsignal then hbma else na; # "Uprend signal"
dnSig.SetStyle(Curve.POINTS);
upSig.SetStyle(Curve.POINTS);
dnSig.SetDefaultColor(Color.RED);
upSig.SetDefaultColor(Color.GREEN);
def dnCond = Bank<Bank[1] and Bank<Bank[2] and Bank[1]<Bank[2] and Bank<Bank[3] and Bank<Bank[4] and Bank[3]<Bank[4] and Bank[6]>8.5 and Bank<10;
plot Dump = if Bank<Bank[1]/1.75 then Bank else na;#, "Dump Candles"
plot DnCandle = if dnCond then Bank else na;#, "Down Candles"
plot PumpCandle = if Bank>hbma then Bank else na;# "Pump Candles"
plot Retest = if banksignal>bankma and Bank>0 then Bank else na; # "Retest Candles"
Dump.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
Retest.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
PumpCandle.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
DnCandle.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Dump.SetDefaultColor(Color.RED);
Retest.SetDefaultColor(Color.DARK_RED);
PumpCandle.SetDefaultColor(Color.GREEN);
DnCandle.SetDefaultColor(Color.DARK_GRAY);
plot Banker = bank;#, "Banker"
Banker.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Banker.AssignValueColor(if bank > 0 then GlobalColor("nor") else Color.DARK_GRAY);
#-- END of CODE
Hi @samer800check the below
CSS:# https://www.tradingview.com/v/DlWtErRh/ #// © LOKEN94 #// Custom version based of [M2J] Indicator | MCDX #study("LOKEN ? (v4) BULLISH MCDX v2.2", "?",precision=2) # Converted by Sam4Cok@Samer800 - 09/2023 # Updated by Sam4Cok@Samer800 - 11/2023 - added MTF option declare lower; #declare zerobase; input timeframe = {Default "Chart", "Custom"}; input customTimeframe = AggregationPeriod.FIFTEEN_MIN; input RSIBaseBanker = 50;#, "Banker Base" input RSIPeriodBanker = 50;#, "Banker RSI Period" input RSIBaseHotMoney = 30;#, "Hot Money RSI Base" input RSIPeriodHotMoney = 40;#, "Hot Money RSI Period" input SensitivityBanker = 1.5;#, "Sensitivity Banker" input SensitivityHotMoney = 0.7;#, "Sensitivity Hot Money" input threshold = 8.5; def na = Double.NaN; def last = isNaN(Close); def chart = timeframe==timeframe."Chart"; def c = if chart then close else close(Period = customTimeframe); def v = if chart then volume else volume(Period = customTimeframe); DefineGlobalColor("nor", CreateColor(132, 175, 201)); #vwma(source, length) script VWMA { input src = close; input len = 15; input v_ = volume; def v = if isNaN(v_) then 1 else v_; def srcV = src * v; def VWMA = Average(srcV, len) / Average(v, len); plot result = VWMA; } #rsi_function(sensitivity, rsiPeriod, rsiBase) => script rsi_function { input src = close; input sensitivity = 1; input rsiPeriod = 50; input rsiBase = 1; def nRSI = RSI(Price = src, Length = rsiPeriod); def rsi_ = sensitivity * (nRSI - rsiBase); def rsi = if rsi_ > 20 then 20 else if rsi_ < 0 then 0 else rsi_; plot out = rsi; } def rsi_Banker = rsi_function(c, SensitivityBanker, RSIPeriodBanker, RSIBaseBanker); def rsi_HotMoney = rsi_function(c, SensitivityHotMoney, RSIPeriodHotMoney, RSIBaseHotMoney); def hot = rsi_HotMoney; def bank = rsi_Banker; def hotMoney = hot;#, "Hot Money" def hotma2 = WildersAverage(hot, 2); def bankma2 = Average(bank, 2); def hotma7 = WildersAverage(hot, 7); def bankma7 = ExpAverage(bank, 7); def hotma31 = WildersAverage(hot, 31); def bankma31 = ExpAverage(bank, 31); def hotma = ExpAverage(((hotma2 * 34) + (hotma7 * 33) + (hotma31 * 33)) / 100, 2); def bankma = Average(((bankma2 * 70) + (bankma7 * 20) + (bankma31 * 10)) / 100, 2); def hotsignal = WildersAverage(hotma, 2); def banksignal = WildersAverage(bankma, 4); def hotline = hotma; # "Hot Money MA" def bankline = bankma;# "Banker MA" def hotline2 = hotsignal;# "Hot Money MA2" def bankline2 = banksignal; # "Banker MA2" #// AddCloud(hotline , hotline2, Color.DARK_GREEN, Color.DARK_RED); AddCloud(bankline, bankline2, Color.VIOLET, Color.DARK_ORANGE); AddCloud(hot, hotline, Color.GREEN, Color.RED); #// def hbAvg = ((hot*10)+(hotma*35)+(hotsignal*15)+(bankma*35)+(banksignal* 5))/ 100; def hbma = vwma(hbAvg, 2, v); plot HBMA2 = hbma; # "Trend Tracker" HBMA2.AssignValueColor(if hbma > threshold then Color.CYAN else Color.MAGENTA); plot h1 = if last then na else threshold;#, "Bullish Confirmation Line" h1.SetDefaultColor(Color.GRAY); h1.SetStyle(Curve.SHORT_DASH); #//Crossing signals def downtrendsignal = Crosses(hotma, hotsignal, CrossingDirection.BELOW); def uptrendsignal = Crosses(hotma, hotsignal, CrossingDirection.ABOVE); plot dnSig = if downtrendsignal then hbma else na;# "Downtrend signal" plot upSig = if uptrendsignal then hbma else na; # "Uprend signal" dnSig.SetStyle(Curve.POINTS); upSig.SetStyle(Curve.POINTS); dnSig.SetDefaultColor(Color.RED); upSig.SetDefaultColor(Color.GREEN); def dnCond = Bank<Bank[1] and Bank<Bank[2] and Bank[1]<Bank[2] and Bank<Bank[3] and Bank<Bank[4] and Bank[3]<Bank[4] and Bank[6]>8.5 and Bank<10; plot Dump = if Bank<Bank[1]/1.75 then Bank else na;#, "Dump Candles" plot DnCandle = if dnCond then Bank else na;#, "Down Candles" plot PumpCandle = if Bank>hbma then Bank else na;# "Pump Candles" plot Retest = if banksignal>bankma and Bank>0 then Bank else na; # "Retest Candles" Dump.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM); Retest.SetPaintingStrategy(PaintingStrategy.HISTOGRAM); PumpCandle.SetPaintingStrategy(PaintingStrategy.HISTOGRAM); DnCandle.SetPaintingStrategy(PaintingStrategy.HISTOGRAM); Dump.SetDefaultColor(Color.RED); Retest.SetDefaultColor(Color.DARK_RED); PumpCandle.SetDefaultColor(Color.GREEN); DnCandle.SetDefaultColor(Color.DARK_GRAY); plot Banker = bank;#, "Banker" Banker.SetPaintingStrategy(PaintingStrategy.HISTOGRAM); Banker.AssignValueColor(if bank > 0 then GlobalColor("nor") else Color.DARK_GRAY); #-- END of CODE
@LOKEN94 is the TRADINGVIEW author of this script.@LOKEN94 could you please kindly share a Bearish equivalent of this script?
Thank you@LOKEN94 is the TRADINGVIEW author of this script.
Unfortunately, he does NOT provide ThinkOrSwim scripts.
If you are looking for a Tradingview script, please contact him on Tradingview.
If you are looking for a Bearish ThinkOrSwim version of this script; sorry there is not one.
Have you noticed anything specific when it comes to bearish scalps? If so, do share.This is the best indicator on this entire forum IMHO. The more you look at it, the more you realize it's revealing to you...
I still think this is one of the best indicators on this forum. I've been looking at it for weeks now. I noticed a few opportunities it presents and I'll share a simple on here. Whenever the HBMA line is below a certain point, if you see the red cloud that's typically above it dip below it, it's presenting you with a possible scalp opportunity.
As seen in the image I've attached.
I still love this indicator. It works really well with "discretion trading", but I haven't yet been able to quantify why I'm able to make such good decisions with it in a rules based system for back-testing purposes.
Did you know that by clicking on a member's name, you can easily check when they were last seen on the uTS forum? It's a great way to keep track of who's been around recently, and who hasn't. Speaking of which, it looks like @Bingy has not been around in a while.Have you noticed anything specific when it comes to bearish scalps? If so, do share.
I cannot get it working either. Always got exception. Could someone help @chewie76 ? I tried many different combinations, such as:Can you give more info on how to set up the banker >5 & <5?
I get an "unexpected error" anytime I try this. Not sure why, but doesn't look like I can scan for Banker > 5.I cannot get it working either. Always got exception. Could someone help @chewie76 ? I tried many different combinations, such as:
plot test = Bank > 5 and Bank[1] < 5.
seems Bank is used, but never defined. I changed Bank to rsi_banker, not working either. Very strange. not sure why the original script (not scanner) works.
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.