Ultimate Bullish Cross using Price Momentum and Volume For SwingTrading

J

justAnotherTrader

Member
VIP
This is a work in progress but it is my favorite one yet. It is inspired from Mobius TTM Momentum Oscillator but has enough original content that I believe it deserves it's own thread.

The idea behind it: Mobious TTM Squeeze indicator has been one of my main indicators for awhile now. I have found use in finding the direction/strength of price momentum, but I have noticed some shortcomings in my trading with it that I tried to work on.

Shortcomings of original indicator:

1) It does not take volume into consideration
2) Its difficult to get directional signals from it, even though it contains valuable information.
3) Its difficult to use to time entries and exits

What I did:
1) I took out all the bells and whistles and reduced it to one price momentum line, an average of that momentum line, and a zero line.
2) I incorporated volume by adding what I call a volume multiplier. It takes the current bar's volume divided by the average volume multiplied by the price momentum line
3) I added some labels for different scenarios, such as long plays, buy, sell, hold and short plays sell short, cover, hold

How to interpret it:

The idea is pretty simple, when the average price momentum is greater than zero you are in a long play scenario. If the price momentum line crosses above the average line then the bulls have taken the play so to speak, indicating a buy signal etc.

An example:



Here is the code for the indicator:

Code:
declare lower;

input Shortlength = 13; #hint Signal Fast Line
input LongLength = 50; #hint Slow Line
input price = close;

#For Price Momentum
def PriceK = (Highest(high, Shortlength) + Lowest(low, Shortlength)) /
2 + ExpAverage(close, Shortlength);
def PriceKLong = (Highest(high, Longlength) + Lowest(low, Longlength)) /
2 + ExpAverage(close, Longlength);
def PriceMomo = Inertia(price - PriceK / 2, Shortlength);
def expAvgMomoPrice = SimpleMovingAvg(PriceMomo, LongLength);

def VN = SimpleMovingAvg(volume, Shortlength);
def volumeMultiplier = (volume/VN);


plot Inertias = volumeMultiplier*PriceMomo;
plot avgInertia = ExpAvgMomoPrice;
plot zeroline = 0;

def avgBullishInertia = avgInertia > 0;
def avgBearishInertia = avgInertia < 0;

def bullishLongSignal = Inertias crosses above avgInertia and avgBullishInertia;
def bearishLongSignal = Inertias crosses below avgInertia and avgBullishInertia;
def longHoldSignal = Inertias > avgInertia and !(Inertias crosses above avgInertia) and avgBullishInertia;
def bearishPivotSignal = Inertias < bearishLongSignal and Inertias < 0 and avgBullishInertia;
def UncertainBullSignal = Inertias < bearishLongSignal and Inertias > 0 and avgBullishInertia;


def bullishShortSignal = Inertias crosses below avgInertia and avgBearishInertia;
def bearishShortSignal = Inertias crosses above avgInertia and avgBearishInertia;
def shortHoldSignal = Inertias < avgInertia and !(Inertias crosses below avgInertia) and avgBearishInertia;
def bullishPivotSignal = Inertias > bearishLongSignal and Inertias > 0 and avgBearishInertia;
def UncertainBearSignal = Inertias > bearishLongSignal and Inertias < 0 and avgBearishInertia;

AddLabel( avgBullishInertia, "Long Plays Only" , Color.CYAN);
AddLabel( bullishLongSignal, "Buy" , Color.Green);
AddLabel( bearishLongSignal, "Sell" , Color.Red);
AddLabel( longHoldSignal, "Hold Long" , Color.Green);
AddLabel(bearishPivotSignal, "Possible Bearish Pivot Point", Color.Red);
AddLabel(UncertainBullSignal, "Avoid Buys",Color.Blue);

AddLabel( avgBearishInertia, "Short Plays Only", Color.Dark_RED);
AddLabel( bullishShortSignal, "Short", Color.Green);
AddLabel( bearishShortSignal, "Cover Short", Color.Red);
AddLabel( shortHoldSignal, "Hold Short", Color.Green);
AddLabel(bullishPivotSignal, "Possible Bullish Pivot Point", Color.Green);
AddLabel(UncertainBearSignal, "Avoid Shorts",Color.Blue);

Inertias.DefineColor("Up", GetColor(1));
Inertias.DefineColor("Down", GetColor(0));
Inertias.AssignValueColor(if Inertias >= avgInertia then Inertias.color("Up") else Inertias.color("Down"));

zeroline.SetDefaultColor(Color.GRAY);
avgInertia.SetDefaultColor(Color.RED);

Here is the code for the scanner:

Code:
declare lower;

input Shortlength = 13; #hint Signal Fast Line
input LongLength = 50; #hint Slow Line
input price = close;

#For Price Momentum
def PriceK = (Highest(high, Shortlength) + Lowest(low, Shortlength)) /
2 + ExpAverage(close, Shortlength);
def PriceKLong = (Highest(high, Longlength) + Lowest(low, Longlength)) /
2 + ExpAverage(close, Longlength);
def PriceMomo = Inertia(price - PriceK / 2, Shortlength);
def expAvgMomoPrice = SimpleMovingAvg(PriceMomo, LongLength);

def VN = SimpleMovingAvg(volume, Shortlength);
def volumeMultiplier = (volume/VN);


def Inertias = volumeMultiplier*PriceMomo;
def avgInertia = ExpAvgMomoPrice;
def zeroline = 0;

def avgBullishInertia = avgInertia > 0;
def avgBearishInertia = avgInertia < 0;

def bullishLongSignal = Inertias crosses above avgInertia and avgBullishInertia;
def bearishLongSignal = Inertias crosses below avgInertia and avgBullishInertia;
def longHoldSignal = Inertias > avgInertia and !(Inertias crosses above avgInertia) and avgBullishInertia;

def bullishShortSignal = Inertias crosses below avgInertia and avgBearishInertia;
def bearishShortSignal = Inertias crosses above avgInertia and avgBearishInertia;
def shortHoldSignal = Inertias < avgInertia and !(Inertias crosses below avgInertia) and avgBearishInertia;

plot buy = bullishLongSignal;
 
Last edited:
A

asragov

New member
2019 Donor
VIP
Thanks for posting this. How key have you found the inertia average to be, in terms of successful trades? It looks like the crossover is often effective, even if the average is less than 0.

Also, what are the typical time frames you use it in? Thanks again
 
J

justAnotherTrader

Member
VIP
I like the average moving line to be greater than 0 to give me an idea of the longer trend, I personally like to take trades with trends not against them. I noticed when the average was <0 there were more false signals. Ive only looked at backtesting so far, and average backtest results were 60% win rates on the 1hour chart crossovers when the daily chart average was > 0. This week I will start testing with my actual account to see how it stacks up in real time. As with any stratagies, the risk management is more powerful than the stratagy itself for getting positive results. That being said, if you find a better way to use it please share!
 
technicallydreaming

technicallydreaming

Member
I am a bit confused at how to interpret the signals. Looking at the Tesla Daily Chart. The indicator still says "Long plays only" but the inertia line is magenta (down) and both below the average, and the zero line.

 
Last edited:
T

topmarx

New member
VIP
The indicator looks awesome will do some backtesting.

Also as above, labels correct, below is for FB.
 
J

justAnotherTrader

Member
VIP
The label for Long Plays Only means that the Longer Momentum Line, (The Red Line), Is above 0 implying the long trend is bullish, the Signal Line is the shorter momentum. You would get a buy signal if the Signal line crosses above the Red Line while the Red Line is greater than 0, so that you would move with the trend. I updated the code, it should be a little clearer.
 
Last edited:
A

APOT7

New member
VIP
Please correct me with this.

My understanding, if the Single Line (short momentum) cross the red line, we are in bullish trend, if the red line is above zero.

If the single line cross the red line and red line is below zero, we are bearish.

Where is the updated code?
 
P

Playstation

Active member
VIP
I noticed this moves very similarly to a MACD.
 
J

justAnotherTrader

Member
VIP
Please correct me with this.

My understanding, if the Single Line (short momentum) cross the red line, we are in bullish trend, if the red line is above zero.

If the single line cross the red line and red line is below zero, we are bearish.

Where is the updated code?


I updated the code in the main post, Just recopy and paste into your study
 
horserider

horserider

Well-known member
VIP
Hope justanothertrader does not mind.
Just noticed the line "def expAvgMomoPrice = SimpleMovingAvg(PriceMomo, LongLength); " said it was defining an expAvgMomoPrice yet used a simple moving average. I changed it to Exponential average and removed a few lines of code and did the colors red and green.
Use the original or this code as you prefer.


Code:
declare lower;

input Shortlength = 13; #hint Signal Fast Line
input LongLength = 50; #hint Slow Line
#input price = close;

#For Price Momentum
def PriceK = (Highest(high, Shortlength) + Lowest(low, Shortlength)) /
2 + ExpAverage(close, Shortlength);
def PriceKLong = (Highest(high, Longlength) + Lowest(low, Longlength)) /
2 + ExpAverage(close, Longlength);
def PriceMomo = Inertia(close - PriceK / 2, Shortlength);
plot expAvgMomoPrice = ExpAverage(PriceMomo, LongLength);

def VN = SimpleMovingAvg(volume, Shortlength);
def volumeMultiplier = (volume/VN);


plot Inertias = volumeMultiplier*PriceMomo;

plot zeroline = 0;

def avgBullishInertia = ExpAvgMomoPrice > 0;
def avgBearishInertia = ExpAvgMomoPrice < 0;

def bullishLongSignal = Inertias crosses above ExpAvgMomoPrice and avgBullishInertia;
def bearishLongSignal = Inertias crosses below ExpAvgMomoPrice and avgBullishInertia;
def longHoldSignal = Inertias > ExpAvgMomoPrice and !(Inertias crosses above ExpAvgMomoPrice) and avgBullishInertia;
def bearishPivotSignal = Inertias < bearishLongSignal and Inertias < 0 and avgBullishInertia;
def UncertainBullSignal = Inertias < bearishLongSignal and Inertias > 0 and avgBullishInertia;


def bullishShortSignal = Inertias crosses below ExpAvgMomoPrice and avgBearishInertia;
def bearishShortSignal = Inertias crosses above ExpAvgMomoPrice and avgBearishInertia;
def shortHoldSignal = Inertias < ExpAvgMomoPrice and !(Inertias crosses below ExpAvgMomoPrice) and avgBearishInertia;
def bullishPivotSignal = Inertias > bearishLongSignal and Inertias > 0 and avgBearishInertia;
def UncertainBearSignal = Inertias > bearishLongSignal and Inertias < 0 and avgBearishInertia;

AddLabel( avgBullishInertia, "Long Plays Only" , Color.CYAN);
AddLabel( bullishLongSignal, "Buy" , Color.Green);
AddLabel( bearishLongSignal, "Sell" , Color.Red);
AddLabel( longHoldSignal, "Hold Long" , Color.Green);
AddLabel(bearishPivotSignal, "Possible Bearish Pivot Point", Color.Red);
AddLabel(UncertainBullSignal, "Avoid Buys",Color.Blue);

AddLabel( avgBearishInertia, "Short Plays Only", Color.Dark_RED);
AddLabel( bullishShortSignal, "Short", Color.Green);
AddLabel( bearishShortSignal, "Cover Short", Color.Red);
AddLabel( shortHoldSignal, "Hold Short", Color.Green);
AddLabel(bullishPivotSignal, "Possible Bullish Pivot Point", Color.Green);
AddLabel(UncertainBearSignal, "Avoid Shorts",Color.Blue);


Inertias.AssignValueColor(if Inertias >= ExpAvgMomoPrice then (color.GREEN )else color.RED);

zeroline.SetDefaultColor(Color.GRAY);
ExpAvgMomoPrice.SetDefaultColor(Color.RED);
 
H

henry1224

Member
VIP
I took the Original Code and modified it. I use 5 different lengths for the oscillator ,but I kept the ratio between the averages still at 4 to 1 and then used three different Aggregation periods, I used the labels for the fastest length osc for each Aggregation period.

fastest osc on the bottom slowest osc on top

here is the code

Code:
#######################
Declare Lower;

# GLOBAL DEFINITIONS

