ICT / Price Action Discussion Thread

Gymini

Member
For those that follow the ICT community, there has been a lot of discussion on the gap that forms when globex trading opens up on Sunday (NWOG). This concept is very similar to something I had already been using so I reworded that to create an indicator that displays the last 3 gaps for your trading pleasure:
rz2SLZn.png

A few caveats. This indicator relies on pulling data from your charts. If you want the last 3 weeks of gaps, I suggest having at least 15 days of data on the chart. I like to keep my charts clean so the default is to chart these on the right margin (expansion area) of your chart. You need to make sure you have that activated (I have 5 bars in the image above). If you choose to have them drawn across the chart (showOnRight = no), they will only draw for the current day. You will have to change the code if you want it to show across the entire chart. Again, I find that too busy as I am using this for day trading.
You can also toggle to show labels or bubbles that indicate which area is this week, last week, two weeks ago. One last thing - you can change the indicator timeframe from weekly to daily to get new day opening gaps (NDOG) as well. This was mostly a quick and dirty effort, I'm sure there are ways to simplify the code to make it easier to maintain if anyone is up for it...I'm happy with it for now.
Ruby:
# Global Color setup
# Created by @tony_futures inspired by ICT concept
DefineGlobalColor("weekly", Color.DARK_ORANGE);
DefineGlobalColor("weekly2", CreateColor(136, 93, 100));
DefineGlobalColor("weekly3", COLOR.PLUM);

#Calculate the gaps and the midpoints
input aggregationPeriod = AggregationPeriod.WEEK;
def weeklyClose = close(period = aggregationPeriod);
def weeklyOpen = open(period = aggregationPeriod);
def weeklyChange = weeklyClose != weeklyClose[1];
def prevWeeklyClose = if weeklyChange then Round(weeklyClose[1],2) else prevWeeklyClose[1];
def newWeekOpen = if weeklyChange then Round(weeklyOpen,2) else newWeekOpen[1];
def gapUp = newWeekOpen > prevWeeklyClose;
def halfAmount = AbsValue(newWeekOpen - prevWeeklyClose) / 2;
def halfGap = if gapUp then (prevWeeklyClose + halfAmount) else (newWeekOpen + halfAmount);
def oneBackClose = if weeklyChange then prevWeeklyClose[1] else oneBackClose[1];
def oneBackOpen = if weeklyChange then newWeekOpen[1] else oneBackOpen[1];
def twoBackClose = if weeklyChange then oneBackClose[1] else twoBackClose[1];
def twoBackOpen = if weeklyChange then oneBackOpen[1] else twoBackOpen[1];
def halfAmount2 = AbsValue(oneBackOpen - oneBackClose) / 2;
def gapUp2 = oneBackOpen > oneBackClose;
def halfGap2 = if gapUp2 then (oneBackClose + halfAmount2) else (oneBackOpen + halfAmount2);
def halfAmount3 = AbsValue(twoBackOpen - twoBackClose) / 2;
def gapUp3 = twoBackOpen > twoBackClose;
def halfGap3 = if gapUp3 then (twoBackClose + halfAmount3) else (twoBackOpen + halfAmount3);

input plotLines = yes;
def Today = GetLastDay() == GetDay();
input showOnRight = yes;
def exp = if showOnRight then IsNaN(close[1]) else yes;

plot week1 = if exp and Today and plotLines then prevWeeklyClose else Double.NaN;
week1.setDefaultColor(GlobalColor("weekly"));
week1.setLineWeight(2);
week1.hideBubble();

plot week2 = if exp and Today and plotLines then newWeekOpen else Double.NaN;
week2.setDefaultColor(GlobalColor("weekly"));
week2.setLineWeight(2);
week2.hideBubble();

plot week3 = if exp and Today and plotLines then oneBackClose else Double.NaN;
week3.setDefaultColor(GlobalColor("weekly2"));
week3.setLineWeight(2);
week3.hideBubble();

plot week4 = if exp and Today and plotLines then oneBackOpen else Double.NaN;
week4.setDefaultColor(GlobalColor("weekly2"));
week4.setLineWeight(2);
week4.hideBubble();

plot week5 = if exp and Today and plotLines then twoBackClose else Double.NaN;
week5.setDefaultColor(GlobalColor("weekly3"));
week5.setLineWeight(2);
week5.hideBubble();

plot week6 = if exp and Today and plotLines then twoBackOpen else Double.NaN;
week6.setDefaultColor(GlobalColor("weekly3"));
week6.setLineWeight(2);
week6.hideBubble();

