ATR*1.1
you can change that to adjust the vertical position. Such as 1.05 to get closer to the candles or 1.2 to get farther away.AddChartBubble(
signal,
high + reference ATR * 1.1,
GetMonth() + "/" + GetDayOfMonth(GetYYYYMMDD()) + "/" + AsPrice(GetYear()),
Color.LIGHT_GRAY
);
ATR*1.1
you can change that to adjust the vertical position. Such as 1.05 to get closer to the candles or 1.2 to get farther away.AddChartBubble(
signal,
high + reference ATR * 1.1,
GetMonth() + "/" + GetDayOfMonth(GetYYYYMMDD()) + "/" + AsPrice(GetYear()),
Color.LIGHT_GRAY
);
Can I get the full script for the MACD Crossover Please? ThanksDuplicate the MACDHistogramCrossover study and add this at the bottom. Where it hasATR*1.1
you can change that to adjust the vertical position. Such as 1.05 to get closer to the candles or 1.2 to get farther away.
Ruby:AddChartBubble( signal, high + reference ATR * 1.1, GetMonth() + "/" + GetDayOfMonth(GetYYYYMMDD()) + "/" + AsPrice(GetYear()), Color.LIGHT_GRAY );
Can I get the full script for the MACD Crossover Please? Thanks
Thank you so much. Also, does thinkorswim has a limitation when trying to display dates in a watchlist? For example want to display the date of the MACD crossover in a watchlist column?
def signal = Diff crosses 0;
def signal = Diff crosses above 0;
def signal = Diff crosses below 0;
input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input averageType = AverageType.EXPONENTIAL;
def Diff = MACD(fastLength, slowLength, MACDLength, averageType).Diff;
def signal = Diff crosses 0;
def month = if signal then GetMonth() else month[1];
def dayOfMonth = if signal then GetDayOfMonth(GetYYYYMMDD()) else dayofMonth[1];
def year = if signal then GetYear() else year[1];
AddLabel(
!IsNaN(month),
month + "/" + dayOfMonth + "/" + AsPrice(year),
Color.LIGHT_GRAY
);
Thanks very much really appreciate you!This will include both crossing above and crossing below. If you want just one or the other, change the line:
def signal = Diff crosses 0;
to
def signal = Diff crosses above 0;
or
def signal = Diff crosses below 0;
Also, if want it to be sortable you should rearrange the date formatting to be YYYY-MM-DD. TOS will sort the column as text, for instance
01/01/2020
01/01/2021
02/04/2020
etc.
Ruby:input fastLength = 12; input slowLength = 26; input MACDLength = 9; input averageType = AverageType.EXPONENTIAL; def Diff = MACD(fastLength, slowLength, MACDLength, averageType).Diff; def signal = Diff crosses 0; def month = if signal then GetMonth() else month[1]; def dayOfMonth = if signal then GetDayOfMonth(GetYYYYMMDD()) else dayofMonth[1]; def year = if signal then GetYear() else year[1]; AddLabel( !IsNaN(month), month + "/" + dayOfMonth + "/" + AsPrice(year), Color.LIGHT_GRAY );
To:def month
def dayOfMonth
Scan for month is equal toplot month
plot dayOfMonth
Slippage, I too am a Moxie Mastery member and a multi year Simpler Trading trade room member. I very much appreciate your coding and philosophy of streamlining the code to reduce computer resources. I am not skilled in Thinkscript. I would very much like to correspond with you concerning fine tuning some scan code for the Moxie (e.g. 50/200/50 and others) and some custom components to add to a multi compression squeeze radar screen (RAF Buy/Sell/Continuation on MTFs) that I use for day and swing trading.Duplicate the MACDHistogramCrossover study and add this at the bottom. Where it hasATR*1.1
you can change that to adjust the vertical position. Such as 1.05 to get closer to the candles or 1.2 to get farther away.
Ruby:AddChartBubble( signal, high + reference ATR * 1.1, GetMonth() + "/" + GetDayOfMonth(GetYYYYMMDD()) + "/" + AsPrice(GetYear()), Color.LIGHT_GRAY );
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
Retrieve Close Price from Last Earnings Date? | Questions | 2 | ||
R | Scan price hitting lows of an inputted date | Questions | 0 | |
T | compute starting date, 1 year from the current date | Questions | 2 | |
T | highest daily volume over custom date range | Questions | 1 | |
F | Date & Time of Indicator Changes In ThinkOrSwim | Questions | 2 |
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.