DefineGlobalColor("TrendUp", CreateColor(0, 254, 30));

DefineGlobalColor("TrendDown", CreateColor(255, 3, 2));



input agg = AggregationPeriod.FIVE_MIN;

input agg2 = AggregationPeriod.THIRTY_MIN;

input agg3 = AggregationPeriod.HOUR;



input DotSize = 5;

input n = 17;

def n1 = n + 1;

def CP = close(Period = AGG);

def CP2 = close(Period = AGG2);

def CP3 = close(Period = AGG3);

def VP = Volume(Period = AGG);

def VP2 = Volume(Period = AGG2);

def VP3 = Volume(Period = AGG3);

def HP = High(Period = AGG);

def HP2 = High(Period = AGG2);

def HP3 = High(Period = AGG3);

def LP = Low(Period = AGG);

def LP2 = Low(Period = AGG2);

def LP3 = Low(Period = AGG3);



input Slength1 = 5;

input LLength1 = 20;

input Slength2 = 8;

input LLength2 = 32;

input Slength3 = 13;

input LLength3 = 52;

input Slength4 = 21;

input LLength4 = 84;

input Slength5 = 34;

input LLength5 = 136;



def PriceK1 = (Highest(HP, Slength1) + Lowest(LP, Slength1)) /

2 + ExpAverage(CP, Slength1);

def PriceKLong1 = (Highest(hP, Llength1) + Lowest(lP, Llength1)) /

2 + ExpAverage(CP, Llength1);

def PriceMomo1 = Inertia(CP – PriceK1 / 2, Slength1);

def expAvgMomoPrice1 = ExpAverage(PriceMomo1, LLength1);

def VN1 = SimpleMovingAvg(VP, Slength1);

def volumeMultiplier1 = (VP/VN1);

def Inertias1 = volumeMultiplier1*PriceMomo1;

def avgInertia1 = ExpAvgMomoPrice1;

def avgBullishInertia = avgInertia1 > 0;

def avgBearishInertia = avgInertia1 < 0;

def bullishLongSignal = Inertias1 crosses above avgInertia1 and avgBullishInertia;

def bearishLongSignal = Inertias1 crosses below avgInertia1 and avgBullishInertia;

def longHoldSignal = Inertias1 > avgInertia1 and !(Inertias1 crosses above avgInertia1) and avgBullishInertia;

def bearishPivotSignal = Inertias1 < bearishLongSignal and Inertias1 < 0 and avgBullishInertia;

def UncertainBullSignal = Inertias1 < bearishLongSignal and Inertias1 > 0 and avgBullishInertia;





def bullishShortSignal = Inertias1 crosses below avgInertia1 and avgBearishInertia;

def bearishShortSignal = Inertias1 crosses above avgInertia1 and avgBearishInertia;

def shortHoldSignal = Inertias1 < avgInertia1 and !(Inertias1 crosses below avgInertia1) and avgBearishInertia;

def bullishPivotSignal = Inertias1 > bearishLongSignal and Inertias1 > 0 and avgBearishInertia;

def UncertainBearSignal = Inertias1 > bearishLongSignal and Inertias1 < 0 and avgBearishInertia;



AddLabel( avgBullishInertia, "Agg 1 Long Plays Only" , Color.CYAN);

AddLabel( bullishLongSignal, "Agg 1 Buy" , Color.Green);

AddLabel( bearishLongSignal, "Agg 1 Sell" , Color.Red);

AddLabel( longHoldSignal, "Agg 1 Hold Long" , Color.Green);

AddLabel(bearishPivotSignal, "Agg 1 Possible Bearish Pivot Point", Color.Red);

AddLabel(UncertainBullSignal, "Agg 1 Avoid Buys",Color.Blue);



AddLabel( avgBearishInertia, "Agg 1 Short Plays Only", Color.Dark_RED);

AddLabel( bullishShortSignal, "Agg 1 Short", Color.Green);

AddLabel( bearishShortSignal, "Agg 1 Cover Short", Color.Red);

AddLabel( shortHoldSignal, "Agg 1 Hold Short", Color.Green);

AddLabel(bullishPivotSignal, "Agg 1 Possible Bullish Pivot Point", Color.Green);

AddLabel(UncertainBearSignal, "Agg 1 Avoid Shorts",Color.Blue);





def PriceK2 = (Highest(HP, Slength2) + Lowest(LP, Slength2)) /

2 + ExpAverage(CP, Slength2);

def PriceKLong2 = (Highest(hP, Llength2) + Lowest(lP, Llength2)) /

2 + ExpAverage(CP, Llength2);

def PriceMomo2 = Inertia(CP – PriceK2 / 2, Slength2);

def expAvgMomoPrice2 = ExpAverage(PriceMomo2, LLength2);

def VN2 = SimpleMovingAvg(VP, Slength2);

def volumeMultiplier2 = (VP/VN2);

def Inertias2 = volumeMultiplier2*PriceMomo2;

def avgInertia2 = ExpAvgMomoPrice2;

def avgBullishInertia2 = avgInertia2 > 0;

def avgBearishInertia2 = avgInertia2 < 0;



def PriceK3 = (Highest(HP, Slength3) + Lowest(LP, Slength3)) /

2 + ExpAverage(CP, Slength3);

def PriceKLong3 = (Highest(hP, Llength3) + Lowest(lP, Llength3)) /

2 + ExpAverage(CP, Llength3);

def PriceMomo3 = Inertia(CP – PriceK3 / 2, Slength3);

def expAvgMomoPrice3 = ExpAverage(PriceMomo3, LLength3);

def VN3 = SimpleMovingAvg(VP, Slength3);

def volumeMultiplier3 = (VP/VN3);

def Inertias3 = volumeMultiplier3*PriceMomo3;

def avgInertia3 = ExpAvgMomoPrice3;

def avgBullishInertia3 = avgInertia3 > 0;

def avgBearishInertia3 = avgInertia3 < 0;



def PriceK4 = (Highest(HP, Slength4) + Lowest(LP, Slength4)) /

2 + ExpAverage(CP, Slength4);

def PriceKLong4 = (Highest(hP, Llength4) + Lowest(lP, Llength4)) /

2 + ExpAverage(CP, Llength4);

def PriceMomo4 = Inertia(CP – PriceK4 / 2, Slength4);

def expAvgMomoPrice4 = ExpAverage(PriceMomo4, LLength4);

def VN4 = SimpleMovingAvg(VP, Slength4);

def volumeMultiplier4 = (VP/VN4);

def Inertias4 = volumeMultiplier4*PriceMomo4;

def avgInertia4 = ExpAvgMomoPrice4;

def avgBullishInertia4 = avgInertia4 > 0;

def avgBearishInertia4 = avgInertia4 < 0;





def PriceK5 = (Highest(HP, Slength5) + Lowest(LP, Slength5)) /

2 + ExpAverage(CP, Slength5);

def PriceKLong5 = (Highest(hP, Llength5) + Lowest(lP, Llength5)) /

2 + ExpAverage(CP, Llength5);

def PriceMomo5 = Inertia(CP – PriceK5 / 2, Slength5);

def expAvgMomoPrice5 = ExpAverage(PriceMomo5, LLength5);

def VN5 = SimpleMovingAvg(VP, Slength5);

def volumeMultiplier5 = (VP/VN5);

def Inertias5 = volumeMultiplier2*PriceMomo5;

def avgInertia5 = ExpAvgMomoPrice5;

def avgBullishInertia5 = avgInertia5 > 0;

def avgBearishInertia5 = avgInertia5 < 0;



## Agg2



def BPriceK1 = (Highest(HP2, Slength1) + Lowest(LP2, Slength1)) /

2 + ExpAverage(CP2, Slength1);

def BPriceKLong1 = (Highest(hP2, Llength1) + Lowest(lP2, Llength1)) /

2 + ExpAverage(CP2, Llength1);

def BPriceMomo1 = Inertia(CP2 – BPriceK1 / 2, Slength1);

def BexpAvgMomoPrice1 = ExpAverage(BPriceMomo1, LLength1);

def BVN1 = SimpleMovingAvg(VP2, Slength1);

def BvolumeMultiplier1 = (VP2/BVN1);

def BInertias1 = BvolumeMultiplier1*BPriceMomo1;

def BavgInertia1 = BExpAvgMomoPrice1;

def BavgBullishInertia = BavgInertia1 > 0;

def BavgBearishInertia = BavgInertia1 < 0;

def BbullishLongSignal = BInertias1 crosses above BavgInertia1 and BavgBullishInertia;

def BbearishLongSignal = BInertias1 crosses below BavgInertia1 and BavgBullishInertia;

def BlongHoldSignal = BInertias1 > BavgInertia1 and !(BInertias1 crosses above BavgInertia1) and BavgBullishInertia;

def BbearishPivotSignal = BInertias1 < BbearishLongSignal and BInertias1 < 0 and BavgBullishInertia;

def BUncertainBullSignal = BInertias1 < BbearishLongSignal and BInertias1 > 0 and BavgBullishInertia;



def BbullishShortSignal = BInertias1 crosses below BavgInertia1 and BavgBearishInertia;

def BbearishShortSignal = BInertias1 crosses above BavgInertia1 and BavgBearishInertia;

def BshortHoldSignal = BInertias1 < BavgInertia1 and !(BInertias1 crosses below BavgInertia1) and BavgBearishInertia;

def BbullishPivotSignal = BInertias1 > BbearishLongSignal and BInertias1 > 0 and BavgBearishInertia;

def BUncertainBearSignal = BInertias1 > BbearishLongSignal and BInertias1 < 0 and BavgBearishInertia;



AddLabel( BavgBullishInertia, "Agg2 Long Plays Only" , Color.CYAN);

AddLabel( BbullishLongSignal, "Agg 2 Buy" , Color.Green);

AddLabel( BbearishLongSignal, "Agg 2Sell" , Color.Red);

AddLabel( BlongHoldSignal, "Agg 2 Hold Long" , Color.Green);

AddLabel(BbearishPivotSignal, "Agg 2 Possible Bearish Pivot Point", Color.Red);

AddLabel(BUncertainBullSignal, "Agg 2 Avoid Buys",Color.Blue);



AddLabel( BavgBearishInertia, "Agg 2 Short Plays Only", Color.Dark_RED);

AddLabel( BbullishShortSignal, "Agg 2 Short", Color.Green);

AddLabel( BbearishShortSignal, "Agg 2 Cover Short", Color.Red);

AddLabel( BshortHoldSignal, "Agg 2 Hold Short", Color.Green);

AddLabel(BbullishPivotSignal, "Agg 2 Possible Bullish Pivot Point", Color.Green);

AddLabel(BUncertainBearSignal, "Agg 2 Avoid Shorts",Color.Blue);





def BPriceK2 = (Highest(HP2, Slength2) + Lowest(LP2, Slength2)) /

2 + ExpAverage(CP2, Slength2);

def BPriceKLong2 = (Highest(hP2, Llength2) + Lowest(lP2, Llength2)) /

2 + ExpAverage(CP2, Llength2);

def BPriceMomo2 = Inertia(CP2 – BPriceK2 / 2, Slength2);

def BexpAvgMomoPrice2 = ExpAverage(BPriceMomo2, LLength2);

def BVN2 = SimpleMovingAvg(VP2, Slength2);

def BvolumeMultiplier2 = (VP2/BVN2);

def BInertias2 = BvolumeMultiplier2*BPriceMomo2;

def BavgInertia2 = BExpAvgMomoPrice2;

def BavgBullishInertia2 = BavgInertia2 > 0;

def BavgBearishInertia2 = BavgInertia2 < 0;



def BPriceK3 = (Highest(HP2, Slength3) + Lowest(LP2, Slength3)) /

2 + ExpAverage(CP2, Slength3);

def BPriceKLong3 = (Highest(hP2, Llength3) + Lowest(lP2, Llength3)) /

2 + ExpAverage(CP2, Llength3);

def BPriceMomo3 = Inertia(CP2 – BPriceK3 / 2, Slength3);

def BexpAvgMomoPrice3 = ExpAverage(BPriceMomo3, LLength3);

def BVN3 = SimpleMovingAvg(VP2, Slength3);

def BvolumeMultiplier3 = (VP2/BVN3);