plot halfWay = if exp and Today and plotLines then halfGap else Double.NaN;
halfWay.setDefaultColor(Color.GRAY);
halfWay.hideBubble();

plot halfWay2 = if exp and Today and plotLines then halfGap2 else Double.NaN;
halfWay2.setDefaultColor(Color.GRAY);
halfWay2.hideBubble();

plot halfWay3 = if exp and Today and plotLines then halfGap3 else Double.NaN;
halfWay3.setDefaultColor(Color.GRAY);
halfWay3.hideBubble();

input showBubbles = no;
AddChartBubble(showBubbles and exp and !exp[1], if gapUp then week1 else week2,"Current",GlobalColor("weekly"),no);
AddChartBubble(showBubbles and exp and !exp[1], if gapUp2 then week3 else week4,"Previous",GlobalColor("weekly2"),no);
AddChartBubble(showBubbles and exp and !exp[1], if gapUp3 then week5 else week6,"Two Back",GlobalColor("weekly3"),no);
input showLabels = no;
AddLabel(showLabels,"Current", GlobalColor("weekly"));
AddLabel(showLabels,"Previous", GlobalColor("weekly2"));
AddLabel(showLabels,"Two Back", GlobalColor("weekly3"));
thank you for this... just started to learn ICT concepts recently and have found FVG script on here but i dont think there has been much interest coding ICT scripts for TOS
 
For those that follow the ICT community, there has been a lot of discussion on the gap that forms when globex trading opens up on Sunday (NWOG). This concept is very similar to something I had already been using so I reworded that to create an indicator that displays the last 3 gaps for your trading pleasure:
rz2SLZn.png

A few caveats. This indicator relies on pulling data from your charts. If you want the last 3 weeks of gaps, I suggest having at least 15 days of data on the chart. I like to keep my charts clean so the default is to chart these on the right margin (expansion area) of your chart. You need to make sure you have that activated (I have 5 bars in the image above). If you choose to have them drawn across the chart (showOnRight = no), they will only draw for the current day. You will have to change the code if you want it to show across the entire chart. Again, I find that too busy as I am using this for day trading.
You can also toggle to show labels or bubbles that indicate which area is this week, last week, two weeks ago. One last thing - you can change the indicator timeframe from weekly to daily to get new day opening gaps (NDOG) as well. This was mostly a quick and dirty effort, I'm sure there are ways to simplify the code to make it easier to maintain if anyone is up for it...I'm happy with it for now.
Ruby:
# Global Color setup
# Created by @tony_futures inspired by ICT concept
DefineGlobalColor("weekly", Color.DARK_ORANGE);
DefineGlobalColor("weekly2", CreateColor(136, 93, 100));
DefineGlobalColor("weekly3", COLOR.PLUM);

#Calculate the gaps and the midpoints
input aggregationPeriod = AggregationPeriod.WEEK;
def weeklyClose = close(period = aggregationPeriod);
def weeklyOpen = open(period = aggregationPeriod);
def weeklyChange = weeklyClose != weeklyClose[1];
def prevWeeklyClose = if weeklyChange then Round(weeklyClose[1],2) else prevWeeklyClose[1];
def newWeekOpen = if weeklyChange then Round(weeklyOpen,2) else newWeekOpen[1];
def gapUp = newWeekOpen > prevWeeklyClose;
def halfAmount = AbsValue(newWeekOpen - prevWeeklyClose) / 2;
def halfGap = if gapUp then (prevWeeklyClose + halfAmount) else (newWeekOpen + halfAmount);
def oneBackClose = if weeklyChange then prevWeeklyClose[1] else oneBackClose[1];
def oneBackOpen = if weeklyChange then newWeekOpen[1] else oneBackOpen[1];
def twoBackClose = if weeklyChange then oneBackClose[1] else twoBackClose[1];
def twoBackOpen = if weeklyChange then oneBackOpen[1] else twoBackOpen[1];
def halfAmount2 = AbsValue(oneBackOpen - oneBackClose) / 2;
def gapUp2 = oneBackOpen > oneBackClose;
def halfGap2 = if gapUp2 then (oneBackClose + halfAmount2) else (oneBackOpen + halfAmount2);
def halfAmount3 = AbsValue(twoBackOpen - twoBackClose) / 2;
def gapUp3 = twoBackOpen > twoBackClose;
def halfGap3 = if gapUp3 then (twoBackClose + halfAmount3) else (twoBackOpen + halfAmount3);

