I don't rely heavily on it it shows the beginning of price up/down phases.this was sorta cool, what is the hrpfp indicator, i have not seen this yet.
SeeOh thank
plot BuySignal = if midTermHigher and LongTermHigher then MovAvg_L1x else Double.NaN;
BuySignal.SetDefaultColor (Color.White); #(CreateColor(0, 153, 0));
BuySignal.SetPaintingStrategy(PaintingStrategy.POINTS);
BuySignal.SetLineWeight(2);
BuySignal.HideBubble();
BuySignal.HideTitle();
plot SellSignal = if midTermLower and LongTermLower then MovAvg_H1x else Double.NaN;
SellSignal.SetDefaultColor(Color.White);
SellSignal.SetPaintingStrategy(PaintingStrategy.POINTS);
SellSignal.SetLineWeight(2);
SellSignal.HideBubble();
SellSignal.HideTitle();
# Cloud Fill -----------------------------
AddCloud(MovAvg_H, MovAvg_L, Color.LIGHT_GRAY);
alert (close>BuySignal,"ChannelDotup", alert.bar,Sound.ding);
alert (close<SellSignal,"ChannelDotdown", alert.bar,Sound.ding);
#alert (close>BuySignal,"ChannelDotup", alert.once,Sound.ding);
#alert (close<SellSignal,"ChannelDotdown", alert.once,Sound.ding);
Hello @J007RMC I am trying to understand Swing Hi & Lo. Red and Green dot markers do they show up for current candle? or they show up after candle has closed?Time to put this thread to rest. I'm going to take this 1 step further my only interests here are to turn you guys onto a killer system but you have to do the research to find the missing piece of the puzzle. I've added major/minor lines, basic swing waves high script, and projection pivots scripts.
How do I trade the waves?
Always watch the pre-market I leave my setting on.
At what point is the ending/beginning wave pe-open
At what point is the ending/beginning wave at close
Can be used with any time frame
I prefer watching my charts on 30 min time frame and enter/exit 2-5min
I trade the beginning and end of the minor/major wave sets.
Of course, the minor-major waves are based on resistance/support levels GL
Basic Script: https://tos.mx/8QkMnqz
Chart for illustrated purposes not duplicable/transferable.
Right, these do a repaint after price sets below the swing high dot is when I generally look for entries/visa versa often the high lows repaint bummer so one needs to wait oh say use your moving averages to confirm and candle confirmations too. every wave on all time frames will complete the up/down cycle. I also follow the lines once set small or large time frames for me the 5 and 2 min charts and 15 min chart. Once a line is drawn I begin looking for entries/exits depends on your risk/reward but that's up to you may need to watch to begin to get comfortable with it. Just how I play it. Sometimes I may run two charts 1 for uvxy/vix and 1 for spy just me though {quick scalps 2min time frames}. The dot markers show up after the candles. Notice the longer line draws are considered major wave completion for that time frame the shorter draws are the minor wave functions.after the candle closes, its basically zigzag indicator just points instead
Here ya goHi J, can you share the code for the indicator you posted here. thank you!
#StudyName: RSI_Laguerre_Lines_wTargets
#Version/Date: v1 5/30/17
#TOS.mx Link:
#Type: [Study]
#Description: RSI in Laguerre Time MTF plotted on Upper chart
#Author: jcseattle
#Copyright: Copyright jcseattle/amalia 2016. All rights reserved.
#Copyleft: This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version. See <[URL]http://www.gnu.org/licenses/[/URL]>
#Requested By: ""
#History: Ver Date Auth Change
#First draft v1 5/30/17 jcseattle - No changes
# Notes :Based off original script in
# RSI in Laguerre Time MTF Option_v3
# Mobius
# V02.07.2014
# translation of J Elher's code
# Annotation : ""
# Trading Notes : ""
# Start Code
def na = Double.NaN;
script R {
input gamma = .2;
input usecandletype = {candle_hybrid, default candle};
input usehigheraggperiod = {default "Current", "Higher"};
input outputformat = {default Rounded, "Not Rounded"};
;#Hint outputformat: 'Not Rounded' is used for notes, bonds (eg: 109'110), forex, etc type format.
input atrlength = 21;
input agg = AggregationPeriod.TWO_MIN;
input overbought = .8;
input oversold = .2;
def o;
def h;
def l;
def c;
def CU1;
def CU2;
def CU;
def CD1;
def CD2;
def CD;
def L0;
def L1;
def L2;
def L3;
plot RSI;
plot OS;
plot OB;
def error = usehigheraggperiod == usehigheraggperiod."Higher" and GetAggregationPeriod() > agg;
switch (usehigheraggperiod) {
case Current:
if usecandletype == usecandletype.candle_hybrid {
o = (open + close[1]) / 2;
h = Max(high, close[1]);
l = Min(low, close[1]);
c = (o + h + l + close) / 4;
} else {
o = open;
h = high;
l = low;
c = close;
}
case Higher:
if error {
o = Double.NaN;
h = Double.NaN;
l = Double.NaN;
c = Double.NaN;
} else {
if usecandletype == usecandletype.candle_hybrid {
o = (open(period = agg) + close(period = agg)[1]) / 2;
h = Max(high(period = agg) , close(period = agg)[1]);
l = Min(low(period = agg) , close(period = agg)[1]);
c = ((open(period = agg) + close(period = agg)[1]) / 2
+ Max(high(period = agg), close(period = agg)[1])
+ Min(low(period = agg) , close(period = agg)[1])
+ close(period = agg)) / 4;
} else {
o = open(period = agg);
h = high(period = agg);
l = low(period = agg);
c = close(period = agg);
}
}
}
L0 = (1 – gamma) * c + gamma * L0[1];
L1 = -gamma * L0 + L0[1] + gamma * L1[1];
L2 = -gamma * L1 + L1[1] + gamma * L2[1];
L3 = -gamma * L2 + L2[1] + gamma * L3[1];
if L0 >= L1
then {
CU1 = L0 - L1;
CD1 = 0;
} else {
CD1 = L1 - L0;
CU1 = 0;
}
if L1 >= L2
then {
CU2 = CU1 + L1 - L2;
CD2 = CD1;
} else {
CD2 = CD1 + L2 - L1;
CU2 = CU1;
}
if L2 >= L3
then {
CU = CU2 + L2 - L3;
CD = CD2;
} else {
CU = CU2;
CD = CD2 + L3 - L2;
}
RSI = if IsNaN(close) then Double.NaN
else if CU + CD <> 0
then CU / (CU + CD) else 0;
OS = if IsNaN(close)
then Double.NaN else oversold;
OB = if IsNaN(close)
then Double.NaN
else overbought;
def mid = if IsNaN(close) then Double.NaN else 0.5;
def lineh = 1.2;
def linel = -.2;
# End Code Basic RSI Laguerre - Author: Mobius
}
def Up = if R() crosses above R().OS then 1 else 0;
def u = if R() crosses above R().OB then 1 else 0;
def Dn = if R() crosses below R().OB then 1 else 0;
def d = if R() crosses below R().OS then 1 else 0;
def Green = if Up
#or u
then low else 0;
def Red = if Dn
#or d
then high else 0;
def showLines = 1;
def trendchange = if Green then low else if Red then high else trendchange[1];
def PL = if !IsNaN(trendchange)
then trendchange
else PL[1];
plot pivotLine = if PL > 0
then PL
else Double.NaN;
pivotLine.SetPaintingStrategy(PaintingStrategy.LINE);
pivotLine.SetHiding(!showLines);
input showArrows = yes;
plot ArrUp = if showArrows and Green then low else 0;
ArrUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
ArrUp.SetDefaultColor(Color.GREEN);
plot ArrDn = if showArrows and Red then high else 0;
ArrDn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
ArrDn.SetDefaultColor(Color.RED);
pivotLine.AssignValueColor(if R() < R().OB then Color.RED else if R() > R().OS then Color.GREEN else Color.BLACK);
input ShowLabels = yes;
#Multipliers for ATR targets
input firsttgt = 1.618;
input secondtgt = 3.447;
input thirdtgt = 4.25;
input ATRLength = 8;#default is 14
def agg = if GetAggregationPeriod() > AggregationPeriod.FIFTEEN_MIN then GetAggregationPeriod() else AggregationPeriod.FIFTEEN_MIN;#You can edit this to just (GetAggregationPeriod())
def ATR = Average(TrueRange(High(period = agg),Close(period = agg),Low(period = agg)),ATRLength);
addlabel(ShowLabels, "ATR = " + Round((ATR) / TickSize(),0)*TickSize(), Color.GRAY);
input showStrategy = yes;
def co = if PL[1] and R()[1] > R().OS[1] then 1 else 0;
def firstlongtarget = if co then (PivotLine + ATR*firsttgt) else 0;
def secondlongtarget = if co then (PivotLine + ATR*secondtgt) else 0;
def thirdlongtarget = if co then (PivotLine + ATR*thirdtgt) else 0;
def sto = if PL and R() < R().OB then 1 else 0;
def firstshorttarget = if sto then (PivotLine - ATR*firsttgt) else 0;
def secondshorttarget = if sto then (PivotLine - ATR*secondtgt) else 0;
def thirdshorttarget = if sto then (PivotLine - ATR*thirdtgt) else 0;
# Internal Script Reference
# Author: Mobius
def LineLimit = 30;
def Detrend = 0;
def OnExpansion = yes;
def data = firstlongtarget;
def bar = 0;
def ShowAllPlots = 0;
def ThisBar = HighestAll(bar) - Detrend;
def cLine = if ShowAllPlots == 0
then if bar == ThisBar
then data
else Double.NaN
else data;
def cond1 = CompoundValue(1, if IsNaN(data)
then cond1[1]
else data, data);
def P = if ShowAllPlots == 0
then if ThisBar - LineLimit <= bar
then HighestAll(cLine)
else Double.NaN
else cLine;
plot firstLTarget = if OnExpansion and
IsNaN(data[-1])
then cond1
else Double.NaN;
firstLTarget.SetDefaultColor(Color.GREEN);
addlabel(ShowLabels, if R() > R().OS then "Long Target = " + Round((firstLTarget) / TickSize(),0)*TickSize() else "", Color.GREEN);
AddChartBubble(IsNaN(close) and !isNaN(close[1]),
firstLTarget,
"First Target = " + Round((firstLTarget) / TickSize(),0)*TickSize(),
Color.GREEN,
yes);
def difflongtarget = if close < firstlongtarget then (firstlongtarget - close) else (close - firstlongtarget);
addLabel(ShowLabels, if R() > R().OS then "Diff 1st L tgt = " + (Round((difflongtarget) / TickSize(),0)*TickSize()) else "", Color.LIGHT_GREEN);
def LineLimit3 = 30;
def Detrend3 = 0;
def OnExpansion3 = yes;
def data3 = secondlongtarget;
def bar3 = 0;
def ShowAllPlots3 = 0;
def ThisBar3 = HighestAll(bar) - Detrend;
def cLine3 = if ShowAllPlots3 == 0
then if bar3 == ThisBar3
then data3
else Double.NaN
else data3;
def cond3 = CompoundValue(1, if IsNaN(data3)
then cond3[1]
else data3, data3);
def P3 = if ShowAllPlots3 == 0
then if ThisBar3 - LineLimit3 <= bar3
then HighestAll(cLine3)
else Double.NaN
else cLine3;
plot secondLTarget = if OnExpansion3 and
IsNaN(data3[-1])
then cond3
else Double.NaN;
secondLTarget.SetDefaultColor(Color.GREEN);
addlabel(ShowLabels, if R() > R().OS then "2nd Long Target = " + Round((secondLTarget) / TickSize(),0)*TickSize() else "", Color.GREEN);
AddChartBubble(IsNaN(close) and !isNaN(close[1]),
secondLTarget,
"2nd Long Target = " + Round((secondLTarget) / TickSize(),0)*TickSize(),
Color.GREEN,
yes);
def difflongtarget2 = if close < secondlongtarget then (secondlongtarget - close) else (close - secondlongtarget);
addLabel(ShowLabels, if R() > R().OS then "Diff 2nd L tgt = " + Round((difflongtarget2) / TickSize(),0)*TickSize() else "", Color.LIGHT_GREEN);
def LineLimit9 = 30;
def Detrend9 = 0;
def OnExpansion9 = yes;
def data9 = thirdlongtarget;
def bar9 = 0;
def ShowAllPlots9 = 0;
def ThisBar9 = HighestAll(bar9) - Detrend9;
def cLine9 = if ShowAllPlots9 == 0
then if bar9 == ThisBar9
then data9
else Double.NaN
else data9;
def cond9 = CompoundValue(1, if IsNaN(data9)
then cond9[1]
else data9, data9);
def P9 = if ShowAllPlots9 == 0
then if ThisBar9 - LineLimit9 <= bar9
then HighestAll(cLine9)
else Double.NaN
else cLine9;
plot thirdLTarget = if OnExpansion9 and
IsNaN(data9[-1])
then cond9
else Double.NaN;
thirdLTarget.SetDefaultColor(Color.GREEN);
addlabel(ShowLabels, if R() > R().OS then "3rd Long Target = " + Round((thirdLTarget) / TickSize(),0)*TickSize() else "", Color.GREEN);
AddChartBubble(IsNaN(close) and !isNaN(close[1]),
thirdLTarget,
"3rd Long Target = " + Round((thirdLTarget) / TickSize(),0)*TickSize(),
Color.GREEN,
yes);
def difflongtarget9 = if close < thirdlongtarget then (thirdlongtarget - close) else (close - thirdlongtarget);
addLabel(ShowLabels, if R() > R().OS then "Diff 3rd L tgt = " + Round((difflongtarget9) / TickSize(),0)*TickSize() else "", Color.LIGHT_GREEN);
def LineLimit2 = 30;
def Detrend2 = 0;
def OnExpansion2 = yes;
def data2 = firstshorttarget;
def bar2 = 0;
def ShowAllPlots2 = 0;
def ThisBar2 = HighestAll(bar2) - Detrend2;
def cLine2 = if ShowAllPlots2 == 0
then if bar2 == ThisBar2
then data2
else Double.NaN
else data2;
def cond2 = CompoundValue(1, if IsNaN(data2)
then cond2[1]
else data2, data2);
def P2 = if ShowAllPlots2 == 0
then if ThisBar2 - LineLimit2 <= bar2
then HighestAll(cLine2)
else Double.NaN
else cLine2;
plot firstSTarget = if OnExpansion2 and
IsNaN(data2[-1])
then cond2
else Double.NaN;
firstSTarget.SetDefaultColor(Color.RED);
addlabel(ShowLabels, if R() < R().OB then "1st Short Target = " + Round((firstSTarget) / TickSize(),0)*TickSize() else "", Color.RED);
AddChartBubble(IsNaN(close) and !IsNaN(Close[1]),
firstSTarget,
"Short Target = " + Round((firstSTarget) / TickSize(),0)*TickSize(),
Color.RED,
no);
def diffshorttarget = if close < data2 then (data2 - close) else (close - data2);
addLabel(ShowLabels, if R() < R().OB then "Diff 1st S tgt = " + Round((diffshorttarget) / TickSize(),0)*TickSize() else "", Color.LIGHT_RED);
#
def LineLimit4 = 30;
def Detrend4 = 0;
def OnExpansion4 = yes;
def data4 = secondshorttarget;
def bar4 = 0;
def ShowAllPlots4 = 0;
def ThisBar4 = HighestAll(bar4) - Detrend4;
def cLine4 = if ShowAllPlots4 == 0
then if bar4 == ThisBar4
then data4
else Double.NaN
else data4;
def cond4 = CompoundValue(1, if IsNaN(data4)
then cond4[1]
else data4, data4);
def P4 = if ShowAllPlots4 == 0
then if ThisBar4 - LineLimit4 <= bar4
then HighestAll(cLine4)
else Double.NaN
else cLine4;
plot secondSTarget = if OnExpansion4 and
IsNaN(data4[-1])
then cond4 #
else Double.NaN;
secondSTarget.SetDefaultColor(Color.RED);
#Round((close + (atr)) / TickSize(), 0) * TickSize()
addlabel(ShowLabels, if R() < R().OB then "2nd Short Target = " + Round((secondSTarget) / TickSize(),0)*TickSize() else "", Color.RED);
AddChartBubble(IsNaN(close) and !IsNaN(Close[1]),
secondSTarget,
"2nd Short Target = " + Round((secondSTarget) / TickSize(),0)*TickSize(),
Color.RED,
no);
def diffshorttgt2 = if close < secondshorttarget then (secondshorttarget - close) else (close - secondshorttarget);
addLabel(ShowLabels, if R() < R().OB then "Diff 2nd S tgt = " + Round((diffshorttgt2) / TickSize(),0)*TickSize() else "", Color.LIGHT_RED);
def LineLimit8 = 30;
def Detrend8 = 0;
def OnExpansion8 = yes;
def data8 = thirdshorttarget;
def bar8 = 0;
def ShowAllPlots8 = 0;
def ThisBar8 = HighestAll(bar8) - Detrend8;
def cLine8 = if ShowAllPlots8 == 0
then if bar8 == ThisBar8
then data8
else Double.NaN
else data8;
def cond8 = CompoundValue(1, if IsNaN(data8)
then cond8[1]
else data8, data8);
def P8 = if ShowAllPlots8 == 0
then if ThisBar8 - LineLimit8 <= bar8
then HighestAll(cLine8)
else Double.NaN
else cLine8;
plot thirdSTarget = if OnExpansion8 and
IsNaN(data8[-1])
then cond8
else Double.NaN;
thirdSTarget.SetDefaultColor(Color.RED);
addlabel(ShowLabels, if R() < R().OB then "3rd Short Target = " + Round((thirdSTarget) / TickSize(),0)*TickSize() else "", Color.RED);
AddChartBubble(IsNaN(close) and !isNaN(close[1]),
thirdSTarget,
"3rd Short Target = " + Round((thirdSTarget) / TickSize(),0)*TickSize(),
Color.RED,
no);
def diffshorttarget3 = if close < thirdshorttarget then (thirdshorttarget - close) else (close - thirdshorttarget);
addLabel(ShowLabels, if R() < R().OB then "Diff 3rd S tgt = " + Round((diffshorttarget3) / TickSize(),0)*TickSize() else "", Color.LIGHT_RED);
#Inputs:
input nFE = 34;#hint nFE: length for Fractal Energy calculation.
input PriceColor = yes;
plot gamma1 = Log(Sum((Max(high, close[1]) - Min(low, close[1])), nFE) /
(Highest(high, nFE) - Lowest(low, nFE))) / Log(nFE);
gamma1.AssignNormGradientColor(nFE, Color.GREEN, Color.RED);
gamma1.SetLineWeight(2);
addLabel(showlabels, if showlabels and gamma1 < 0.382 then "Trending =" + gamma1 else if gamma1 > 0.618 then "Non-Trending =" + gamma1 else "FE = " + gamma1, if gamma1 < 0.382 then Color.WHITE else if gamma1 > 0.618 then Color.CYAN else Color.GRAY);
AssignPriceColor(if PriceColor and gamma1
#crosses below
<
.382 then Color.WHITE else if PriceColor and gamma1
#crosses above
[QUOTE][/QUOTE]
.618 then Color.CYAN else Color.CURRENT);
# End Code
This indicator is currently testing on-site I have had very good results using the Moxie lower indicator all time frames.I am new to this usethinkscript site. Just read your post of AccDist study and gave it a try. Thanks for posting. I had been using Volume Zone Oscillator, but comparing your indicator to it, I like yours much better. It seems to be more accurate and a smoother indicator.
Any suggestions on interpretation? I see the start of a relatively steep upslope as a good confirming long entry for stocks (daily at least).
What I am currently running try this buy low sell lo visa versa and wait for the reversal signals use short time frame 2-5 minutes and get back to me but watch first. Must wait for the reversal signal candles lag price but the candles will catch-up. Bar chart setting. Try on a contract until you become used to the chart.Absolutely both short and long-term timeframes.
@J007RMC - Thanks for sharing the grid. How are you currently using it?What I am currently running try this buy low sell lo visa versa and wait for the reversal signals use short time frame 2-5 minutes and get back to me but watch first. Must wait for the reversal signal candles lag price but the candles will catch-up. Bar chart setting. Try on a contract until you become used to the chart.
https://tos.mx/8fWK04w
2 to 5min min time frame 8 ema crossing above 19 ema or visa versa. Just follow the upper chart and reversals try the 2min time frame set your stop where you feel comfortable just a suggestion and watch for ema crossovers too.@J007RMC - Thanks for sharing the grid. How are you currently using it?
Let me know if my understanding is correct -
To go long (vice-versa for short)
- Moxie is above 0
- EMA 8 > EMA 19
- HA reversal in the long direction
I am using it on 2min TF. Do you have a preferred time frame to get the best output?
Do you have any suggestions on how to avoid when price is in range?2 to 5min min time frame 8 ema crossing above 19 ema or visa versa. Just follow the upper chart and reversals try the 2min time frame set your stop where you feel comfortable just a suggestion and watch for ema crossovers too.
https://usethinkscript.com/threads/completed-heikin_ashi-indicator.5251/page-12#posts
Whatever your trade look to higher time frames ie,, weekly, daily, 4hr, 1 hr and so on to see the overall direction of the trade first. Try a time frame higher than 2min the 5min how does it look now.Do you have any suggestions on how to avoid when price is in range?
Thanks for your suggestions. It seems, higher time frame would help me to avoid to take any trade when the price is in range.Whatever your trade look to higher time frames ie,, weekly, daily, 4hr, 1 hr and so on to see the overall direction of the trade first. Try a time frame higher than 2min the 5min how does it look now.
Utilize your time frames
Thanks for your suggestions. It seems, higher time frame would help me to avoid to take any trade when the price is in range.
Hi well, I like 4 charts up so I like to run the 2min, 5min, 15min, and 1hr, that said if I had to pick a favorite time frame it is the 15min.J007: so you're using accumdistbuypr even though the readings change depending on period length selected and zoom levels? i guess the question then become what period lengths are you using with 15min and 30min charts? thanks!
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.