# Leavitt Slope and Leavitt Acceleration Indicators

#### MerryDay

##### Well-known member
VIP
The TOS Slope and Acceleration Indicators were created by Jay Leavitt. His premise is that slopes rarely appear in market analysis because slope can only be taken of smooth functions and the market at any time scale is very choppy. Therefore, he uses a two-part smoothing process to create a straight smooth line (Leavitt Projections) from which the slope can be calculated. The Acceleration indicator is a derivative of slope showing the ROC of Slope.

Here is a shared link: http://tos.mx/9XiG3f4

The assumptions about trends so far are just best guesses. This is still a HUGE work-in-progress and not ready for prime-time trading.

I am hoping if anyone has experience with these indicators they will chime in. They are so fascinating! I am hoping to use the ROC of slope and slope to pick the most profitable stocks to invest in.

Last edited:

#### barbaros

##### Well-known member
VIP
Very interesting. Here is a demo of vertical lines on for the top chart.

Code:
``````def LCAcceleration = reference LeavittConvolutionAcceleration();
def LCSlope = reference LeavittConvolutionSlope();

def trendState = if LCSlope[1]>LCSlope[2] and LCSlope<LCSlope[1] and LCAcceleration<LCAcceleration[1] then 1
else if LCSlope[1]<LCSlope[2] and LCSlope>LCSlope[1] and LCAcceleration>LCAcceleration[1] then 2
else if LCSlope>LCSlope[1] and LCAcceleration>LCAcceleration[1] then 3
else if LCSlope>LCSlope[1] then 4
else if LCSlope<=LCSlope[1] and LCAcceleration<=LCAcceleration[1] then 5
else if LCSlope<LCSlope[1] then 6 else 0;

AddVerticalLine(trendState[1] != 1 and trendState == 1, "Slope End", Color.RED);
AddVerticalLine(trendState[1] != 2 and trendState == 2, "Slope Begin", Color.GREEN);
AddVerticalLine(trendState[1] != 3 and trendState == 3, "Slope & acceleration rising", Color.WHITE);
AddVerticalLine(trendState[1] != 4 and trendState == 4, "Slope rising-acceleration not", Color.WHITE);
AddVerticalLine(trendState[1] != 5 and trendState == 5, "Slope & acceleration falling", Color.WHITE);
AddVerticalLine(trendState[1] != 6 and trendState == 6, "Slope falling-acceleration not", Color.WHITE);
AddVerticalLine(trendState[1] != 0 and trendState == 0, "Slope neutral", Color.GRAY);

DefineGlobalColor("pretrend", CreateColor(50, 200, 255)) ;
DefineGlobalColor("TrendBEGIN", CreateColor(0, 0, 255)) ;
DefineGlobalColor("rising",  CreateColor(0, 165, 0)) ;
DefineGlobalColor("maxxed", CreateColor(255, 139 ,61)) ;
DefineGlobalColor("TrendEnd", CreateColor(255, 204, 0)) ;
DefineGlobalColor("falling",  CreateColor(225, 0, 0)) ;
DefineGlobalColor("neutral",  CreateColor(153, 153, 255)) ;

AssignPriceColor(
if LCSlope[1]>LCSlope[2] and LCSlope<LCSlope[1] and LCAcceleration<LCAcceleration[1] then GlobalColor("TrendEnd") else
if LCSlope[1]<LCSlope[2] and LCSlope>LCSlope[1] and LCAcceleration>LCAcceleration[1] then GlobalColor("TrendBEGIN") else
if LCSlope>LCSlope[1] and LCAcceleration>LCAcceleration[1] then GlobalColor("rising") else
if LCSlope>LCSlope[1] then GlobalColor("neutral") else
if LCSlope<=LCSlope[1] and LCAcceleration<=LCAcceleration[1] then GlobalColor("falling") else
if LCSlope<LCSlope[1] then GlobalColor("falling") else GlobalColor("neutral")
);``````

#### germanburrito

##### Active member
I actually watched a simple video on this today.

#### Nomak

##### Member
2019 Donor
Not too long ago I started exploring acceleration and slopes for other MA's not for Leavitt. I use an excel sheet (lol)