input plotLines = yes;
def Today = GetLastDay() == GetDay();
input showOnRight = yes;
def exp = if showOnRight then IsNaN(close[1]) else yes;

plot week1 = if exp and Today and plotLines then prevWeeklyClose else Double.NaN;
week1.setDefaultColor(GlobalColor("weekly"));
week1.setLineWeight(2);
week1.hideBubble();

plot week2 = if exp and Today and plotLines then newWeekOpen else Double.NaN;
week2.setDefaultColor(GlobalColor("weekly"));
week2.setLineWeight(2);
week2.hideBubble();

plot week3 = if exp and Today and plotLines then oneBackClose else Double.NaN;
week3.setDefaultColor(GlobalColor("weekly2"));
week3.setLineWeight(2);
week3.hideBubble();

plot week4 = if exp and Today and plotLines then oneBackOpen else Double.NaN;
week4.setDefaultColor(GlobalColor("weekly2"));
week4.setLineWeight(2);
week4.hideBubble();

plot week5 = if exp and Today and plotLines then twoBackClose else Double.NaN;
week5.setDefaultColor(GlobalColor("weekly3"));
week5.setLineWeight(2);
week5.hideBubble();

plot week6 = if exp and Today and plotLines then twoBackOpen else Double.NaN;
week6.setDefaultColor(GlobalColor("weekly3"));
week6.setLineWeight(2);
week6.hideBubble();

plot halfWay = if exp and Today and plotLines then halfGap else Double.NaN;
halfWay.setDefaultColor(Color.GRAY);
halfWay.hideBubble();

plot halfWay2 = if exp and Today and plotLines then halfGap2 else Double.NaN;
halfWay2.setDefaultColor(Color.GRAY);
halfWay2.hideBubble();

plot halfWay3 = if exp and Today and plotLines then halfGap3 else Double.NaN;
halfWay3.setDefaultColor(Color.GRAY);
halfWay3.hideBubble();

input showBubbles = no;
AddChartBubble(showBubbles and exp and !exp[1], if gapUp then week1 else week2,"Current",GlobalColor("weekly"),no);
AddChartBubble(showBubbles and exp and !exp[1], if gapUp2 then week3 else week4,"Previous",GlobalColor("weekly2"),no);
AddChartBubble(showBubbles and exp and !exp[1], if gapUp3 then week5 else week6,"Two Back",GlobalColor("weekly3"),no);
input showLabels = no;
AddLabel(showLabels,"Current", GlobalColor("weekly"));
AddLabel(showLabels,"Previous", GlobalColor("weekly2"));
AddLabel(showLabels,"Two Back", GlobalColor("weekly3"));
Is this something that could be used for stocks also?

thank you for this... just started to learn ICT concepts recently and have found FVG script on here but i dont think there has been much interest coding ICT scripts for TOS
there are scripts for order blocks also. I would love to see one for liquidity grabs.
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

there are scripts for order blocks also. I would love to see one for liquidity grabs.
There are quite a few studies like this Fractal Pivot one that gets you pretty close to liquidity levels. I find them a bit busy for my charts but others may like them.

Is this something that could be used for stocks also?
I would imagine these areas would be responsive in most markets. In general, I treat them as areas of interest where price might reverse. I would not trade them 'blindly' if that makes sense.
 
Last edited by a moderator:
There are quite a few studies like this Fractal Pivot one that gets you pretty close to liquidity levels. I find them a bit busy for my charts but others may like them.
TY..I did also find a script for Liquidity/Premium ranges that I will explore. First order for me is exploring NWOG and NDOG as to whether they will work with SPY..

I would imagine these areas would be responsive in most markets. In general, I treat them as areas of interest where price might reverse. I would not trade them 'blindly' if that makes sense.
Absolutely does make sense and I've got them on my charts now and watching.

so many concepts... breakers, SSL, BSL, Break of structure Change of character ....geez
there are a lot of concepts for sure but I am a stock trader so I'm relating what appears to be most relevant to that venue. ICT did say that the concepts relate to everything...
 
Last edited by a moderator:
For those that follow the ICT community, there has been a lot of discussion on the gap that forms when globex trading opens up on Sunday (NWOG). This concept is very similar to something I had already been using so I reworded that to create an indicator that displays the last 3 gaps for your trading pleasure:
rz2SLZn.png