def BInertias3 = BvolumeMultiplier3*BPriceMomo3;

def BavgInertia3 = BExpAvgMomoPrice3;

def BavgBullishInertia3 = BavgInertia3 > 0;

def BavgBearishInertia3 = BavgInertia3 < 0;



def BPriceK4 = (Highest(HP2, Slength4) + Lowest(LP2, Slength4)) /

2 + ExpAverage(CP2, Slength4);

def BPriceKLong4 = (Highest(hP2, Llength4) + Lowest(lP2, Llength4)) /

2 + ExpAverage(CP2, Llength4);

def BPriceMomo4 = Inertia(CP2 – BPriceK4 / 2, Slength4);

def BexpAvgMomoPrice4 = ExpAverage(BPriceMomo4, LLength4);

def BVN4 = SimpleMovingAvg(VP2, Slength4);

def BvolumeMultiplier4 = (VP2/BVN4);

def BInertias4 = BvolumeMultiplier4*BPriceMomo4;

def BavgInertia4 = BExpAvgMomoPrice4;

def BavgBullishInertia4 = BavgInertia4 > 0;

def BavgBearishInertia4 = BavgInertia4 < 0;



def BPriceK5 = (Highest(HP2, Slength5) + Lowest(LP2, Slength5)) /

2 + ExpAverage(CP2, Slength5);

def BPriceKLong5 = (Highest(hP2, Llength5) + Lowest(lP2, Llength5)) /

2 + ExpAverage(CP2, Llength5);

def BPriceMomo5 = Inertia(CP2 – BPriceK5 / 2, Slength5);

def BexpAvgMomoPrice5 = ExpAverage(BPriceMomo5, LLength5);

def BVN5 = SimpleMovingAvg(VP2, Slength5);

def BvolumeMultiplier5 = (VP2/BVN5);

def BInertias5 = BvolumeMultiplier2*BPriceMomo5;

def BavgInertia5 = BExpAvgMomoPrice5;

def BavgBullishInertia5 = BavgInertia5 > 0;

def BavgBearishInertia5 = BavgInertia5 < 0;



##### Agg3



def CPriceK1 = (Highest(HP3, Slength1) + Lowest(LP3, Slength1)) /

2 + ExpAverage(CP3, Slength1);

def CPriceKLong1 = (Highest(hP3, Llength1) + Lowest(lP3, Llength1)) /

2 + ExpAverage(CP3, Llength1);

def CPriceMomo1 = Inertia(CP3 – CPriceK1 / 2, Slength1);

def CexpAvgMomoPrice1 = ExpAverage(CPriceMomo1, LLength1);

def CVN1 = SimpleMovingAvg(VP3, Slength1);

def CvolumeMultiplier1 = (VP3/CVN1);

def CInertias1 = CvolumeMultiplier1*CPriceMomo1;

def CavgInertia1 = CExpAvgMomoPrice1;

def CavgBullishInertia = CavgInertia1 > 0;

def CavgBearishInertia = CavgInertia1 < 0;

def CbullishLongSignal = CInertias1 crosses above CavgInertia1 and CavgBullishInertia;

def CbearishLongSignal = CInertias1 crosses below CavgInertia1 and CavgBullishInertia;

def ClongHoldSignal = CInertias1 > CavgInertia1 and !(CInertias1 crosses above CavgInertia1) and CavgBullishInertia;

def CbearishPivotSignal = CInertias1 < CbearishLongSignal and CInertias1 < 0 and CavgBullishInertia;

def CUncertainBullSignal = CInertias1 < CbearishLongSignal and CInertias1 > 0 and CavgBullishInertia;





def CbullishShortSignal = CInertias1 crosses below CavgInertia1 and CavgBearishInertia;

def CbearishShortSignal = CInertias1 crosses above CavgInertia1 and CavgBearishInertia;

def CshortHoldSignal = CInertias1 < CavgInertia1 and !(CInertias1 crosses below CavgInertia1) and CavgBearishInertia;

def CbullishPivotSignal = CInertias1 > CbearishLongSignal and CInertias1 > 0 and CavgBearishInertia;

def CUncertainBearSignal = CInertias1 > CbearishLongSignal and CInertias1 < 0 and CavgBearishInertia;



AddLabel( CavgBullishInertia, "Agg 3 Long Plays Only" , Color.CYAN);

AddLabel( CbullishLongSignal, "Agg 3 Buy" , Color.Green);

AddLabel( CbearishLongSignal, "Agg 3 Sell" , Color.Red);

AddLabel( ClongHoldSignal, "Agg 3 Hold Long" , Color.Green);

AddLabel(CbearishPivotSignal, "Agg 3 Possible Bearish Pivot Point", Color.Red);

AddLabel(CUncertainBullSignal, "Agg 3 Avoid Buys",Color.Blue);



AddLabel( CavgBearishInertia, "Agg 3 Short Plays Only", Color.Dark_RED);

AddLabel( CbullishShortSignal, "Agg 3 Short", Color.Green);

AddLabel( CbearishShortSignal, "Agg 3 Cover Short", Color.Red);

AddLabel( CshortHoldSignal, "Agg 3 Hold Short", Color.Green);

AddLabel(CbullishPivotSignal, "Agg 3 Possible Bullish Pivot Point", Color.Green);

AddLabel(CUncertainBearSignal, "Agg 3 Avoid Shorts",Color.Blue);



def CPriceK2 = (Highest(HP3, Slength2) + Lowest(LP3, Slength2)) /

2 + ExpAverage(CP3, Slength2);

def CPriceKLong2 = (Highest(hP3, Llength2) + Lowest(lP3, Llength2)) /

2 + ExpAverage(CP3, Llength2);

def CPriceMomo2 = Inertia(CP3 – CPriceK2 / 2, Slength2);

def CexpAvgMomoPrice2 = ExpAverage(CPriceMomo2, LLength2);

def CVN2 = SimpleMovingAvg(VP3, Slength2);

def CvolumeMultiplier2 = (VP3/CVN2);

def CInertias2 = CvolumeMultiplier2*CPriceMomo2;

def CavgInertia2 = CExpAvgMomoPrice2;

def CavgBullishInertia2 = CavgInertia2 > 0;

def CavgBearishInertia2 = CavgInertia2 < 0;



def CPriceK3 = (Highest(HP3, Slength3) + Lowest(LP3, Slength3)) /

2 + ExpAverage(CP3, Slength3);

def CPriceKLong3 = (Highest(hP3, Llength3) + Lowest(lP3, Llength3)) /

2 + ExpAverage(CP3, Llength3);

def CPriceMomo3 = Inertia(CP3 – CPriceK3 / 2, Slength3);

def CexpAvgMomoPrice3 = ExpAverage(CPriceMomo3, LLength3);

def CVN3 = SimpleMovingAvg(VP3, Slength3);

def CvolumeMultiplier3 = (VP3/CVN3);

def CInertias3 = CvolumeMultiplier3*CPriceMomo3;

def CavgInertia3 = CExpAvgMomoPrice3;

def CavgBullishInertia3 = CavgInertia3 > 0;

def CavgBearishInertia3 = CavgInertia3 < 0;



def CPriceK4 = (Highest(HP3, Slength4) + Lowest(LP3, Slength4)) /

2 + ExpAverage(CP3, Slength4);

def CPriceKLong4 = (Highest(hP3, Llength4) + Lowest(lP3, Llength4)) /

2 + ExpAverage(CP3, Llength4);

def CPriceMomo4 = Inertia(CP3 – CPriceK4 / 2, Slength4);

def CexpAvgMomoPrice4 = ExpAverage(CPriceMomo4, LLength4);

def CVN4 = SimpleMovingAvg(VP3, Slength4);

def CvolumeMultiplier4 = (VP3/CVN4);

def CInertias4 = CvolumeMultiplier4*CPriceMomo4;

def CavgInertia4 = CExpAvgMomoPrice4;

def CavgBullishInertia4 = CavgInertia4 > 0;

def CavgBearishInertia4 = CavgInertia4 < 0;



def CPriceK5 = (Highest(HP3, Slength5) + Lowest(LP3, Slength5)) /

2 + ExpAverage(CP3, Slength5);

def CPriceKLong5 = (Highest(hP3, Llength5) + Lowest(lP3, Llength5)) /

2 + ExpAverage(CP3, Llength5);

def CPriceMomo5 = Inertia(CP3 – CPriceK5 / 2, Slength5);

def CexpAvgMomoPrice5 = ExpAverage(CPriceMomo5, LLength5);

def CVN5 = SimpleMovingAvg(VP3, Slength5);

def CvolumeMultiplier5 = (VP3/CVN5);

def CInertias5 = CvolumeMultiplier2*CPriceMomo5;

def CavgInertia5 = CExpAvgMomoPrice5;

def CavgBullishInertia5 = CavgInertia5 > 0;

def CavgBearishInertia5 = CavgInertia5 < 0;



#########Plots

plot PMoV1_Dot = if IsNaN(cp) then Double.NaN else 1;

PMoV1_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);

PMoV1_Dot.SetLineWeight(DotSize);

PMoV1_Dot.AssignValueColor(if Inertias1 < avgInertia1 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp [n1]) and IsNaN(CP [n]), 1, (agg/1000/60) + " min", Color.Yellow, yes);



plot PMoV2_Dot = if IsNaN(cp) then Double.NaN else 2;

PMoV2_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);

PMoV2_Dot.SetLineWeight(DotSize);

PMoV2_Dot.AssignValueColor(if Inertias2 < avgInertia2 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp [n1]) and IsNaN(CP [n]), 2, (agg/1000/60) + " min", Color.Yellow, yes);



plot PMoV3_Dot = if IsNaN(cp) then Double.NaN else 3;

PMoV3_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);

PMoV3_Dot.SetLineWeight(DotSize);

PMoV3_Dot.AssignValueColor(if Inertias3 < avgInertia3 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp [n1]) and IsNaN(CP [n]), 3, (agg/1000/60) + " min", Color.Yellow, yes);



plot PMoV4_Dot = if IsNaN(cp) then Double.NaN else 4;

PMoV4_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);

PMoV4_Dot.SetLineWeight(DotSize);

PMoV4_Dot.AssignValueColor(if Inertias4 < avgInertia4 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp [n1]) and IsNaN(CP [n]), 4, (agg/1000/60) + " min", Color.Yellow, yes);



plot PMoV5_Dot = if IsNaN(cp) then Double.NaN else 5;

PMoV5_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);

PMoV5_Dot.SetLineWeight(DotSize);

PMoV5_Dot.AssignValueColor(if Inertias5 < avgInertia5 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp [n1]) and IsNaN(CP [n]), 5, (agg/1000/60) + " min", Color.Yellow, yes);



plot BPMoV1_Dot = if IsNaN(cp2) then Double.NaN else 7;

BPMoV1_Dot.SetPaintingStrategy(PaintingStrategy.POINTS);

BPMoV1_Dot.SetLineWeight(DotSize);

BPMoV1_Dot.AssignValueColor(if BInertias1 < BavgInertia1 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp [n1]) and IsNaN(CP [n]), 7, (agg/1000/60) + " min", Color.Yellow, yes);



plot BPMoV2_Dot = if IsNaN(cp2) then Double.NaN else 8;

BPMoV2_Dot.SetPaintingStrategy(PaintingStrategy.POINTS);

BPMoV2_Dot.SetLineWeight(DotSize);

BPMoV2_Dot.AssignValueColor(if BInertias2 < BavgInertia2 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp2 [n1]) and IsNaN(CP2 [n]), 8, (agg2/1000/60) + " min", Color.Yellow, yes);



plot BPMoV3_Dot = if IsNaN(cp2) then Double.NaN else 9;

BPMoV3_Dot.SetPaintingStrategy(PaintingStrategy.POINTS);

BPMoV3_Dot.SetLineWeight(DotSize);

BPMoV3_Dot.AssignValueColor(if BInertias3 < BavgInertia3 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp2 [n1]) and IsNaN(CP2 [n]), 9, (agg2/1000/60) + " min", Color.Yellow, yes);



plot BPMoV4_Dot = if IsNaN(cp2) then Double.NaN else 10;

