No Good @Prison Mike That is a study of the Wilders RSI of the RSI in Laguerre Time study. I could be wrong but Laguerre Time Transform Polynomials are for price. They self adjust with the speed of the stock.
Hey Mansor,
I personally use the RSI-L with FE that Mobius made for Theotrade. I use it to trade NQ and ES futures intraday on a 2min time frame to enter and exit trades. I also use an anchor chart of 5-10 times higher time frame so that I am trading with the trend. If the longer time frame is heading up then I only take long entries and vice versa for shorts. You can make small scalps trading against the trend using this indicator, but I dont like doing that unless price action tells me otherwise. Also, I dont find fractal energy of much use on the 2min time frame, its really only useful on longer time frames in my opinion.
Add the RSI-L in your lower study and set the aggregation period to two minutes. Next add the RSI-L to your lower study again, but make sure its in the same rectangle as your first RSI-L Study. Set the aggregation period to 15 minutes. When the 15m RSI-L is in an uptrend place entries using the 2m once the 2m has crossed above the OS line. Do the inverse for you short entries. That way when you enter a trade you will be following the same direction as the longer term trend to give you a better edge. I hope this helps.Hello @BWiz Thank you for the information. It helps a newbie like me. You mentioned that you use this script only for higher time frames and not on 1m or 2m charts. May I please know what other indicator you use for higher time frame to trade futures? Thanks!
Add the RSI-L in your lower study and set the aggregation period to two minutes. Next add the RSI-L to your lower study again, but make sure its in the same rectangle as your first RSI-L Study. Set the aggregation period to 15 minutes. When the 15m RSI-L is in an uptrend place entries using the 2m once the 2m has crossed above the OS line. Do the inverse for you short entries. That way when you enter a trade you will be following the same direction as the longer term trend to give you a better edge. I hope this helps.
I can read price fairly well, so I don't use specific hard stops. Depending on multiple variables I will manage my trades in numerous ways. You said you were a newbie, so my best advice for you would be to use something like ATR indicator (average true range) to help you place a stop loss. Research the ATR and incorporate it into your trading strategy to help you place a hard stop.Hello @BWiz... Your approach is surely promising and I am seeing good results in paper trading. May I please ask how do you determine stop loss? Thanks again!
#########################################
declare lower;
input period = AggregationPeriod.DAY;
input nFE = 13;#hint nFE: length for Fractal Energy calculation.
input RSI_BullishTrigger = .1;
input RSI_BearishTrigger = .9;
DefineGlobalColor("Long", Color.Green);
DefineGlobalColor("Short", Color.RED);
DefineGlobalColor("Neutral", Color.Yellow);
DefineGlobalColor("arrow Buy", Color.Cyan);
DefineGlobalColor("arrow Sell", Color.Orange);
Script SymbolHK_RSI_L{
input period = AggregationPeriod.DAY;
def OP = Open(period= period);
def CP = Close(Period= period);
def HP = High(period= period);
def LP = Low(Period= period);
input nFE = 13;#hint nFE: length for Fractal Energy calculation.
input RSI_BullishTrigger = .1;
input RSI_BearishTrigger = .9;
# Variables:
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;
# Calculations
o = (OP + CP[1]) / 2;
h = Max(HP, CP[1]);
l = Min(LP, CP[1]);
c = (OP + HP + LP + CP) / 4;
#Self adjusting Gamma code
Def gamma = Log(Sum((Max(HP, CP[1]) - Min(LP, CP[1])), nFE) /
(Highest(HP, nFE) - Lowest(LP, nFE)))
/ Log(nFE);
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; }
Def RSIL = if CU + CD <> 0 then CU / (CU + CD) else 0;
Plot result =
if (RSIL > RSI_BearishTrigger) or ((RSIL >= RSIL[1]) and (RSIL > RSI_BullishTrigger))
then 1
else if (RSIL < RSI_BullishTrigger) or ((RSIL < RSIL[1]) and (RSIL < RSI_BearishTrigger))
then -1 else 0;}
Script SymbolHK_RSI_LArrows{
input period = AggregationPeriod.DAY;
def OP = Open(period= period);
def CP = Close(Period= period);
def HP = High(period= period);
def LP = Low(Period= period);
input nFE = 13;#hint nFE: length for Fractal Energy calculation.
input RSI_BullishTrigger = .1;
input RSI_BearishTrigger = .9;
# Variables:
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;
# Calculations
o = (OP + CP[1]) / 2;
h = Max(HP, CP[1]);
l = Min(LP, CP[1]);
c = (OP + HP + LP + CP) / 4;
#Self adjusting Gamma code
Def gamma = Log(Sum((Max(HP, CP[1]) - Min(LP, CP[1])), nFE) /
(Highest(HP, nFE) - Lowest(LP, nFE)))
/ Log(nFE);
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; }
Def RSI = if CU + CD <> 0 then CU / (CU + CD) else 0;
Plot result =
if (RSI Crosses Above RSI_BullishTrigger) or ((RSI[2] > RSI[1]) and (RSI[1] <= RSI))
then 1
else if (RSI Crosses below RSI_BearishTrigger) or ((RSI[2] < RSI[1]) and (RSI[1] > RSI))
then -1 else 0;}
def currentPeriod = GetAggregationPeriod();
def s1;
def h1;
if period >= currentPeriod {
s1 = SymbolHK_RSI_L(period = period ,nFE = nFE, RSI_BullishTrigger = RSI_BullishTrigger, RSI_BearishTrigger = RSI_BearishTrigger);
h1 = SymbolHK_RSI_LArrows(period = period, nFE = nFE, RSI_BullishTrigger = RSI_BullishTrigger, RSI_BearishTrigger = RSI_BearishTrigger);
} else {
s1 = Double.NaN;
h1 = DOuble.Nan;
}
AddLabel(!IsNaN(s1), "RSIL:" + (if period == AggregationPeriod.MONTH then "M"
else
if period == AggregationPeriod.WEEK then "W"
else
if period == AggregationPeriod.FOUR_DAYS then "4D"
else
if period == AggregationPeriod.THREE_DAYS then "3D"
else
if period == AggregationPeriod.TWO_DAYS then "2D"
else
if period == AggregationPeriod.DAY then "D"
else
if period == AggregationPeriod.FOUR_HOURS then "4H"
else
if period == AggregationPeriod.TWO_HOURS then "2H"
else
if period == AggregationPeriod.HOUR then "60m"
else
if period == AggregationPeriod.THIRTY_MIN then "30m"
else
if period == AggregationPeriod.TWENTY_MIN then "20m"
else
if period == AggregationPeriod.FIFTEEN_MIN then "15m"
else
if period == AggregationPeriod.TEN_MIN then "10m"
else
if period == AggregationPeriod.FIVE_MIN then "5m"
else
if period == AggregationPeriod.FOUR_MIN then "4m"
else
if period == AggregationPeriod.THREE_MIN then "3m"
else
if period == AggregationPeriod.TWO_MIN then "2m"
else
if period == AggregationPeriod.MIN then "1m"
else ""), if s1 == 1 then GlobalColor("Long") else if s1 == -1 then GlobalColor("Short") else GlobalColor("Neutral"));
AddLabel(!IsNaN(h1) and h1 != 0, If h1 == 1 then "B" else if h1 == -1 then "S" else "-", if h1 == 1 then GlobalColor("arrow Buy") else if h1 == -1 then GlobalColor("arrow Sell") else color.gray);
# Cloud feature forceIndex FE by Henry Z Kaczmarczyk 2020-25-07
def FELin = If FE < .382 then FE else Double.Nan;
def FENonLin = If FE > .618 then FE else Double.Nan;
AddCloud(FELin,.382,Color.Cyan,color.Cyan);
AddCloud(FENonLin ,.618,Color.Dark_Orange,Color.Dark_Orange);
##################################
@BWiz I can't find an RSI-L which enables me to set the aggregate period. Would you be willing to share the study you are using? thank youAdd the RSI-L in your lower study and set the aggregation period to two minutes. Next add the RSI-L to your lower study again, but make sure its in the same rectangle as your first RSI-L Study. Set the aggregation period to 15 minutes. When the 15m RSI-L is in an uptrend place entries using the 2m once the 2m has crossed above the OS line. Do the inverse for you short entries. That way when you enter a trade you will be following the same direction as the longer term trend to give you a better edge. I hope this helps.
# RSI in Laguerre Time Scaled to Price
# Mobius
# V01.08.2016
declare lower;
script Scale {
input c = close;
input Min = 0;
input Max = 1;
def hh = HighestAll(c);
def ll = LowestAll(c);
plot Range = (((Max - Min) * (c - ll)) / (hh - ll)) + Min;
}
#Inputs:
input gamma = .5;
# Variables:
def c;
def CU1;
def CU2;
def CU;
def CD1;
def CD2;
def CD;
def L0;
def L1;
def L2;
def L3;
def RSI;
def min;
def max;
# Calculations
c = close;
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 CU + CD <> 0 then CU / (CU + CD) else 0;
min = Lowest(c);
max = Highest(c);
plot RescaledRSI = Scale(c = RSI, min = min, max = max);
RescaledRSI.SetStyle(Curve.FIRM);
RescaledRSI.SetLineWeight(2);
RescaledRSI.AssignValueColor(if RescaledRSI > RescaledRSI[1]
then Color.CYAN
else Color.YELLOW);
plot line0 = 0;
plot line10 = 10;
plot line20 = 20;
plot line30 = 30;
plot line40 = 40;
plot line50 = 50;
plot line60 = 60;
plot line70 = 70;
plot line80 = 80;
plot line90 = 90;
plot line100 = 100;
@bdbald the plot condition that @horserider posted looked different, so I fixed it up. This version scans for last 4 bars above 0.9 or below 0.1. Make sure you select ONLY one plot and comment the other out as appropriate.
I just ran a scan against the S&P 500 using this code and it returned 96 hits. Feel free to adjust your scan condition as you see fit
# RSI in Laguerre Time With Fractal Energy Scan
# Mobius
# V02.07.2014
# V03.06.15.2016
#Scan
#Inputs:
input nFE = 8;
# Variables:
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;
def RSI;
# Calculations
o = (open + close[1]) / 2;
h = Max(high, close[1]);
l = Min(low, close[1]);
c = (o + h + l + close) / 4;
def gamma = Log(Sum((Max(high, close[1]) - Min(low, close[1])), nFE) /
(Highest(high, nFE) - Lowest(low, nFE)))
/ Log(nFE);
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 CU + CD <> 0 then CU / (CU + CD) else 0;
# Note Comment-Out (#) whichever scan not being used.
# Long Scan
plot Long = sum(RSI > .9, 4) >= 4;
# Short Scan
#plot Short = sum(RSI < .1, 4) >= 4;
# END SCAN
plot scan = RSI<=1 and Gamma>=0;
@lmk99 You do not need to modify the code. Just use the regular RSI Laguerre indicator posted on the first page and set up your scanner like this:
Hey man, tried to follow your instructions based on your few posts. I have the TheoTrade RSI in Laguerre Time Self Adjusting With Fractal Energy Mobius V03.06.15.2016, that I think you're referring to in one post, that doesn't have the higher agg. I also have the MTF v3 and the one from page 1 here, with the agg but thats a different style and doesn't seem to anchor differently between the 2 time frames.Add the RSI-L in your lower study and set the aggregation period to two minutes. Next add the RSI-L to your lower study again, but make sure its in the same rectangle as your first RSI-L Study. Set the aggregation period to 15 minutes. When the 15m RSI-L is in an uptrend place entries using the 2m once the 2m has crossed above the OS line. Do the inverse for you short entries. That way when you enter a trade you will be following the same direction as the longer term trend to give you a better edge. I hope this helps.
@lmk99 What are the exact values that you're using for both conditions?
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.