A few caveats. This indicator relies on pulling data from your charts. If you want the last 3 weeks of gaps, I suggest having at least 15 days of data on the chart. I like to keep my charts clean so the default is to chart these on the right margin (expansion area) of your chart. You need to make sure you have that activated (I have 5 bars in the image above). If you choose to have them drawn across the chart (showOnRight = no), they will only draw for the current day. You will have to change the code if you want it to show across the entire chart. Again, I find that too busy as I am using this for day trading.
You can also toggle to show labels or bubbles that indicate which area is this week, last week, two weeks ago. One last thing - you can change the indicator timeframe from weekly to daily to get new day opening gaps (NDOG) as well. This was mostly a quick and dirty effort, I'm sure there are ways to simplify the code to make it easier to maintain if anyone is up for it...I'm happy with it for now.
Ruby:
# Global Color setup
# Created by @tony_futures inspired by ICT concept
DefineGlobalColor("weekly", Color.DARK_ORANGE);
DefineGlobalColor("weekly2", CreateColor(136, 93, 100));
DefineGlobalColor("weekly3", COLOR.PLUM);

#Calculate the gaps and the midpoints
input aggregationPeriod = AggregationPeriod.WEEK;
def weeklyClose = close(period = aggregationPeriod);
def weeklyOpen = open(period = aggregationPeriod);
def weeklyChange = weeklyClose != weeklyClose[1];
def prevWeeklyClose = if weeklyChange then Round(weeklyClose[1],2) else prevWeeklyClose[1];
def newWeekOpen = if weeklyChange then Round(weeklyOpen,2) else newWeekOpen[1];
def gapUp = newWeekOpen > prevWeeklyClose;
def halfAmount = AbsValue(newWeekOpen - prevWeeklyClose) / 2;
def halfGap = if gapUp then (prevWeeklyClose + halfAmount) else (newWeekOpen + halfAmount);
def oneBackClose = if weeklyChange then prevWeeklyClose[1] else oneBackClose[1];
def oneBackOpen = if weeklyChange then newWeekOpen[1] else oneBackOpen[1];
def twoBackClose = if weeklyChange then oneBackClose[1] else twoBackClose[1];
def twoBackOpen = if weeklyChange then oneBackOpen[1] else twoBackOpen[1];
def halfAmount2 = AbsValue(oneBackOpen - oneBackClose) / 2;
def gapUp2 = oneBackOpen > oneBackClose;
def halfGap2 = if gapUp2 then (oneBackClose + halfAmount2) else (oneBackOpen + halfAmount2);
def halfAmount3 = AbsValue(twoBackOpen - twoBackClose) / 2;
def gapUp3 = twoBackOpen > twoBackClose;
def halfGap3 = if gapUp3 then (twoBackClose + halfAmount3) else (twoBackOpen + halfAmount3);

input plotLines = yes;
def Today = GetLastDay() == GetDay();
input showOnRight = yes;
def exp = if showOnRight then IsNaN(close[1]) else yes;

plot week1 = if exp and Today and plotLines then prevWeeklyClose else Double.NaN;
week1.setDefaultColor(GlobalColor("weekly"));
week1.setLineWeight(2);
week1.hideBubble();

plot week2 = if exp and Today and plotLines then newWeekOpen else Double.NaN;
week2.setDefaultColor(GlobalColor("weekly"));
week2.setLineWeight(2);
week2.hideBubble();

plot week3 = if exp and Today and plotLines then oneBackClose else Double.NaN;
week3.setDefaultColor(GlobalColor("weekly2"));
week3.setLineWeight(2);
week3.hideBubble();

plot week4 = if exp and Today and plotLines then oneBackOpen else Double.NaN;
week4.setDefaultColor(GlobalColor("weekly2"));
week4.setLineWeight(2);
week4.hideBubble();

plot week5 = if exp and Today and plotLines then twoBackClose else Double.NaN;
week5.setDefaultColor(GlobalColor("weekly3"));
week5.setLineWeight(2);
week5.hideBubble();

plot week6 = if exp and Today and plotLines then twoBackOpen else Double.NaN;
week6.setDefaultColor(GlobalColor("weekly3"));
week6.setLineWeight(2);
week6.hideBubble();

plot halfWay = if exp and Today and plotLines then halfGap else Double.NaN;
halfWay.setDefaultColor(Color.GRAY);
halfWay.hideBubble();

plot halfWay2 = if exp and Today and plotLines then halfGap2 else Double.NaN;
halfWay2.setDefaultColor(Color.GRAY);
halfWay2.hideBubble();

plot halfWay3 = if exp and Today and plotLines then halfGap3 else Double.NaN;
halfWay3.setDefaultColor(Color.GRAY);
halfWay3.hideBubble();