BPMoV4_Dot.SetPaintingStrategy(PaintingStrategy.POINTS);

BPMoV4_Dot.SetLineWeight(DotSize);

BPMoV4_Dot.AssignValueColor(if BInertias4 < BavgInertia4 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp2 [n1]) and IsNaN(CP2 [n]), 10, (agg2/1000/60) + " min", Color.Yellow, yes);



plot BPMoV5_Dot = if IsNaN(cp2) then Double.NaN else 11;

BPMoV5_Dot.SetPaintingStrategy(PaintingStrategy.POINTS);

BPMoV5_Dot.SetLineWeight(DotSize);

BPMoV5_Dot.AssignValueColor(if BInertias5 < BavgInertia5 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp2 [n1]) and IsNaN(CP2 [n]), 11, (agg2/1000/60) + " min", Color.Yellow, yes);



plot CPMoV1_Dot = if IsNaN(cp3) then Double.NaN else 13;

CPMoV1_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);

CPMoV1_Dot.SetLineWeight(DotSize);

CPMoV1_Dot.AssignValueColor(if CInertias1 < CavgInertia1 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp3 [n1]) and IsNaN(CP3 [n]), 13, (agg3/1000/60) + " min", Color.Yellow, yes);



plot CPMoV2_Dot = if IsNaN(cp3) then Double.NaN else 14;

CPMoV2_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);

CPMoV2_Dot.SetLineWeight(DotSize);

CPMoV2_Dot.AssignValueColor(if CInertias2 < CavgInertia2 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp3 [n1]) and IsNaN(CP3 [n]), 14, (agg3/1000/60) + " min", Color.Yellow, yes);



plot CPMoV3_Dot = if IsNaN(cp3) then Double.NaN else 15;

CPMoV3_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);

CPMoV3_Dot.SetLineWeight(DotSize);

CPMoV3_Dot.AssignValueColor(if CInertias3 < CavgInertia3 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp3 [n1]) and IsNaN(CP3 [n]), 15, (agg3/1000/60) + " min", Color.Yellow, yes);



plot CPMoV4_Dot = if IsNaN(cp3) then Double.NaN else 16;

CPMoV4_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);

CPMoV4_Dot.SetLineWeight(DotSize);

CPMoV4_Dot.AssignValueColor(if CInertias4 < CavgInertia4 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp3 [n1]) and IsNaN(CP3 [n]), 16, (agg3/1000/60) + " min", Color.Yellow, yes);



plot CPMoV5_Dot = if IsNaN(cp3) then Double.NaN else 17;

CPMoV5_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);

CPMoV5_Dot.SetLineWeight(DotSize);

CPMoV5_Dot.AssignValueColor(if CInertias5 < CavgInertia5 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));

AddChartBubble(!IsNaN(cp3 [n1]) and IsNaN(CP3 [n]), 17, (agg3/1000/60) + " min", Color.Yellow, yes);
 
H

henry1224

Member
VIP
Here is the code same as above but with Labels for all 15 Oscillators

Code:
###############

Declare Lower;
# GLOBAL DEFINITIONS
DefineGlobalColor("TrendUp", CreateColor(0, 254, 30));
DefineGlobalColor("TrendDown", CreateColor(255, 3, 2));

input agg = AggregationPeriod.FIVE_MIN;
input agg2 = AggregationPeriod.THIRTY_MIN;
input agg3 = AggregationPeriod.HOUR;

input DotSize = 5;
input n = 17;
def n1  = n + 1;
def CP = close(Period = AGG);
def CP2 = close(Period = AGG2);
def CP3 = close(Period = AGG3);
def VP = Volume(Period = AGG);
def VP2 = Volume(Period = AGG2);
def VP3 = Volume(Period = AGG3);
def HP = High(Period = AGG);
def HP2 = High(Period = AGG2);
def HP3 = High(Period = AGG3);
def LP = Low(Period = AGG);
def LP2 = Low(Period = AGG2);
def LP3 = Low(Period = AGG3);

input Slength1 = 5;
input LLength1 = 20;
input Slength2 = 8;
input LLength2 = 32;
input Slength3 = 13;
input LLength3 = 52;
input Slength4 = 21;
input LLength4 = 84;
input Slength5 = 34;
input LLength5 = 136;

def PriceK1 = (Highest(HP, Slength1) + Lowest(LP, Slength1)) /
2 + ExpAverage(CP, Slength1);
def PriceKLong1 = (Highest(hP, Llength1) + Lowest(lP, Llength1)) /
2 + ExpAverage(CP, Llength1);
def PriceMomo1 = Inertia(CP – PriceK1 / 2, Slength1);
def expAvgMomoPrice1 = ExpAverage(PriceMomo1, LLength1);
def VN1 = SimpleMovingAvg(VP, Slength1);
def volumeMultiplier1 = (VP/VN1);
def Inertias1 = volumeMultiplier1*PriceMomo1;
def avgInertia1 = ExpAvgMomoPrice1;
def avgBullishInertia = avgInertia1 > 0;
def avgBearishInertia = avgInertia1 < 0;
def bullishLongSignal = Inertias1 crosses above avgInertia1 and avgBullishInertia;
def bearishLongSignal = Inertias1 crosses below avgInertia1 and avgBullishInertia;
def longHoldSignal = Inertias1 > avgInertia1 and !(Inertias1 crosses above avgInertia1) and avgBullishInertia;
def bearishPivotSignal = Inertias1 < bearishLongSignal and Inertias1 < 0 and avgBullishInertia;
def UncertainBullSignal = Inertias1 < bearishLongSignal and Inertias1 > 0 and avgBullishInertia;


def bullishShortSignal = Inertias1 crosses below avgInertia1 and avgBearishInertia;
def bearishShortSignal = Inertias1 crosses above avgInertia1 and avgBearishInertia;
def shortHoldSignal = Inertias1 < avgInertia1 and !(Inertias1 crosses below avgInertia1) and avgBearishInertia;
def bullishPivotSignal = Inertias1 > bearishLongSignal and Inertias1 > 0 and avgBearishInertia;
def UncertainBearSignal = Inertias1 > bearishLongSignal and Inertias1 < 0 and avgBearishInertia;

AddLabel( avgBullishInertia, "Agg 1.1 Long Plays Only" , Color.CYAN);
AddLabel( bullishLongSignal, "Agg 1.1 Buy" , Color.Green);
AddLabel( bearishLongSignal, "Agg 1.1 Sell" , Color.Red);
AddLabel( longHoldSignal, "Agg 1.1 Hold Long" , Color.Green);
AddLabel(bearishPivotSignal, "Agg 1.1 Possible Bearish Pivot Point", Color.Red);
AddLabel(UncertainBullSignal, "Agg 1.1 Avoid Buys",Color.Blue);

AddLabel( avgBearishInertia, "Agg 1.1 Short Plays Only", Color.Dark_RED);
AddLabel( bullishShortSignal, "Agg 1.1 Short", Color.Green);
AddLabel( bearishShortSignal, "Agg 1.1 Cover Short", Color.Red);
AddLabel( shortHoldSignal, "Agg 1.1 Hold Short", Color.Green);
AddLabel(bullishPivotSignal, "Agg 1.1 Possible Bullish Pivot Point", Color.Green);
AddLabel(UncertainBearSignal, "Agg 1.1 Avoid Shorts",Color.Blue);


def PriceK2 = (Highest(HP, Slength2) + Lowest(LP, Slength2)) /
2 + ExpAverage(CP, Slength2);
def PriceKLong2 = (Highest(hP, Llength2) + Lowest(lP, Llength2)) /
2 + ExpAverage(CP, Llength2);
def PriceMomo2 = Inertia(CP – PriceK2 / 2, Slength2);
def expAvgMomoPrice2 = ExpAverage(PriceMomo2, LLength2);
def VN2 = SimpleMovingAvg(VP, Slength2);
def volumeMultiplier2 = (VP/VN2);
def Inertias2 = volumeMultiplier2*PriceMomo2;
def avgInertia2 = ExpAvgMomoPrice2;
def avgBullishInertia2 = avgInertia2 > 0;
def avgBearishInertia2 = avgInertia2 < 0;
def bullishLongSignal2 = Inertias2 crosses above avgInertia2 and avgBullishInertia2;
def bearishLongSignal2 = Inertias2 crosses below avgInertia2 and avgBullishInertia2;
def longHoldSignal2 = Inertias2 > avgInertia2 and !(Inertias2 crosses above avgInertia2) and avgBullishInertia2;
def bearishPivotSignal2 = Inertias2 < bearishLongSignal2 and Inertias2 < 0 and avgBullishInertia2;
def UncertainBullSignal2 = Inertias2 < bearishLongSignal2 and Inertias2 > 0 and avgBullishInertia2;


def bullishShortSignal2 = Inertias2 crosses below avgInertia2 and avgBearishInertia2;
def bearishShortSignal2 = Inertias2 crosses above avgInertia2 and avgBearishInertia2;
def shortHoldSignal2 = Inertias2 < avgInertia1 and !(Inertias2 crosses below avgInertia2) and avgBearishInertia2;
def bullishPivotSignal2 = Inertias2 > bearishLongSignal2 and Inertias2 > 0 and avgBearishInertia2;
def UncertainBearSignal2 = Inertias2 > bearishLongSignal2 and Inertias2 < 0 and avgBearishInertia2;

AddLabel( avgBullishInertia2, "Agg 1.2 Long Plays Only" , Color.CYAN);
AddLabel( bullishLongSignal2, "Agg 1.2 Buy" , Color.Green);
AddLabel( bearishLongSignal2, "Agg 1.2 Sell" , Color.Red);
AddLabel( longHoldSignal2, "Agg 1.2 Hold Long" , Color.Green);
AddLabel(bearishPivotSignal2, "Agg 1.2 Possible Bearish Pivot Point", Color.Red);
AddLabel(UncertainBullSignal2, "Agg 1.2 Avoid Buys",Color.Blue);

AddLabel( avgBearishInertia2, "Agg 1.2 Short Plays Only", Color.Dark_RED);
AddLabel( bullishShortSignal2, "Agg 1.2 Short", Color.Green);
AddLabel( bearishShortSignal2, "Agg 1.2 Cover Short", Color.Red);
AddLabel( shortHoldSignal2, "Agg 1.2 Hold Short", Color.Green);
AddLabel(bullishPivotSignal2, "Agg 1.2 Possible Bullish Pivot Point", Color.Green);
AddLabel(UncertainBearSignal2, "Agg 1.2 Avoid Shorts",Color.Blue);

def PriceK3 = (Highest(HP, Slength3) + Lowest(LP, Slength3)) /
2 + ExpAverage(CP, Slength3);
def PriceKLong3 = (Highest(hP, Llength3) + Lowest(lP, Llength3)) /
2 + ExpAverage(CP, Llength3);
def PriceMomo3 = Inertia(CP – PriceK3 / 2, Slength3);
def expAvgMomoPrice3 = ExpAverage(PriceMomo3, LLength3);
def VN3 = SimpleMovingAvg(VP, Slength3);
def volumeMultiplier3 = (VP/VN3);
def Inertias3 = volumeMultiplier3*PriceMomo3;
def avgInertia3 = ExpAvgMomoPrice3;
def avgBullishInertia3 = avgInertia3 > 0;
def avgBearishInertia3 = avgInertia3 < 0;
def bullishLongSignal3 = Inertias3 crosses above avgInertia3 and avgBullishInertia3;
def bearishLongSignal3 = Inertias3 crosses below avgInertia3 and avgBullishInertia3;
def longHoldSignal3 = Inertias3 > avgInertia3 and !(Inertias3 crosses above avgInertia3) and avgBullishInertia3;
def bearishPivotSignal3 = Inertias3 < bearishLongSignal3 and Inertias3 < 0 and avgBullishInertia3;
def UncertainBullSignal3 = Inertias3< bearishLongSignal3 and Inertias3 > 0 and avgBullishInertia3;