#### MerryDay

##### Well-known member
VIP
@barbaros I incorporated your vertical lines in my 1st post. Wow! Besides being an awesome visual tool. They REALLY helped with debugging my logic. This is still a very raw product but I see great potential not only in being able to make projections about slope and acceleration but it starting to look like it will also be very useful in identifying chop!

#### Ramesh16

##### Member
VIP
@MerryDay I am not able to see the labels on price chart, it is there on the lower study:-

#### MerryDay

##### Well-known member
VIP
@Ramesh16

To have vertical lines and labels in upper chart:
1. Dragged study to upper chart
2. Click on the gear icon and click on hide plots

HTH

Last edited:

#### barbaros

##### Well-known member
VIP
@MerryDay Sounds good. I look forward to hearing your findings and hopefully this can turn into another wonderful strategy to use.

#### germanburrito

##### Active member
@MerryDay could this indicator be combined with the moxie indicator.

VIP

#### J007RMC

##### Well-known member
2019 Donor
@barbaros Nice work thanks I took the lines out and am using the color-coded candles along with MerryDay's lines.

#### SuryaKiranC

##### Well-known member
I have a setup with Leavitt study sets combined with OpenRangeBreakout and Something called DV Clearance Range.

The Setup can give long or short direction for the day after 30 mins, to be used on 5m chart for Openrange to show the range, DV Clearing Range can work on 15m and lower, I am still working on this setup to test it out during trade hours or perhaps in an On-Demand.

Leavitt_Grid: https://tos.mx/q3HQTcw

Backtested this with on-demand, was painful to load the charts but was able to pull it off in about 3 hours, SQ and MSFT were the tickers and the date was default selected to Feb 27th.

SQ was a scalp and MSFT was a swing in to opening of next day came out to 18410\$ profit (SQ - 14contracts Call Scalp MSFT - 22 Contracts Put Swing)

-S

#### barbaros

##### Well-known member
VIP
@SuryaKiranC This is very interesting. Can you please summarize the rules for the cart combo?

#### SuryaKiranC

##### Well-known member
@barbaros Sure.
• In addition to what was originally listed in the original post, I have additional indicators, all of them are free.
• Open_Range_Breakout, Consolidation_Breakout, Compression_Box_Breakout and DV_Clearing_Range.
• Compression_Box is a nice visual representation, to identify choppy zone. A nice visualization that is all.
• Consolidation_Box is also a nice visual representation, to plot pivot levels on break out.
• Most of the magic is happening with the rest of them, OpenRange_Breakout and DV_Clearing_Range and Leavitt Suite.
• Set Open_Range_BreakOut, rage from 9:30 - 9:45 and 9:30 - 10:00.
• Set DV_Clearing_Range Breach 15min.
The way to use:
• ORB is plotting the hight low and pivot point of the first 30 mins.
• DV_Clearing Range, if sufficient data is available is alerting trade direction with in the set Breach period. Along with stop levels for both long and short. (Please note: in my setting Breach is set to 15min, could be changed to 30min too).
• Leavitt_suite are are a whole bunch of top and bottom chart indicators, along with custom code posted by @MerryDay and you (@barbaros), to indicate Bull/Bear end and start after entering the tread.
So, I set it in 5m charts till we past the first 30 mins of the trading day and to see if we have a trade decision on a ticker, once a trade is entered, switch over to 15m charts, to monitor Leavitt signals to see through the trade.

Exit the trade, when the candles are falling below Leavitt_Convolution plot, on upper chart area. (for long and he reverse of for short)

Hope this helps.

-S

#### barbaros

##### Well-known member
VIP
@SuryaKiranC Very helpful. Thank you for detailed explanation. I will definitely watch this tomorrow opening.

Do you prefer to trade with options or directly the equity?

#### SuryaKiranC

##### Well-known member
@SuryaKiranC Very helpful. Thank you for detailed explanation. I will definitely watch this tomorrow opening.

Do you prefer to trade with options or directly the equity?
Options.

#### Nomak

##### Member
2019 Donor
Is DV_Clearing Range available here?