input showBubbles = no;
AddChartBubble(showBubbles and exp and !exp[1], if gapUp then week1 else week2,"Current",GlobalColor("weekly"),no);
AddChartBubble(showBubbles and exp and !exp[1], if gapUp2 then week3 else week4,"Previous",GlobalColor("weekly2"),no);
AddChartBubble(showBubbles and exp and !exp[1], if gapUp3 then week5 else week6,"Two Back",GlobalColor("weekly3"),no);
input showLabels = no;
AddLabel(showLabels,"Current", GlobalColor("weekly"));
AddLabel(showLabels,"Previous", GlobalColor("weekly2"));
AddLabel(showLabels,"Two Back", GlobalColor("weekly3"));
This is a beauty: clean, simple and helps to save time plotting the zones of interest. I have a question, is there any chance to increase the number of NWOGs? I would like to have at least the last 5 instead of 3. I tried asking ChatGPT to edit it and of course it didn't work lol. I'm loving this study, thanks for sharing it.

TY..I did also find a script for Liquidity/Premium ranges that I will explore. First order for me is exploring NWOG and NDOG as to whether they will work with SPY..
Would you mind sharing it? I'd like to take a look to it
 
Last edited by a moderator:
This is a beauty: clean, simple and helps to save time plotting the zones of interest. I have a question, is there any chance to increase the number of NWOGs? I would like to have at least the last 5 instead of 3. I tried asking ChatGPT to edit it and of course it didn't work lol. I'm loving this study, thanks for sharing it.


Would you mind sharing it? I'd like to take a look to it
https://usethinkscript.com/threads/expected-liquidity-range-for-thinkorswim.14058/

I've also found Volume Imbalances to be very helpful

I actually love seeing others working with ICT. I've traded a lot of things through the decades but this is the best and the simplest and is based on pure price action which is the real story.
 
Last edited by a moderator:
It's all good..I actually love seeing others working with ICT. I've traded a lot of things through the decades but this is the best and the simplest and is based on pure price action which is the real story.
Same here. Is unbelievable how you can anticipate the movements and know were the price is targeting even before it starts. Confusing and veeeery hard to follow at the beginning but once you get it, it's totally priceless. Can't stop learning from him.
 
Same here. Is unbelievable how you can anticipate the movements and know were the price is targeting even before it starts. Confusing and veeeery hard to follow at the beginning but once you get it, it's totally priceless. Can't stop learning from him.
Are you trading futures or something else? My challenge was seeing if what he said was true about being able to use the concepts in all markets and it is totally true. Today was an awesome day as flippy as it was..I caught a Judas swing which also had a volume imbalance..
 
Are you trading futures or something else? My challenge was seeing if what he said was true about being able to use the concepts in all markets and it is totally true. Today was an awesome day as flippy as it was..I caught a Judas swing which also had a volume imbalance..
I trade SPY options watching /ES. Not the best technique but is the best I can do as I'm overseas and TD Ameritrade doesn't margin me.
I did the same, I'm very skeptic, I trust NO ONE in this business, is full of scammers and false FURUs so I wanted to see if he was real and he just convinced me. Pure price action, naked charts, no magic indicators, just time and price; not even volume.
 
Last edited by a moderator:
I trade SPY options watching /ES. Not the best technique but is the best I can do as I'm overseas and TD Ameritrade doesn't margin me.
I did the same, I'm very skeptic, I trust NO ONE in this business, is full of scammers and false FURUs so I wanted to see if he was real and he just convinced me. Pure price action, naked charts, no magic indicators, just time and price; not even volume.
Best in your trading. Today was super interesting and even ICT said one of his 3 hardest days. For me it was super interesting and glad I was able to follow it all the way.
 
Are you part of his course or learning from youtube.
I am learning from the mentorship on you tube and follow on Twitter. Since I already came with a lot of knowledge and had to empty my head and start from scratch with blank charts. Price action I was aware of but definitely not how he utilizes it and that opened a whole new world. It's great to not have to use lagging indicators and oscillators any longer..
 
I am learning from the mentorship on you tube and follow on Twitter. Since I already came with a lot of knowledge and had to empty my head and start from scratch with blank charts. Price action I was aware of but definitely not how he utilizes it and that opened a whole new world. It's great to not have to use lagging indicators and oscillators any longer..
Thank you for your inputs!
 
This is a pretty crude attempt at the "ICT Discount Premium" setup. I didn't know what ICT was 24 hours ago, so, I guess you could say I was inspired.....