def bullishShortSignal3 = Inertias3 crosses below avgInertia3 and avgBearishInertia3;
def bearishShortSignal3 = Inertias3 crosses above avgInertia3 and avgBearishInertia3;
def shortHoldSignal3 = Inertias3 < avgInertia3 and !(Inertias3 crosses below avgInertia3) and avgBearishInertia3;
def bullishPivotSignal3 = Inertias3 > bearishLongSignal and Inertias3 > 0 and avgBearishInertia3;
def UncertainBearSignal3 = Inertias3 > bearishLongSignal and Inertias3 < 0 and avgBearishInertia3;

AddLabel( avgBullishInertia3, "Agg 1.3 Long Plays Only" , Color.CYAN);
AddLabel( bullishLongSignal3, "Agg 1.3 Buy" , Color.Green);
AddLabel( bearishLongSignal3, "Agg 1.3 Sell" , Color.Red);
AddLabel( longHoldSignal3, "Agg 1.3 Hold Long" , Color.Green);
AddLabel(bearishPivotSignal3, "Agg 1.3 Possible Bearish Pivot Point", Color.Red);
AddLabel(UncertainBullSignal3, "Agg 1.3 Avoid Buys",Color.Blue);

AddLabel( avgBearishInertia3, "Agg 1.3 Short Plays Only", Color.Dark_RED);
AddLabel( bullishShortSignal3, "Agg 1.3 Short", Color.Green);
AddLabel( bearishShortSignal3, "Agg 1.3 Cover Short", Color.Red);
AddLabel( shortHoldSignal3, "Agg 1.3 Hold Short", Color.Green);
AddLabel(bullishPivotSignal3, "Agg 1.3 Possible Bullish Pivot Point", Color.Green);
AddLabel(UncertainBearSignal3, "Agg 1.3 Avoid Shorts",Color.Blue);

def PriceK4 = (Highest(HP, Slength4) + Lowest(LP, Slength4)) /
2 + ExpAverage(CP, Slength4);
def PriceKLong4 = (Highest(hP, Llength4) + Lowest(lP, Llength4)) /
2 + ExpAverage(CP, Llength4);
def PriceMomo4 = Inertia(CP – PriceK4 / 2, Slength4);
def expAvgMomoPrice4 = ExpAverage(PriceMomo4, LLength4);
def VN4 = SimpleMovingAvg(VP, Slength4);
def volumeMultiplier4 = (VP/VN4);
def Inertias4 = volumeMultiplier4*PriceMomo4;
def avgInertia4 = ExpAvgMomoPrice4;
def avgBullishInertia4 = avgInertia4 > 0;
def avgBearishInertia4 = avgInertia4 < 0;
def bullishLongSignal4 = Inertias4 crosses above avgInertia4 and avgBullishInertia4;
def bearishLongSignal4 = Inertias4 crosses below avgInertia4 and avgBullishInertia4;
def longHoldSignal4 = Inertias4 > avgInertia4 and !(Inertias4 crosses above avgInertia4) and avgBullishInertia4;
def bearishPivotSignal4 = Inertias4 < bearishLongSignal4 and Inertias4 < 0 and avgBullishInertia4;
def UncertainBullSignal4 = Inertias4 < bearishLongSignal4 and Inertias4 > 0 and avgBullishInertia4;


def bullishShortSignal4 = Inertias4 crosses below avgInertia4 and avgBearishInertia4;
def bearishShortSignal4 = Inertias4 crosses above avgInertia4 and avgBearishInertia4;
def shortHoldSignal4 = Inertias4 < avgInertia4 and !(Inertias4 crosses below avgInertia4) and avgBearishInertia4;
def bullishPivotSignal4 = Inertias4 > bearishLongSignal4 and Inertias4 > 0 and avgBearishInertia4;
def UncertainBearSignal4 = Inertias4 > bearishLongSignal4 and Inertias4 < 0 and avgBearishInertia4;

AddLabel( avgBullishInertia4, "Agg 1.4 Long Plays Only" , Color.CYAN);
AddLabel( bullishLongSignal4, "Agg 1.4 Buy" , Color.Green);
AddLabel( bearishLongSignal4, "Agg 1.4 Sell" , Color.Red);
AddLabel( longHoldSignal4, "Agg 1.4 Hold Long" , Color.Green);
AddLabel(bearishPivotSignal4, "Agg 1.4 Possible Bearish Pivot Point", Color.Red);
AddLabel(UncertainBullSignal4, "Agg 1.4 Avoid Buys",Color.Blue);

AddLabel( avgBearishInertia4, "Agg 1.4 Short Plays Only", Color.Dark_RED);
AddLabel( bullishShortSignal4, "Agg 1.4 Short", Color.Green);
AddLabel( bearishShortSignal4, "Agg 1.4 Cover Short", Color.Red);
AddLabel( shortHoldSignal4, "Agg 1.4 Hold Short", Color.Green);
AddLabel(bullishPivotSignal4, "Agg 1.4 Possible Bullish Pivot Point", Color.Green);
AddLabel(UncertainBearSignal4, "Agg 1.4 Avoid Shorts",Color.Blue);


def PriceK5 = (Highest(HP, Slength5) + Lowest(LP, Slength5)) /
2 + ExpAverage(CP, Slength5);
def PriceKLong5 = (Highest(hP, Llength5) + Lowest(lP, Llength5)) /
2 + ExpAverage(CP, Llength5);
def PriceMomo5 = Inertia(CP – PriceK5 / 2, Slength5);
def expAvgMomoPrice5 = ExpAverage(PriceMomo5, LLength5);
def VN5 = SimpleMovingAvg(VP, Slength5);
def volumeMultiplier5 = (VP/VN5);
def Inertias5 = volumeMultiplier2*PriceMomo5;
def avgInertia5 = ExpAvgMomoPrice5;
def avgBullishInertia5 = avgInertia5 > 0;
def avgBearishInertia5 = avgInertia5 < 0;
def bullishLongSignal5 = Inertias5 crosses above avgInertia5 and avgBullishInertia5;
def bearishLongSignal5 = Inertias5 crosses below avgInertia5 and avgBullishInertia5;
def longHoldSignal5 = Inertias5 > avgInertia5 and !(Inertias5 crosses above avgInertia5) and avgBullishInertia5;
def bearishPivotSignal5 = Inertias5 < bearishLongSignal5 and Inertias5 < 0 and avgBullishInertia5;
def UncertainBullSignal5 = Inertias5 < bearishLongSignal5 and Inertias5 > 0 and avgBullishInertia5;


def bullishShortSignal5 = Inertias5 crosses below avgInertia5 and avgBearishInertia5;
def bearishShortSignal5 = Inertias5 crosses above avgInertia5 and avgBearishInertia5;
def shortHoldSignal5 = Inertias5 < avgInertia5 and !(Inertias5 crosses below avgInertia5) and avgBearishInertia5;
def bullishPivotSignal5 = Inertias5 > bearishLongSignal5 and Inertias5 > 0 and avgBearishInertia5;
def UncertainBearSignal5 = Inertias5 > bearishLongSignal5 and Inertias5 < 0 and avgBearishInertia5;

AddLabel( avgBullishInertia5, "Agg 1.5 Long Plays Only" , Color.CYAN);
AddLabel( bullishLongSignal5, "Agg 1.5 Buy" , Color.Green);
AddLabel( bearishLongSignal5, "Agg 1.5 Sell" , Color.Red);
AddLabel( longHoldSignal5, "Agg 1.5 Hold Long" , Color.Green);
AddLabel(bearishPivotSignal5, "Agg 1.5 Possible Bearish Pivot Point", Color.Red);
AddLabel(UncertainBullSignal5, "Agg 1.5 Avoid Buys",Color.Blue);

AddLabel( avgBearishInertia5, "Agg 1.5 Short Plays Only", Color.Dark_RED);
AddLabel( bullishShortSignal5, "Agg 1.5 Short", Color.Green);
AddLabel( bearishShortSignal5, "Agg 1.5 Cover Short", Color.Red);
AddLabel( shortHoldSignal5, "Agg 1.5 Hold Short", Color.Green);
AddLabel(bullishPivotSignal5, "Agg 1.5 Possible Bullish Pivot Point", Color.Green);
AddLabel(UncertainBearSignal5, "Agg 1.5 Avoid Shorts",Color.Blue);

##  Agg2

def BPriceK1 = (Highest(HP2, Slength1) + Lowest(LP2, Slength1)) /
2 + ExpAverage(CP2, Slength1);
def BPriceKLong1 = (Highest(hP2, Llength1) + Lowest(lP2, Llength1)) /
2 + ExpAverage(CP2, Llength1);
def BPriceMomo1 = Inertia(CP2 – BPriceK1 / 2, Slength1);
def BexpAvgMomoPrice1 = ExpAverage(BPriceMomo1, LLength1);
def BVN1 = SimpleMovingAvg(VP2, Slength1);
def BvolumeMultiplier1 = (VP2/BVN1);
def BInertias1 = BvolumeMultiplier1*BPriceMomo1;
def BavgInertia1 = BExpAvgMomoPrice1;
def BavgBullishInertia = BavgInertia1 > 0;
def BavgBearishInertia = BavgInertia1 < 0;
def BbullishLongSignal = BInertias1 crosses above BavgInertia1 and BavgBullishInertia;
def BbearishLongSignal = BInertias1 crosses below BavgInertia1 and BavgBullishInertia;
def BlongHoldSignal = BInertias1 > BavgInertia1 and !(BInertias1 crosses above BavgInertia1) and BavgBullishInertia;
def BbearishPivotSignal = BInertias1 < BbearishLongSignal and BInertias1 < 0 and BavgBullishInertia;
def BUncertainBullSignal = BInertias1 < BbearishLongSignal and BInertias1 > 0 and BavgBullishInertia;

def BbullishShortSignal = BInertias1 crosses below BavgInertia1 and BavgBearishInertia;
def BbearishShortSignal = BInertias1 crosses above BavgInertia1 and BavgBearishInertia;
def BshortHoldSignal = BInertias1 < BavgInertia1 and !(BInertias1 crosses below BavgInertia1) and BavgBearishInertia;
def BbullishPivotSignal = BInertias1 > BbearishLongSignal and BInertias1 > 0 and BavgBearishInertia;
def BUncertainBearSignal = BInertias1 > BbearishLongSignal and BInertias1 < 0 and BavgBearishInertia;

AddLabel( BavgBullishInertia, "Agg2.1 Long Plays Only" , Color.CYAN);
AddLabel( BbullishLongSignal, "Agg 2.1 Buy" , Color.Green);
AddLabel( BbearishLongSignal, "Agg 2.1 Sell" , Color.Red);
AddLabel( BlongHoldSignal, "Agg 2.1 Hold Long" , Color.Green);
AddLabel(BbearishPivotSignal, "Agg 2.1 Possible Bearish Pivot Point", Color.Red);
AddLabel(BUncertainBullSignal, "Agg 2.1 Avoid Buys",Color.Blue);

AddLabel( BavgBearishInertia, "Agg 2.1 Short Plays Only", Color.Dark_RED);
AddLabel( BbullishShortSignal, "Agg 2.1 Short", Color.Green);
AddLabel( BbearishShortSignal, "Agg 2.1 Cover Short", Color.Red);
AddLabel( BshortHoldSignal, "Agg 2.1 Hold Short", Color.Green);
AddLabel(BbullishPivotSignal, "Agg 2.1 Possible Bullish Pivot Point", Color.Green);
AddLabel(BUncertainBearSignal, "Agg 2.1 Avoid Shorts",Color.Blue);


def BPriceK2 = (Highest(HP2, Slength2) + Lowest(LP2, Slength2)) /
2 + ExpAverage(CP2, Slength2);
def BPriceKLong2 = (Highest(hP2, Llength2) + Lowest(lP2, Llength2)) /
2 + ExpAverage(CP2, Llength2);
def BPriceMomo2 = Inertia(CP2 – BPriceK2 / 2, Slength2);
def BexpAvgMomoPrice2 = ExpAverage(BPriceMomo2, LLength2);
def BVN2 = SimpleMovingAvg(VP2, Slength2);
def BvolumeMultiplier2 = (VP2/BVN2);
def BInertias2 = BvolumeMultiplier2*BPriceMomo2;
def BavgInertia2 = BExpAvgMomoPrice2;
def BavgBullishInertia2 = BavgInertia2 > 0;
def BavgBearishInertia2 = BavgInertia2 < 0;
def BbullishLongSignal2 = BInertias2 crosses above BavgInertia2 and BavgBullishInertia2;
def BbearishLongSignal2 = BInertias2 crosses below BavgInertia2 and BavgBullishInertia2;
def BlongHoldSignal2 = BInertias2 > BavgInertia2 and !(BInertias2 crosses above BavgInertia2) and BavgBullishInertia2;
def BbearishPivotSignal2 = BInertias2 < BbearishLongSignal2 and BInertias2 < 0 and BavgBullishInertia2;
def BUncertainBullSignal2 = BInertias2 < BbearishLongSignal2 and BInertias2 > 0 and BavgBullishInertia2;

def BbullishShortSignal2 = BInertias2 crosses below BavgInertia2 and BavgBearishInertia2;
def BbearishShortSignal2 = BInertias2 crosses above BavgInertia2 and BavgBearishInertia2;
def BshortHoldSignal2 = BInertias2 < BavgInertia2 and !(BInertias2 crosses below BavgInertia2) and BavgBearishInertia2;
def BbullishPivotSignal2 = BInertias2 > BbearishLongSignal2 and BInertias2 > 0 and BavgBearishInertia2;
def BUncertainBearSignal2 = BInertias2 > BbearishLongSignal2 and BInertias2 < 0 and BavgBearishInertia2;

AddLabel( BavgBullishInertia2, "Agg2.2 Long Plays Only" , Color.CYAN);
AddLabel( BbullishLongSignal2, "Agg 2.2 Buy" , Color.Green);
AddLabel( BbearishLongSignal2, "Agg 2.2 Sell" , Color.Red);
AddLabel( BlongHoldSignal2, "Agg 2.2 Hold Long" , Color.Green);
AddLabel(BbearishPivotSignal2, "Agg 2.2 Possible Bearish Pivot Point", Color.Red);
AddLabel(BUncertainBullSignal2, "Agg 2.2 Avoid Buys",Color.Blue);

AddLabel( BavgBearishInertia2, "Agg 2.2 Short Plays Only", Color.Dark_RED);
AddLabel( BbullishShortSignal2, "Agg 2.2 Short", Color.Green);
AddLabel( BbearishShortSignal2, "Agg 2.2 Cover Short", Color.Red);
AddLabel( BshortHoldSignal2, "Agg 2.2 Hold Short", Color.Green);
AddLabel(BbullishPivotSignal2, "Agg 2.2 Possible Bullish Pivot Point", Color.Green);
AddLabel(BUncertainBearSignal2, "Agg 2.2 Avoid Shorts",Color.Blue);


def BPriceK3 = (Highest(HP2, Slength3) + Lowest(LP2, Slength3)) /
2 + ExpAverage(CP2, Slength3);
def BPriceKLong3 = (Highest(hP2, Llength3) + Lowest(lP2, Llength3)) /
2 + ExpAverage(CP2, Llength3);
def BPriceMomo3 = Inertia(CP2 – BPriceK3 / 2, Slength3);
def BexpAvgMomoPrice3 = ExpAverage(BPriceMomo3, LLength3);
def BVN3 = SimpleMovingAvg(VP2, Slength3);
def BvolumeMultiplier3 = (VP2/BVN3);
def BInertias3 = BvolumeMultiplier3*BPriceMomo3;
def BavgInertia3 = BExpAvgMomoPrice3;
def BavgBullishInertia3 = BavgInertia3 > 0;
def BavgBearishInertia3 = BavgInertia3 < 0;
def BbullishLongSignal3 = BInertias3 crosses above BavgInertia3 and BavgBullishInertia3;
def BbearishLongSignal3 = BInertias3 crosses below BavgInertia3 and BavgBullishInertia3;
def BlongHoldSignal3 = BInertias3 > BavgInertia3 and !(BInertias3 crosses above BavgInertia3) and BavgBullishInertia3;
def BbearishPivotSignal3 = BInertias3 < BbearishLongSignal3 and BInertias3 < 0 and BavgBullishInertia3;
def BUncertainBullSignal3 = BInertias3 < BbearishLongSignal3 and BInertias3 > 0 and BavgBullishInertia3;

def BbullishShortSignal3 = BInertias3 crosses below BavgInertia3 and BavgBearishInertia3;
def BbearishShortSignal3 = BInertias3 crosses above BavgInertia3 and BavgBearishInertia3;
def BshortHoldSignal3 = BInertias3 < BavgInertia3 and !(BInertias3 crosses below BavgInertia3) and BavgBearishInertia3;
def BbullishPivotSignal3 = BInertias3 > BbearishLongSignal3 and BInertias3 > 0 and BavgBearishInertia3;
def BUncertainBearSignal3 = BInertias3 > BbearishLongSignal3 and BInertias3 < 0 and BavgBearishInertia3;

AddLabel( BavgBullishInertia3, "Agg2.3 Long Plays Only" , Color.CYAN);
AddLabel( BbullishLongSignal3, "Agg 2.3 Buy" , Color.Green);
AddLabel( BbearishLongSignal3, "Agg 2.3 Sell" , Color.Red);
AddLabel( BlongHoldSignal3, "Agg 2.3 Hold Long" , Color.Green);
AddLabel(BbearishPivotSignal3, "Agg 2.3 Possible Bearish Pivot Point", Color.Red);
AddLabel(BUncertainBullSignal3, "Agg 2.3 Avoid Buys",Color.Blue);

AddLabel( BavgBearishInertia3, "Agg 2.3 Short Plays Only", Color.Dark_RED);
AddLabel( BbullishShortSignal3, "Agg 2.3 Short", Color.Green);
AddLabel( BbearishShortSignal3, "Agg 2.3 Cover Short", Color.Red);
AddLabel( BshortHoldSignal3, "Agg 2.3 Hold Short", Color.Green);
AddLabel(BbullishPivotSignal3, "Agg 2.3 Possible Bullish Pivot Point", Color.Green);
AddLabel(BUncertainBearSignal3, "Agg 2.3 Avoid Shorts",Color.Blue);


def BPriceK4 = (Highest(HP2, Slength4) + Lowest(LP2, Slength4)) /
2 + ExpAverage(CP2, Slength4);
def BPriceKLong4 = (Highest(hP2, Llength4) + Lowest(lP2, Llength4)) /
2 + ExpAverage(CP2, Llength4);
def BPriceMomo4 = Inertia(CP2 – BPriceK4 / 2, Slength4);
def BexpAvgMomoPrice4 = ExpAverage(BPriceMomo4, LLength4);
def BVN4 = SimpleMovingAvg(VP2, Slength4);
def BvolumeMultiplier4 = (VP2/BVN4);
def BInertias4 = BvolumeMultiplier4*BPriceMomo4;
def BavgInertia4 = BExpAvgMomoPrice4;
def BavgBullishInertia4 = BavgInertia4 > 0;
def BavgBearishInertia4 = BavgInertia4 < 0;
def BbullishLongSignal4 = BInertias4 crosses above BavgInertia4 and BavgBullishInertia4;
def BbearishLongSignal4 = BInertias4 crosses below BavgInertia4 and BavgBullishInertia4;
def BlongHoldSignal4 = BInertias4 > BavgInertia4 and !(BInertias4 crosses above BavgInertia4) and BavgBullishInertia4;
def BbearishPivotSignal4 = BInertias4 < BbearishLongSignal4 and BInertias4 < 0 and BavgBullishInertia4;
def BUncertainBullSignal4 = BInertias4 < BbearishLongSignal4 and BInertias4 > 0 and BavgBullishInertia4;

def BbullishShortSignal4 = BInertias4 crosses below BavgInertia4 and BavgBearishInertia4;
def BbearishShortSignal4 = BInertias4 crosses above BavgInertia4 and BavgBearishInertia4;
def BshortHoldSignal4 = BInertias4 < BavgInertia4 and !(BInertias4 crosses below BavgInertia4) and BavgBearishInertia4;
def BbullishPivotSignal4 = BInertias4 > BbearishLongSignal4 and BInertias4 > 0 and BavgBearishInertia4;
def BUncertainBearSignal4 = BInertias4 > BbearishLongSignal4 and BInertias4 < 0 and BavgBearishInertia4;

AddLabel( BavgBullishInertia4, "Agg2.4 Long Plays Only" , Color.CYAN);
AddLabel( BbullishLongSignal4, "Agg 2.4 Buy" , Color.Green);
AddLabel( BbearishLongSignal4, "Agg 2.4 Sell" , Color.Red);
AddLabel( BlongHoldSignal4, "Agg 2.4 Hold Long" , Color.Green);
AddLabel(BbearishPivotSignal4, "Agg 2.4 Possible Bearish Pivot Point", Color.Red);
AddLabel(BUncertainBullSignal4, "Agg 2.4 Avoid Buys",Color.Blue);

AddLabel( BavgBearishInertia4, "Agg 2.4 Short Plays Only", Color.Dark_RED);
AddLabel( BbullishShortSignal4, "Agg 2.4 Short", Color.Green);
AddLabel( BbearishShortSignal4, "Agg 2.4 Cover Short", Color.Red);
AddLabel( BshortHoldSignal4, "Agg 2.4 Hold Short", Color.Green);
AddLabel(BbullishPivotSignal4, "Agg 2.4 Possible Bullish Pivot Point", Color.Green);
AddLabel(BUncertainBearSignal4, "Agg 2.4 Avoid Shorts",Color.Blue);


def BPriceK5 = (Highest(HP2, Slength5) + Lowest(LP2, Slength5)) /
2 + ExpAverage(CP2, Slength5);
def BPriceKLong5 = (Highest(hP2, Llength5) + Lowest(lP2, Llength5)) /
2 + ExpAverage(CP2, Llength5);
def BPriceMomo5 = Inertia(CP2 – BPriceK5 / 2, Slength5);
def BexpAvgMomoPrice5 = ExpAverage(BPriceMomo5, LLength5);
def BVN5 = SimpleMovingAvg(VP2, Slength5);
def BvolumeMultiplier5 = (VP2/BVN5);
def BInertias5 = BvolumeMultiplier2*BPriceMomo5;
def BavgInertia5 = BExpAvgMomoPrice5;
def BavgBullishInertia5 = BavgInertia5 > 0;
def BavgBearishInertia5 = BavgInertia5 < 0;
def BbullishLongSignal5 = BInertias5 crosses above BavgInertia5 and BavgBullishInertia5;
def BbearishLongSignal5 = BInertias5 crosses below BavgInertia5 and BavgBullishInertia5;
def BlongHoldSignal5 = BInertias5 > BavgInertia5 and !(BInertias5 crosses above BavgInertia5) and BavgBullishInertia5;
def BbearishPivotSignal5 = BInertias5 < BbearishLongSignal5 and BInertias5 < 0 and BavgBullishInertia5;
def BUncertainBullSignal5 = BInertias5 < BbearishLongSignal5 and BInertias5 > 0 and BavgBullishInertia5;

def BbullishShortSignal5 = BInertias5 crosses below BavgInertia5 and BavgBearishInertia5;
def BbearishShortSignal5 = BInertias5 crosses above BavgInertia5 and BavgBearishInertia5;
def BshortHoldSignal5 = BInertias5 < BavgInertia5 and !(BInertias5 crosses below BavgInertia5) and BavgBearishInertia5;
def BbullishPivotSignal5 = BInertias5 > BbearishLongSignal5 and BInertias5 > 0 and BavgBearishInertia5;
def BUncertainBearSignal5 = BInertias5 > BbearishLongSignal5 and BInertias5 < 0 and BavgBearishInertia5;

AddLabel( BavgBullishInertia5, "Agg2.5 Long Plays Only" , Color.CYAN);
AddLabel( BbullishLongSignal5, "Agg 2.5 Buy" , Color.Green);
AddLabel( BbearishLongSignal5, "Agg 2.5 Sell" , Color.Red);
AddLabel( BlongHoldSignal5, "Agg 2.5 Hold Long" , Color.Green);
AddLabel(BbearishPivotSignal5, "Agg 2.5 Possible Bearish Pivot Point", Color.Red);
AddLabel(BUncertainBullSignal5, "Agg 2.5 Avoid Buys",Color.Blue);