The idea here is that the user will input the levels you'd like the range and fibs to be calculated from. The discount/premium areas are separated by a YELLOW line by default.

BOTH sets of fib levels display, bullish and bearish....

Again, just a first shot.....Let me know what you think.....

Heh, totally forgot to mention the swing high and swing low price bars being colored also....

The script will automatically adjust to the timeframe you have your chart set to.

Enjoy!


Code:
def o = open;
def h = high;
def l = low;
def c = close;



def swingHI = h>h[1] and h[-1]<h;
def swingLO = l<l[1] and l[-1]>l;

AssignPriceColor(if swinghi then color.red else if swinglo then color.green else color.gray);

AddChartBubble(swinglo,low,low,color.green,no);
AddChartBubble(swinghi,high,high,color.red,yes);

####  ICT DISCOUNT/PREMIUM FIBS:

Input sWhi = 546.77;
input sWlo = 542.72;

def ShowTodayOnly = Yes;
def s=ShowTodayOnly;
def today=if s==0 OR getday()==getlastday() then 1 else 0;

plot hi = if today == 1 then swhi else double.nan;
hi.setdefaultcolor(color.red);
plot slo = if today == 1 then  swlo else double.nan;
slo.setdefaultcolor(color.green);
plot prembreak = if today == 1 then  (hi+slo)*.5 else double.nan;
prembreak.setdefaultcolor(color.yellow);

def range = swhi - swlo;
def premRange = hi-prembreak;
def discRange = premBreak-slo;


def Fib1 = range * .62;
def Fib2 = range * .705;
def Fib3 = range * .79;

def dFib1 = .21;
def dFib2 = .295;
def dFib3 = .38;

plot df1 = if today == 1 then swlo+(range*dfib1) else double.nan;
df1.setpaintingstrategy(paintingstrategy.dashes);
df1.setdefaultcolor(createcolor(116,189,232));
df1.setlineweight(2);
plot df2 = if today == 1 then swlo+(range*dfib2) else double.nan;
df2.setdefaultcolor(color.magenta);
plot df3 = if today == 1 then swlo+(range*dfib3) else double.nan;
df3.setpaintingstrategy(paintingstrategy.dashes);
df3.setdefaultcolor(createcolor(116,189,232));
df3.setlineweight(2);

def pFib1 = .62;
def pFib2 = .705;
def pFib3 = .79;

plot pf1 = if today == 1 then swlo+(range*pfib1) else double.nan;
pf1.setpaintingstrategy(paintingstrategy.dashes);
pf1.setdefaultcolor(createcolor(116,189,232));
pf1.setlineweight(2);
plot pf2 = if today == 1 then swlo+(range*pfib2) else double.nan;
pf2.setdefaultcolor(color.magenta);
plot pf3 = if today == 1 then swlo+(range*pfib3) else double.nan;
pf3.setpaintingstrategy(paintingstrategy.dashes);
pf3.setdefaultcolor(createcolor(116,189,232));
pf3.setlineweight(2);
 
FAIR VALUE GAP:

Along the line of "trying some things with ICT", Here is a first run at the "Fair value gap" idea.

No user input is required. This is meant as a study tool to look back at FVG's and check out their performance. While not very descriptive, the first line on the Chart Bubble's is the width of the gap, or, the difference between the two variables that make up the FVG.

Enjoy... I'm glad to receive feedback and ideas on these being so new to them myself. I *think because of the lack of array capability with thinkscript that there isn't much else that can be done, but, if you think of something, make it known - let's see what we can do...

Code:
def o = open;
def o = open;
def h = high;
def l = low;
def c = close;

def ht = (h>h[1]) and (l>l[1]);
def lt = (l<l[1]) and (h<h[1]);

def FVGBull = ht and ht[-1] and ht[1] and (l[-1] > h[1]);
AssignPriceColor(if fvgbull and round(l-h[2]>0) then color.green else color.gray);

AddChartBubble(FVGbull and round(l-h[2] > 0),high,round(l-h[2],2)+"\nL: "+low+"\nH[2]: "+h[2],color.green,yes);

#def BullFVG = l > h[2];
#def BearFVG = l[2] > h;

def FVGBear = lt and lt[-1] and lt[1] and h[-1] < l[1];
AssignPriceColor(if fvgbear and round(l[2]-h) then color.red else color.gray);
AddChartBubble(fvgbear and round(l[2]-h>0),low,round(l[2]-h,2)+"\nH: "+high+"\nL[2]:"+l[2],color.red,no);
 
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
295 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

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.

How do I get started?

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.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top