AddLabel( BavgBearishInertia5, "Agg 2.5 Short Plays Only", Color.Dark_RED);
AddLabel( BbullishShortSignal5, "Agg 2.5 Short", Color.Green);
AddLabel( BbearishShortSignal5, "Agg 2.5 Cover Short", Color.Red);
AddLabel( BshortHoldSignal5, "Agg 2.5 Hold Short", Color.Green);
AddLabel(BbullishPivotSignal5, "Agg 2.5 Possible Bullish Pivot Point", Color.Green);
AddLabel(BUncertainBearSignal5, "Agg 2.5 Avoid Shorts",Color.Blue);


##### Agg3

def CPriceK1 = (Highest(HP3, Slength1) + Lowest(LP3, Slength1)) /
2 + ExpAverage(CP3, Slength1);
def CPriceKLong1 = (Highest(hP3, Llength1) + Lowest(lP3, Llength1)) /
2 + ExpAverage(CP3, Llength1);
def CPriceMomo1 = Inertia(CP3 – CPriceK1 / 2, Slength1);
def CexpAvgMomoPrice1 = ExpAverage(CPriceMomo1, LLength1);
def CVN1 = SimpleMovingAvg(VP3, Slength1);
def CvolumeMultiplier1 = (VP3/CVN1);
def CInertias1 = CvolumeMultiplier1*CPriceMomo1;
def CavgInertia1 = CExpAvgMomoPrice1;
def CavgBullishInertia = CavgInertia1 > 0;
def CavgBearishInertia = CavgInertia1 < 0;
def CbullishLongSignal = CInertias1 crosses above CavgInertia1 and CavgBullishInertia;
def CbearishLongSignal = CInertias1 crosses below CavgInertia1 and CavgBullishInertia;
def ClongHoldSignal = CInertias1 > CavgInertia1 and !(CInertias1 crosses above CavgInertia1) and CavgBullishInertia;
def CbearishPivotSignal = CInertias1 < CbearishLongSignal and CInertias1 < 0 and CavgBullishInertia;
def CUncertainBullSignal = CInertias1 < CbearishLongSignal and CInertias1 > 0 and CavgBullishInertia;


def CbullishShortSignal = CInertias1 crosses below CavgInertia1 and CavgBearishInertia;
def CbearishShortSignal = CInertias1 crosses above CavgInertia1 and CavgBearishInertia;
def CshortHoldSignal = CInertias1 < CavgInertia1 and !(CInertias1 crosses below CavgInertia1) and CavgBearishInertia;
def CbullishPivotSignal = CInertias1 > CbearishLongSignal and CInertias1 > 0 and CavgBearishInertia;
def CUncertainBearSignal = CInertias1 > CbearishLongSignal and CInertias1 < 0 and CavgBearishInertia;

AddLabel( CavgBullishInertia, "Agg 3.1 Long Plays Only" , Color.CYAN);
AddLabel( CbullishLongSignal, "Agg 3.1 Buy" , Color.Green);
AddLabel( CbearishLongSignal, "Agg 3.1 Sell" , Color.Red);
AddLabel( ClongHoldSignal, "Agg 3.1 Hold Long" , Color.Green);
AddLabel(CbearishPivotSignal, "Agg 3.1 Possible Bearish Pivot Point", Color.Red);
AddLabel(CUncertainBullSignal, "Agg 3.1 Avoid Buys",Color.Blue);

AddLabel( CavgBearishInertia, "Agg 3.1 Short Plays Only", Color.Dark_RED);
AddLabel( CbullishShortSignal, "Agg 3.1 Short", Color.Green);
AddLabel( CbearishShortSignal, "Agg 3.1 Cover Short", Color.Red);
AddLabel( CshortHoldSignal, "Agg 3.1 Hold Short", Color.Green);
AddLabel(CbullishPivotSignal, "Agg 3.1 Possible Bullish Pivot Point", Color.Green);
AddLabel(CUncertainBearSignal, "Agg 3.1 Avoid Shorts",Color.Blue);

def CPriceK2 = (Highest(HP3, Slength2) + Lowest(LP3, Slength2)) /
2 + ExpAverage(CP3, Slength2);
def CPriceKLong2 = (Highest(hP3, Llength2) + Lowest(lP3, Llength2)) /
2 + ExpAverage(CP3, Llength2);
def CPriceMomo2 = Inertia(CP3 – CPriceK2 / 2, Slength2);
def CexpAvgMomoPrice2 = ExpAverage(CPriceMomo2, LLength2);
def CVN2 = SimpleMovingAvg(VP3, Slength2);
def CvolumeMultiplier2 = (VP3/CVN2);
def CInertias2 = CvolumeMultiplier2*CPriceMomo2;
def CavgInertia2 = CExpAvgMomoPrice2;
def CavgBullishInertia2 = CavgInertia2 > 0;
def CavgBearishInertia2 = CavgInertia2 < 0;
def CbullishLongSignal2 = CInertias2 crosses above CavgInertia2 and CavgBullishInertia2;
def CbearishLongSignal2 = CInertias2 crosses below CavgInertia2 and CavgBullishInertia2;
def ClongHoldSignal2 = CInertias2 > CavgInertia2 and !(CInertias2 crosses above CavgInertia2) and CavgBullishInertia2;
def CbearishPivotSignal2 = CInertias2 < CbearishLongSignal2 and CInertias2 < 0 and CavgBullishInertia2;
def CUncertainBullSignal2 = CInertias2 < CbearishLongSignal2 and CInertias2 > 0 and CavgBullishInertia2;


def CbullishShortSignal2 = CInertias2 crosses below CavgInertia2 and CavgBearishInertia2;
def CbearishShortSignal2 = CInertias2 crosses above CavgInertia2 and CavgBearishInertia2;
def CshortHoldSignal2 = CInertias2 < CavgInertia2 and !(CInertias2 crosses below CavgInertia2) and CavgBearishInertia2;
def CbullishPivotSignal2 = CInertias2 > CbearishLongSignal2 and CInertias2 > 0 and CavgBearishInertia2;
def CUncertainBearSignal2 = CInertias2 > CbearishLongSignal2 and CInertias2 < 0 and CavgBearishInertia2;

AddLabel( CavgBullishInertia2, "Agg 3.2 Long Plays Only" , Color.CYAN);
AddLabel( CbullishLongSignal2, "Agg 3.2 Buy" , Color.Green);
AddLabel( CbearishLongSignal2, "Agg 3.2 Sell" , Color.Red);
AddLabel( ClongHoldSignal2, "Agg 3.2 Hold Long" , Color.Green);
AddLabel(CbearishPivotSignal2, "Agg 3.2 Possible Bearish Pivot Point", Color.Red);
AddLabel(CUncertainBullSignal2, "Agg 3.2 Avoid Buys",Color.Blue);

AddLabel( CavgBearishInertia2, "Agg 3.2 Short Plays Only", Color.Dark_RED);
AddLabel( CbullishShortSignal2, "Agg 3.2 Short", Color.Green);
AddLabel( CbearishShortSignal2, "Agg 3.2 Cover Short", Color.Red);
AddLabel( CshortHoldSignal2, "Agg 3.2 Hold Short", Color.Green);
AddLabel(CbullishPivotSignal2, "Agg 3.2 Possible Bullish Pivot Point", Color.Green);
AddLabel(CUncertainBearSignal2, "Agg 3.2 Avoid Shorts",Color.Blue);


def CPriceK3 = (Highest(HP3, Slength3) + Lowest(LP3, Slength3)) /
2 + ExpAverage(CP3, Slength3);
def CPriceKLong3 = (Highest(hP3, Llength3) + Lowest(lP3, Llength3)) /
2 + ExpAverage(CP3, Llength3);
def CPriceMomo3 = Inertia(CP3 – CPriceK3 / 2, Slength3);
def CexpAvgMomoPrice3 = ExpAverage(CPriceMomo3, LLength3);
def CVN3 = SimpleMovingAvg(VP3, Slength3);
def CvolumeMultiplier3 = (VP3/CVN3);
def CInertias3 = CvolumeMultiplier3*CPriceMomo3;
def CavgInertia3 = CExpAvgMomoPrice3;
def CavgBullishInertia3 = CavgInertia3 > 0;
def CavgBearishInertia3 = CavgInertia3 < 0;
def CbullishLongSignal3 = CInertias3 crosses above CavgInertia3 and CavgBullishInertia3;
def CbearishLongSignal3 = CInertias3 crosses below CavgInertia3 and CavgBullishInertia3;
def ClongHoldSignal3 = CInertias3 > CavgInertia3 and !(CInertias3 crosses above CavgInertia3) and CavgBullishInertia3;
def CbearishPivotSignal3 = CInertias3 < CbearishLongSignal3 and CInertias3 < 0 and CavgBullishInertia3;
def CUncertainBullSignal3 = CInertias3 < CbearishLongSignal3 and CInertias3 > 0 and CavgBullishInertia3;


def CbullishShortSignal3 = CInertias3 crosses below CavgInertia3 and CavgBearishInertia3;
def CbearishShortSignal3 = CInertias3 crosses above CavgInertia3 and CavgBearishInertia3;
def CshortHoldSignal3 = CInertias3 < CavgInertia3 and !(CInertias3 crosses below CavgInertia3) and CavgBearishInertia3;
def CbullishPivotSignal3 = CInertias3 > CbearishLongSignal3 and CInertias3 > 0 and CavgBearishInertia3;
def CUncertainBearSignal3 = CInertias3 > CbearishLongSignal3 and CInertias3 < 0 and CavgBearishInertia3;

AddLabel( CavgBullishInertia3, "Agg 3.3 Long Plays Only" , Color.CYAN);
AddLabel( CbullishLongSignal3, "Agg 3.3 Buy" , Color.Green);
AddLabel( CbearishLongSignal3, "Agg 3.3 Sell" , Color.Red);
AddLabel( ClongHoldSignal3, "Agg 3.3 Hold Long" , Color.Green);
AddLabel(CbearishPivotSignal3, "Agg 3.3 Possible Bearish Pivot Point", Color.Red);
AddLabel(CUncertainBullSignal3, "Agg 3.3 Avoid Buys",Color.Blue);

AddLabel( CavgBearishInertia3, "Agg 3.3 Short Plays Only", Color.Dark_RED);
AddLabel( CbullishShortSignal3, "Agg 3.3 Short", Color.Green);
AddLabel( CbearishShortSignal3, "Agg 3.3 Cover Short", Color.Red);
AddLabel( CshortHoldSignal3, "Agg 3.3 Hold Short", Color.Green);
AddLabel(CbullishPivotSignal3, "Agg 3.3 Possible Bullish Pivot Point", Color.Green);
AddLabel(CUncertainBearSignal3, "Agg 3.3 Avoid Shorts",Color.Blue);


def CPriceK4 = (Highest(HP3, Slength4) + Lowest(LP3, Slength4)) /
2 + ExpAverage(CP3, Slength4);
def CPriceKLong4 = (Highest(hP3, Llength4) + Lowest(lP3, Llength4)) /
2 + ExpAverage(CP3, Llength4);
def CPriceMomo4 = Inertia(CP3 – CPriceK4 / 2, Slength4);
def CexpAvgMomoPrice4 = ExpAverage(CPriceMomo4, LLength4);
def CVN4 = SimpleMovingAvg(VP3, Slength4);
def CvolumeMultiplier4 = (VP3/CVN4);
def CInertias4 = CvolumeMultiplier4*CPriceMomo4;
def CavgInertia4 = CExpAvgMomoPrice4;
def CavgBullishInertia4 = CavgInertia4 > 0;
def CavgBearishInertia4 = CavgInertia4 < 0;
def CbullishLongSignal4 = CInertias4 crosses above CavgInertia4 and CavgBullishInertia4;
def CbearishLongSignal4 = CInertias4 crosses below CavgInertia4 and CavgBullishInertia4;
def ClongHoldSignal4 = CInertias4 > CavgInertia4 and !(CInertias4 crosses above CavgInertia4) and CavgBullishInertia4;
def CbearishPivotSignal4 = CInertias4 < CbearishLongSignal4 and CInertias4 < 0 and CavgBullishInertia4;
def CUncertainBullSignal4 = CInertias4 < CbearishLongSignal4 and CInertias4 > 0 and CavgBullishInertia4;


def CbullishShortSignal4 = CInertias4 crosses below CavgInertia4 and CavgBearishInertia4;
def CbearishShortSignal4 = CInertias4 crosses above CavgInertia4 and CavgBearishInertia4;
def CshortHoldSignal4 = CInertias4 < CavgInertia4 and !(CInertias4 crosses below CavgInertia4) and CavgBearishInertia4;
def CbullishPivotSignal4 = CInertias4 > CbearishLongSignal4 and CInertias4 > 0 and CavgBearishInertia4;
def CUncertainBearSignal4 = CInertias4 > CbearishLongSignal4 and CInertias4 < 0 and CavgBearishInertia4;

AddLabel( CavgBullishInertia4, "Agg 3.4 Long Plays Only" , Color.CYAN);
AddLabel( CbullishLongSignal4, "Agg 3.4 Buy" , Color.Green);
AddLabel( CbearishLongSignal4, "Agg 3.4 Sell" , Color.Red);
AddLabel( ClongHoldSignal4, "Agg 3.4 Hold Long" , Color.Green);
AddLabel(CbearishPivotSignal4, "Agg 3.4 Possible Bearish Pivot Point", Color.Red);
AddLabel(CUncertainBullSignal4, "Agg 3.4 Avoid Buys",Color.Blue);

AddLabel( CavgBearishInertia4, "Agg 3.4 Short Plays Only", Color.Dark_RED);
AddLabel( CbullishShortSignal4, "Agg 3.4 Short", Color.Green);
AddLabel( CbearishShortSignal4, "Agg 3.4 Cover Short", Color.Red);
AddLabel( CshortHoldSignal4, "Agg 3.4 Hold Short", Color.Green);
AddLabel(CbullishPivotSignal4, "Agg 3.4 Possible Bullish Pivot Point", Color.Green);
AddLabel(CUncertainBearSignal4, "Agg 3.4 Avoid Shorts",Color.Blue);


def CPriceK5 = (Highest(HP3, Slength5) + Lowest(LP3, Slength5)) /
2 + ExpAverage(CP3, Slength5);
def CPriceKLong5 = (Highest(hP3, Llength5) + Lowest(lP3, Llength5)) /
2 + ExpAverage(CP3, Llength5);
def CPriceMomo5 = Inertia(CP3 – CPriceK5 / 2, Slength5);
def CexpAvgMomoPrice5 = ExpAverage(CPriceMomo5, LLength5);
def CVN5 = SimpleMovingAvg(VP3, Slength5);
def CvolumeMultiplier5 = (VP3/CVN5);
def CInertias5 = CvolumeMultiplier2*CPriceMomo5;
def CavgInertia5 = CExpAvgMomoPrice5;
def CavgBullishInertia5 = CavgInertia5 > 0;
def CavgBearishInertia5 = CavgInertia5 < 0;
def CbullishLongSignal5 = CInertias5 crosses above CavgInertia5 and CavgBullishInertia5;
def CbearishLongSignal5 = CInertias5 crosses below CavgInertia5 and CavgBullishInertia5;
def ClongHoldSignal5 = CInertias5 > CavgInertia5 and !(CInertias5 crosses above CavgInertia5) and CavgBullishInertia5;
def CbearishPivotSignal5 = CInertias5 < CbearishLongSignal5 and CInertias5 < 0 and CavgBullishInertia5;
def CUncertainBullSignal5 = CInertias5 < CbearishLongSignal5 and CInertias5 > 0 and CavgBullishInertia5;


def CbullishShortSignal5 = CInertias5 crosses below CavgInertia5 and CavgBearishInertia5;
def CbearishShortSignal5 = CInertias5 crosses above CavgInertia5 and CavgBearishInertia5;
def CshortHoldSignal5 = CInertias5 < CavgInertia5 and !(CInertias5 crosses below CavgInertia5) and CavgBearishInertia5;
def CbullishPivotSignal5 = CInertias5 > CbearishLongSignal5 and CInertias5 > 0 and CavgBearishInertia5;
def CUncertainBearSignal5 = CInertias5 > CbearishLongSignal5 and CInertias5 < 0 and CavgBearishInertia5;

AddLabel( CavgBullishInertia5, "Agg 3.5 Long Plays Only" , Color.CYAN);
AddLabel( CbullishLongSignal5, "Agg 3.5 Buy" , Color.Green);
AddLabel( CbearishLongSignal5, "Agg 3.5 Sell" , Color.Red);
AddLabel( ClongHoldSignal5, "Agg 3.5 Hold Long" , Color.Green);
AddLabel(CbearishPivotSignal5, "Agg 3.5 Possible Bearish Pivot Point", Color.Red);
AddLabel(CUncertainBullSignal5, "Agg 3.5 Avoid Buys",Color.Blue);

AddLabel( CavgBearishInertia5, "Agg 3.5 Short Plays Only", Color.Dark_RED);
AddLabel( CbullishShortSignal5, "Agg 3.5 Short", Color.Green);
AddLabel( CbearishShortSignal5, "Agg 3.5 Cover Short", Color.Red);
AddLabel( CshortHoldSignal5, "Agg 3.5 Hold Short", Color.Green);
AddLabel(CbullishPivotSignal5, "Agg 3.5 Possible Bullish Pivot Point", Color.Green);
AddLabel(CUncertainBearSignal5, "Agg 3.5 Avoid Shorts",Color.Blue);


#########Plots
plot PMoV1_Dot = if IsNaN(cp) then Double.NaN else 1;
PMoV1_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
PMoV1_Dot.SetLineWeight(DotSize);
PMoV1_Dot.AssignValueColor(if Inertias1 < avgInertia1 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp [n1]) and IsNaN(CP [n]), 1, (agg/1000/60) + " min", Color.Yellow, yes);

plot PMoV2_Dot = if IsNaN(cp) then Double.NaN else 2;
PMoV2_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
PMoV2_Dot.SetLineWeight(DotSize);
PMoV2_Dot.AssignValueColor(if Inertias2 < avgInertia2 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp [n1]) and IsNaN(CP [n]), 2, (agg/1000/60) + " min", Color.Yellow, yes);

plot PMoV3_Dot = if IsNaN(cp) then Double.NaN else 3;
PMoV3_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
PMoV3_Dot.SetLineWeight(DotSize);
PMoV3_Dot.AssignValueColor(if Inertias3 < avgInertia3 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp [n1]) and IsNaN(CP [n]), 3, (agg/1000/60) + " min", Color.Yellow, yes);

plot PMoV4_Dot = if IsNaN(cp) then Double.NaN else 4;
PMoV4_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
PMoV4_Dot.SetLineWeight(DotSize);
PMoV4_Dot.AssignValueColor(if Inertias4 < avgInertia4 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp [n1]) and IsNaN(CP [n]), 4, (agg/1000/60) + " min", Color.Yellow, yes);

plot PMoV5_Dot = if IsNaN(cp) then Double.NaN else 5;
PMoV5_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
PMoV5_Dot.SetLineWeight(DotSize);
PMoV5_Dot.AssignValueColor(if Inertias5 < avgInertia5 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp [n1]) and IsNaN(CP [n]), 5, (agg/1000/60) + " min", Color.Yellow, yes);

plot BPMoV1_Dot = if IsNaN(cp2) then Double.NaN else 7;
BPMoV1_Dot.SetPaintingStrategy(PaintingStrategy.POINTS);
BPMoV1_Dot.SetLineWeight(DotSize);
BPMoV1_Dot.AssignValueColor(if BInertias1 < BavgInertia1 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp [n1]) and IsNaN(CP [n]), 7, (agg/1000/60) + " min", Color.Yellow, yes);

plot BPMoV2_Dot = if IsNaN(cp2) then Double.NaN else 8;
BPMoV2_Dot.SetPaintingStrategy(PaintingStrategy.POINTS);
BPMoV2_Dot.SetLineWeight(DotSize);
BPMoV2_Dot.AssignValueColor(if BInertias2 < BavgInertia2 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp2 [n1]) and IsNaN(CP2 [n]), 8, (agg2/1000/60) + " min", Color.Yellow, yes);

plot BPMoV3_Dot = if IsNaN(cp2) then Double.NaN else 9;
BPMoV3_Dot.SetPaintingStrategy(PaintingStrategy.POINTS);
BPMoV3_Dot.SetLineWeight(DotSize);
BPMoV3_Dot.AssignValueColor(if BInertias3 < BavgInertia3 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp2 [n1]) and IsNaN(CP2 [n]), 9, (agg2/1000/60) + " min", Color.Yellow, yes);

plot BPMoV4_Dot = if IsNaN(cp2) then Double.NaN else 10;
BPMoV4_Dot.SetPaintingStrategy(PaintingStrategy.POINTS);
BPMoV4_Dot.SetLineWeight(DotSize);
BPMoV4_Dot.AssignValueColor(if BInertias4 < BavgInertia4 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp2 [n1]) and IsNaN(CP2 [n]), 10, (agg2/1000/60) + " min", Color.Yellow, yes);

plot BPMoV5_Dot = if IsNaN(cp2) then Double.NaN else 11;
BPMoV5_Dot.SetPaintingStrategy(PaintingStrategy.POINTS);
BPMoV5_Dot.SetLineWeight(DotSize);
BPMoV5_Dot.AssignValueColor(if BInertias5 < BavgInertia5 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp2 [n1]) and IsNaN(CP2 [n]), 11, (agg2/1000/60) + " min", Color.Yellow, yes);

plot CPMoV1_Dot = if IsNaN(cp3) then Double.NaN else 13;
CPMoV1_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
CPMoV1_Dot.SetLineWeight(DotSize);
CPMoV1_Dot.AssignValueColor(if CInertias1 < CavgInertia1 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp3 [n1]) and IsNaN(CP3 [n]), 13, (agg3/1000/60) + " min", Color.Yellow, yes);

plot CPMoV2_Dot = if IsNaN(cp3) then Double.NaN else 14;
CPMoV2_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
CPMoV2_Dot.SetLineWeight(DotSize);
CPMoV2_Dot.AssignValueColor(if CInertias2 < CavgInertia2 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp3 [n1]) and IsNaN(CP3 [n]), 14, (agg3/1000/60) + " min", Color.Yellow, yes);

plot CPMoV3_Dot = if IsNaN(cp3) then Double.NaN else 15;
CPMoV3_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
CPMoV3_Dot.SetLineWeight(DotSize);
CPMoV3_Dot.AssignValueColor(if CInertias3 < CavgInertia3 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp3 [n1]) and IsNaN(CP3 [n]), 15, (agg3/1000/60) + " min", Color.Yellow, yes);

plot CPMoV4_Dot = if IsNaN(cp3) then Double.NaN else 16;
CPMoV4_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
CPMoV4_Dot.SetLineWeight(DotSize);
CPMoV4_Dot.AssignValueColor(if CInertias4 < CavgInertia4 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp3 [n1]) and IsNaN(CP3 [n]), 16, (agg3/1000/60) + " min", Color.Yellow, yes);

plot CPMoV5_Dot = if IsNaN(cp3) then Double.NaN else 17;
CPMoV5_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
CPMoV5_Dot.SetLineWeight(DotSize);
CPMoV5_Dot.AssignValueColor(if CInertias5 < CavgInertia5 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
AddChartBubble(!IsNaN(cp3 [n1]) and IsNaN(CP3 [n]), 17, (agg3/1000/60) + " min", Color.Yellow, yes);
 
C

Chris77

New member
VIP
I like the average moving line to be greater than 0 to give me an idea of the longer trend, I personally like to take trades with trends not against them. I noticed when the average was <0 there were more false signals. Ive only looked at backtesting so far, and average backtest results were 60% win rates on the 1hour chart crossovers when the daily chart average was > 0. This week I will start testing with my actual account to see how it stacks up in real time. As with any stratagies, the risk management is more powerful than the stratagy itself for getting positive results. That being said, if you find a better way to use it please share!


I like it. Could you make the average line (red one) in two colors, above zero one color and under zero a different color. In this way it could eliminate the zero line that often overlaps the red one. Good job!
 

Similar threads

Top