#### a1cturner

##### Well-known member

I have been working on this indicator for a while and I never could figure out my sell signal. Now I have that figured out and but I am getting too many plots.

What I want: When the up arrow fires, wait until the MACD trends down and then fire another indicator. Vice versa, when the down arrow fires, wait until the MACD trends up and then fire another indicator.

I have the indicators working as planned but there are just too many! If I get a down arrow and buy puts, I will exit on the first red dot. The problem is that the red dots keep plotting every candle until MACD reverses the other direction. At that point I have usually already had an arrow up to buy calls at which point I am waiting on a red dot to exit.

This is what I would like... If ArrowUp5 is true with 150 bars and MACDDiff < MACDDiff[1] then -25 (

Vice Versa on ArrowDN5..

I have posted the entire code further below. Don't worry about anything except ArrowUp 6 and ArrowDN6

#################### PART I NEED HELP WITH #########################

Plot ArrowUp6 = if (ArrowUp5 is true within 125 bars) and (MACDDiff < MACDDiff[1]) then 25 else double.nan;

ArrowUp6.SetPaintingStrategy(PaintingStrategy.points);

ArrowUp6.SetLineWeight(5);

ArrowUp6.SetDefaultColor(color.red);

Plot ArrowDN6 = if (ArrowDN5 is true within 125 bars) and MACDDiff > MACDDiff[1] then -25 else double.nan;

ArrowDN6.SetPaintingStrategy(PaintingStrategy.points);

ArrowDN6.SetLineWeight(5);

ArrowDN6.SetDefaultColor(color.red);

######################### ENTIRE CODE ##############################

#JT MOMENTUM CHANGE INDICATOR

#USED TO IDENTIFY SHORT REVERSALS IN LONGER TRENDS FOR SCALPS OR DAY TRADES ONLY.

#USE ON 1 MINUTE CHART ONLY BUT IN CONJUNCTION WITH 10 MINUTE CHART.

#I USE 5/12 AND 34/50 EMA CLOUDS ON MY 10 MINUTE CHART ALONG WITH A FASTER MACD (10, 22, 8) AND RSI.

#ONCE THE INDICATOR IS TRIGGERED WITH ARROW UP I WILL SUBMIT A 50ish DELTA CALL, 10% TRAILING STOP, BUY ORDER, ON THE BID.

#ONCE THE INDICATOR IS TRIGGERED WITH ARROW DOWN I WILL SUBMIT A 50ish DELTA PUT, 10% TRAILING STOP, BUY ORDER, ON THE BID.

#

#

#

#EXIT IS YOUR PREFERENCE BUT I WATCH THE 10 MINUTE 5/12 EMA CLOUD, MACD, VOLUME ETC TO TIME MY EXIT.

#I AM ALSO COMFORTABLE WITH A 50% LOSS BECAUSE I BELIEVE THAT I CAN ACHIEVE A 100% GAIN MORE OFTEN THAN NOT.

#IF I AM BEING CONSERVAITVE THOUGH I WILL WATCH FOR THE PRICE TO EXTEND SIGNIFICANTLY FROM THE 5/12 EMA AND THEN SET A 10%-15% TRAILING SELL ORDER ON THE ASK.

declare lower;

input MovAvg = AverageType.EXPONENTIAL;

input TSITimeShort = aggregationPeriod.MIN;

input TSITimeLong = aggregationPeriod.TEN_MIN;

input EMATime = aggregationPeriod.TEN_MIN;

input MACDTime = aggregationPeriod.TEN_MIN;

input TSILongLength = 34;

input TSIShortLength = 5;

input TSISignalLength = 5;

input EMAFast1 = 5;

input EMAFast2 = 12;

input EMASlow1 = 34;

input EMASlow2 = 50;

input MACDFast = 10;

input MACDSlow = 22;

input MACDLength = 8;

input Symbol = "VIX";

#CLOSE

def TSICloseShort = close(period=TSITimeShort);

def TSICloseLong = close(period=TSITimeLong);

def EMAClose = close(period=EMATime);

def MACDClose = close(period=MACDTime);

def Data = close(Symbol, period=EMATime);

#TRUE STENGTH INDEX(TSI)

def DiffShort = TSICloseShort - TSICloseShort[1];

def DiffLong = TSICloseLong - TSICloseLong[1];

def DoubleSmoothedAbsDiffShort = MovingAverage(MovAvg, MovingAverage(MovAvg, AbsValue(diffShort), TSILongLength), TSIShortLength);

def DoubleSmoothedAbsDiffLong = MovingAverage(MovAvg, MovingAverage(MovAvg, AbsValue(diffLong), TSILongLength), TSIShortLength);

#TSI 1 Min

plot TSIShort;

plot SignalShort;

TSIShort = if DoubleSmoothedAbsDiffShort == 0 then 0

else 100 * (MovingAverage(MovAvg, MovingAverage(MovAvg, DiffShort, TSILongLength), TSIShortLength)) / DoubleSmoothedAbsDiffShort;

SignalShort = MovingAverage(MovAvg, TSIShort, TSISignalLength);

def ZeroLine2 = 0;

TSIShort.SetDefaultColor(GetColor(1));

SignalShort.SetDefaultColor(GetColor(8));

SignalShort.hide();

plot HighLvl1 = 25;

HighLvl1.setDefaultColor(color.dark_green);

HighLvl1.hidebubble();

HighLvl1.hidetitle();

plot LowLvl1 = -25;

LowLvl1.setDefaultColor(color.dark_red);

LowLvl1.hidebubble();

LowLvl1.hidetitle();

#TSI 10 Min

def TSILong;

def SignalLong;

TSILong = if DoubleSmoothedAbsDiffLong == 0 then 0

else 100 * (MovingAverage(MovAvg, MovingAverage(MovAvg, DiffLong, TSILongLength), TSIShortLength)) / DoubleSmoothedAbsDiffLong;

SignalLong = MovingAverage(MovAvg, TSILong, TSISignalLength);

def ZeroLine1 = 0;

#EMAs

def EMA1 = MovingAverage(MovAvg, EMAClose, EMAFast1);

def EMA2 = MovingAverage(MovAvg, EMAClose, EMAFast2);

def EMA3 = MovingAverage(MovAvg, EMAClose, EMASlow1);

def EMA4 = MovingAverage(MovAvg, EMAClose, EMASlow2);

def CompareEMA1 = MovingAverage(MovAvg, Data, EMAFast1);

def CompareEMA2 = MovingAverage(MovAvg, Data, EMAFast2);

#EMA PERCENT

def EMApct = ((ema1 / ema2)*100)-100;

plot EMApctRound = round(EMApct, 2);

#MACD

def MACD = MovingAverage(MovAvg, MACDClose, MACDFast) -

MovingAverage(MovAvg, MACDClose, MACDSlow);

def MACDVar = MovingAverage(MovAvg, MACD, MACDLength);

def MACDDiff = round((MACD - MACDVar), 4);

#GET READY INDICATOR

Plot ArrowUp1 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort between -18 and -24.99) and (EMA1>EMA2) and (EMA3>EMA4) and (MACDDiff > 0) and (CompareEMA1 < CompareEMA2)

then -25

else double.nan;

#Arrowup1.SetPaintingStrategy(PaintingStrategy.arrow_up);

#ArrowUp1.SetLineWeight(2);

#ArrowUp1.SetDefaultColor(Color.violet);

plot ArrowDN1 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort between 18 and 24.99) and (EMA1<EMA2) and (EMA3<EMA4) and (MACDDiff < 0) and (CompareEMA1 > CompareEMA2)

then 25

else double.nan;

#ArrowDN1.SetPaintingStrategy(PaintingStrategy.arrow_down);

#ArrowDN1.SetLineWeight(2);

#ArrowDN1.SetDefaultColor(Color.violet);

#AddChartBubble(ArrowUp1, -25, "Call*", color.violet, no);

#AddChartBubble(ArrowDN1, 25, "Put*", color.violet, yes);

#BUY INDICATOR

Plot ArrowUp2 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort < -25) and (EMA1>EMA2) and (EMA3>EMA4) and (MACDDiff > 0) and (CompareEMA1 < CompareEMA2)

then -25

else double.nan;

#Arrowup2.SetPaintingStrategy(PaintingStrategy.arrow_up);

#ArrowUp2.SetLineWeight(2);

#ArrowUp2.SetDefaultColor(Color.green);

plot ArrowDN2 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort > 25) and (EMA1<EMA2) and (EMA3<EMA4) and (MACDDiff < 0) and (CompareEMA1 > CompareEMA2)

then 25

else double.nan;

#ArrowDN2.SetPaintingStrategy(PaintingStrategy.arrow_down);

#ArrowDN2.SetLineWeight(2);

#ArrowDN2.SetDefaultColor(Color.green);

#AddChartBubble(ArrowUp2, -25, "Call", color.green, no);

#AddChartBubble(ArrowDN2, 25, "Put", color.green, yes);

#AGAINST MARKET TREND

Plot ArrowUp3 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort between -18 and -24.99) and (EMA1>EMA2) and (EMA3>EMA4) and (MACDDiff > 0) and (CompareEMA1 > CompareEMA2)

then -25

else double.nan;

#Arrowup3.SetPaintingStrategy(PaintingStrategy.arrow_up);

#ArrowUp3.SetLineWeight(2);

#ArrowUp3.SetDefaultColor(Color.orange);

plot ArrowDN3 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort between 18 and 24.99) and (EMA1<EMA2) and (EMA3<EMA4) and (MACDDiff < 0) and (CompareEMA1 < CompareEMA2)

then 25

else double.nan;

#ArrowDN3.SetPaintingStrategy(PaintingStrategy.arrow_down);

#ArrowDN3.SetLineWeight(2);

#ArrowDN3.SetDefaultColor(Color.orange);

#AddChartBubble(ArrowUp3, -25, "X-Call*", color.orange, no);

#AddChartBubble(ArrowDN3, 25, "X-Put*", color.orange, yes);

#AGAINST MARKET TREND2

Plot ArrowUp4 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort <-25) and (EMA1>EMA2) and (EMA3>EMA4) and (MACDDiff > 0) and (CompareEMA1 > CompareEMA2)

then -25

else double.nan;

#Arrowup4.SetPaintingStrategy(PaintingStrategy.arrow_up);

#ArrowUp4.SetLineWeight(2);

#ArrowUp4.SetDefaultColor(Color.red);

plot ArrowDN4 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort >25) and (EMA1<EMA2) and (EMA3<EMA4) and (MACDDiff < 0) and (CompareEMA1 < CompareEMA2)

then 25

else double.nan;

#ArrowDN4.SetPaintingStrategy(PaintingStrategy.arrow_down);

#ArrowDN4.SetLineWeight(2);

#ArrowDN4.SetDefaultColor(Color.red);

#AddChartBubble(ArrowUp4, -25, "X-Call", color.red, no);

#AddChartBubble(ArrowDN4, 25, "X-Put", color.red, yes);

#TEST

Plot ArrowUp5 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1545.0) < 0) and (TSIShort > TSIShort[1]) and (EMAPctRound > EMAPctRound[1]) and (MACDDiff > MACDDiff[1]) and (CompareEMA1 < CompareEMA2) then -25 else double.nan;

ArrowUp5.SetPaintingStrategy(PaintingStrategy.arrow_up);

ArrowUp5.SetLineWeight(2);

ArrowUp5.SetDefaultColor(color.pink);

Plot ArrowUp6 = if (ArrowUp5 is true within 125 bars) and (MACDDiff < MACDDiff[1]) then 25 else double.nan;

ArrowUp6.SetPaintingStrategy(PaintingStrategy.points);

ArrowUp6.SetLineWeight(5);

ArrowUp6.SetDefaultColor(color.red);

#TEST

Plot ArrowDN5 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1545.0) < 0) and (TSIShort < TSIShort[1]) and (EMAPctRound < EMAPctRound[1]) and (MACDDiff < MACDDiff[1]) and (CompareEMA1 > CompareEMA2) then 25 else double.nan;

ArrowDN5.SetPaintingStrategy(PaintingStrategy.arrow_down);

ArrowDN5.SetLineWeight(2);

ArrowDN5.SetDefaultColor(color.pink);

Plot ArrowDN6 = if (secondsfromtime (1000.0) > 0) and (ArrowDN5 is true within 125 bars) and MACDDiff > MACDDiff[1] then -25 else double.nan;

ArrowDN6.SetPaintingStrategy(PaintingStrategy.points);

ArrowDN6.SetLineWeight(5);

ArrowDN6.SetDefaultColor(color.red);

#SCANNER

#CALL SCANNER

#http://tos.mx/Q8TQIeB

#PUT SCANNER

#http://tos.mx/GXBvdf0

What I want: When the up arrow fires, wait until the MACD trends down and then fire another indicator. Vice versa, when the down arrow fires, wait until the MACD trends up and then fire another indicator.

I have the indicators working as planned but there are just too many! If I get a down arrow and buy puts, I will exit on the first red dot. The problem is that the red dots keep plotting every candle until MACD reverses the other direction. At that point I have usually already had an arrow up to buy calls at which point I am waiting on a red dot to exit.

This is what I would like... If ArrowUp5 is true with 150 bars and MACDDiff < MACDDiff[1] then -25 (

*but then don't plot again until you get the ArrowUp5 again*)Vice Versa on ArrowDN5..

I have posted the entire code further below. Don't worry about anything except ArrowUp 6 and ArrowDN6

#################### PART I NEED HELP WITH #########################

Plot ArrowUp6 = if (ArrowUp5 is true within 125 bars) and (MACDDiff < MACDDiff[1]) then 25 else double.nan;

ArrowUp6.SetPaintingStrategy(PaintingStrategy.points);

ArrowUp6.SetLineWeight(5);

ArrowUp6.SetDefaultColor(color.red);

Plot ArrowDN6 = if (ArrowDN5 is true within 125 bars) and MACDDiff > MACDDiff[1] then -25 else double.nan;

ArrowDN6.SetPaintingStrategy(PaintingStrategy.points);

ArrowDN6.SetLineWeight(5);

ArrowDN6.SetDefaultColor(color.red);

######################### ENTIRE CODE ##############################

#JT MOMENTUM CHANGE INDICATOR

#USED TO IDENTIFY SHORT REVERSALS IN LONGER TRENDS FOR SCALPS OR DAY TRADES ONLY.

#USE ON 1 MINUTE CHART ONLY BUT IN CONJUNCTION WITH 10 MINUTE CHART.

#I USE 5/12 AND 34/50 EMA CLOUDS ON MY 10 MINUTE CHART ALONG WITH A FASTER MACD (10, 22, 8) AND RSI.

#ONCE THE INDICATOR IS TRIGGERED WITH ARROW UP I WILL SUBMIT A 50ish DELTA CALL, 10% TRAILING STOP, BUY ORDER, ON THE BID.

#ONCE THE INDICATOR IS TRIGGERED WITH ARROW DOWN I WILL SUBMIT A 50ish DELTA PUT, 10% TRAILING STOP, BUY ORDER, ON THE BID.

#

**#***ALWAYS LOOK AT THE VOLUME OF THE OPTION YOU ARE BUYING!*#

**#***PLAY STOCKS THAT YOU KNOW WHERE SUPPORT/RESISTANCE ARE IF POSSIBLE*#

**#***IF THE SIGNAL STOPS BEFORE YOUR BUY TRIGGERS THAN CANCEL THE ORDER AND MOVE ON TO THE NEXT OPPURTUNITY*#EXIT IS YOUR PREFERENCE BUT I WATCH THE 10 MINUTE 5/12 EMA CLOUD, MACD, VOLUME ETC TO TIME MY EXIT.

#I AM ALSO COMFORTABLE WITH A 50% LOSS BECAUSE I BELIEVE THAT I CAN ACHIEVE A 100% GAIN MORE OFTEN THAN NOT.

#IF I AM BEING CONSERVAITVE THOUGH I WILL WATCH FOR THE PRICE TO EXTEND SIGNIFICANTLY FROM THE 5/12 EMA AND THEN SET A 10%-15% TRAILING SELL ORDER ON THE ASK.

declare lower;

input MovAvg = AverageType.EXPONENTIAL;

input TSITimeShort = aggregationPeriod.MIN;

input TSITimeLong = aggregationPeriod.TEN_MIN;

input EMATime = aggregationPeriod.TEN_MIN;

input MACDTime = aggregationPeriod.TEN_MIN;

input TSILongLength = 34;

input TSIShortLength = 5;

input TSISignalLength = 5;

input EMAFast1 = 5;

input EMAFast2 = 12;

input EMASlow1 = 34;

input EMASlow2 = 50;

input MACDFast = 10;

input MACDSlow = 22;

input MACDLength = 8;

input Symbol = "VIX";

#CLOSE

def TSICloseShort = close(period=TSITimeShort);

def TSICloseLong = close(period=TSITimeLong);

def EMAClose = close(period=EMATime);

def MACDClose = close(period=MACDTime);

def Data = close(Symbol, period=EMATime);

#TRUE STENGTH INDEX(TSI)

def DiffShort = TSICloseShort - TSICloseShort[1];

def DiffLong = TSICloseLong - TSICloseLong[1];

def DoubleSmoothedAbsDiffShort = MovingAverage(MovAvg, MovingAverage(MovAvg, AbsValue(diffShort), TSILongLength), TSIShortLength);

def DoubleSmoothedAbsDiffLong = MovingAverage(MovAvg, MovingAverage(MovAvg, AbsValue(diffLong), TSILongLength), TSIShortLength);

#TSI 1 Min

plot TSIShort;

plot SignalShort;

TSIShort = if DoubleSmoothedAbsDiffShort == 0 then 0

else 100 * (MovingAverage(MovAvg, MovingAverage(MovAvg, DiffShort, TSILongLength), TSIShortLength)) / DoubleSmoothedAbsDiffShort;

SignalShort = MovingAverage(MovAvg, TSIShort, TSISignalLength);

def ZeroLine2 = 0;

TSIShort.SetDefaultColor(GetColor(1));

SignalShort.SetDefaultColor(GetColor(8));

SignalShort.hide();

plot HighLvl1 = 25;

HighLvl1.setDefaultColor(color.dark_green);

HighLvl1.hidebubble();

HighLvl1.hidetitle();

plot LowLvl1 = -25;

LowLvl1.setDefaultColor(color.dark_red);

LowLvl1.hidebubble();

LowLvl1.hidetitle();

#TSI 10 Min

def TSILong;

def SignalLong;

TSILong = if DoubleSmoothedAbsDiffLong == 0 then 0

else 100 * (MovingAverage(MovAvg, MovingAverage(MovAvg, DiffLong, TSILongLength), TSIShortLength)) / DoubleSmoothedAbsDiffLong;

SignalLong = MovingAverage(MovAvg, TSILong, TSISignalLength);

def ZeroLine1 = 0;

#EMAs

def EMA1 = MovingAverage(MovAvg, EMAClose, EMAFast1);

def EMA2 = MovingAverage(MovAvg, EMAClose, EMAFast2);

def EMA3 = MovingAverage(MovAvg, EMAClose, EMASlow1);

def EMA4 = MovingAverage(MovAvg, EMAClose, EMASlow2);

def CompareEMA1 = MovingAverage(MovAvg, Data, EMAFast1);

def CompareEMA2 = MovingAverage(MovAvg, Data, EMAFast2);

#EMA PERCENT

def EMApct = ((ema1 / ema2)*100)-100;

plot EMApctRound = round(EMApct, 2);

#MACD

def MACD = MovingAverage(MovAvg, MACDClose, MACDFast) -

MovingAverage(MovAvg, MACDClose, MACDSlow);

def MACDVar = MovingAverage(MovAvg, MACD, MACDLength);

def MACDDiff = round((MACD - MACDVar), 4);

#GET READY INDICATOR

Plot ArrowUp1 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort between -18 and -24.99) and (EMA1>EMA2) and (EMA3>EMA4) and (MACDDiff > 0) and (CompareEMA1 < CompareEMA2)

then -25

else double.nan;

#Arrowup1.SetPaintingStrategy(PaintingStrategy.arrow_up);

#ArrowUp1.SetLineWeight(2);

#ArrowUp1.SetDefaultColor(Color.violet);

plot ArrowDN1 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort between 18 and 24.99) and (EMA1<EMA2) and (EMA3<EMA4) and (MACDDiff < 0) and (CompareEMA1 > CompareEMA2)

then 25

else double.nan;

#ArrowDN1.SetPaintingStrategy(PaintingStrategy.arrow_down);

#ArrowDN1.SetLineWeight(2);

#ArrowDN1.SetDefaultColor(Color.violet);

#AddChartBubble(ArrowUp1, -25, "Call*", color.violet, no);

#AddChartBubble(ArrowDN1, 25, "Put*", color.violet, yes);

#BUY INDICATOR

Plot ArrowUp2 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort < -25) and (EMA1>EMA2) and (EMA3>EMA4) and (MACDDiff > 0) and (CompareEMA1 < CompareEMA2)

then -25

else double.nan;

#Arrowup2.SetPaintingStrategy(PaintingStrategy.arrow_up);

#ArrowUp2.SetLineWeight(2);

#ArrowUp2.SetDefaultColor(Color.green);

plot ArrowDN2 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort > 25) and (EMA1<EMA2) and (EMA3<EMA4) and (MACDDiff < 0) and (CompareEMA1 > CompareEMA2)

then 25

else double.nan;

#ArrowDN2.SetPaintingStrategy(PaintingStrategy.arrow_down);

#ArrowDN2.SetLineWeight(2);

#ArrowDN2.SetDefaultColor(Color.green);

#AddChartBubble(ArrowUp2, -25, "Call", color.green, no);

#AddChartBubble(ArrowDN2, 25, "Put", color.green, yes);

#AGAINST MARKET TREND

Plot ArrowUp3 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort between -18 and -24.99) and (EMA1>EMA2) and (EMA3>EMA4) and (MACDDiff > 0) and (CompareEMA1 > CompareEMA2)

then -25

else double.nan;

#Arrowup3.SetPaintingStrategy(PaintingStrategy.arrow_up);

#ArrowUp3.SetLineWeight(2);

#ArrowUp3.SetDefaultColor(Color.orange);

plot ArrowDN3 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort between 18 and 24.99) and (EMA1<EMA2) and (EMA3<EMA4) and (MACDDiff < 0) and (CompareEMA1 < CompareEMA2)

then 25

else double.nan;

#ArrowDN3.SetPaintingStrategy(PaintingStrategy.arrow_down);

#ArrowDN3.SetLineWeight(2);

#ArrowDN3.SetDefaultColor(Color.orange);

#AddChartBubble(ArrowUp3, -25, "X-Call*", color.orange, no);

#AddChartBubble(ArrowDN3, 25, "X-Put*", color.orange, yes);

#AGAINST MARKET TREND2

Plot ArrowUp4 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort <-25) and (EMA1>EMA2) and (EMA3>EMA4) and (MACDDiff > 0) and (CompareEMA1 > CompareEMA2)

then -25

else double.nan;

#Arrowup4.SetPaintingStrategy(PaintingStrategy.arrow_up);

#ArrowUp4.SetLineWeight(2);

#ArrowUp4.SetDefaultColor(Color.red);

plot ArrowDN4 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1300.0) < 10800) and (TSIShort >25) and (EMA1<EMA2) and (EMA3<EMA4) and (MACDDiff < 0) and (CompareEMA1 < CompareEMA2)

then 25

else double.nan;

#ArrowDN4.SetPaintingStrategy(PaintingStrategy.arrow_down);

#ArrowDN4.SetLineWeight(2);

#ArrowDN4.SetDefaultColor(Color.red);

#AddChartBubble(ArrowUp4, -25, "X-Call", color.red, no);

#AddChartBubble(ArrowDN4, 25, "X-Put", color.red, yes);

#TEST

Plot ArrowUp5 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1545.0) < 0) and (TSIShort > TSIShort[1]) and (EMAPctRound > EMAPctRound[1]) and (MACDDiff > MACDDiff[1]) and (CompareEMA1 < CompareEMA2) then -25 else double.nan;

ArrowUp5.SetPaintingStrategy(PaintingStrategy.arrow_up);

ArrowUp5.SetLineWeight(2);

ArrowUp5.SetDefaultColor(color.pink);

Plot ArrowUp6 = if (ArrowUp5 is true within 125 bars) and (MACDDiff < MACDDiff[1]) then 25 else double.nan;

ArrowUp6.SetPaintingStrategy(PaintingStrategy.points);

ArrowUp6.SetLineWeight(5);

ArrowUp6.SetDefaultColor(color.red);

#TEST

Plot ArrowDN5 = if (secondsfromtime (1000.0) > 0) and (secondsfromtime (1545.0) < 0) and (TSIShort < TSIShort[1]) and (EMAPctRound < EMAPctRound[1]) and (MACDDiff < MACDDiff[1]) and (CompareEMA1 > CompareEMA2) then 25 else double.nan;

ArrowDN5.SetPaintingStrategy(PaintingStrategy.arrow_down);

ArrowDN5.SetLineWeight(2);

ArrowDN5.SetDefaultColor(color.pink);

Plot ArrowDN6 = if (secondsfromtime (1000.0) > 0) and (ArrowDN5 is true within 125 bars) and MACDDiff > MACDDiff[1] then -25 else double.nan;

ArrowDN6.SetPaintingStrategy(PaintingStrategy.points);

ArrowDN6.SetLineWeight(5);

ArrowDN6.SetDefaultColor(color.red);

#SCANNER

#CALL SCANNER

#http://tos.mx/Q8TQIeB

#PUT SCANNER

#http://tos.mx/GXBvdf0

Last edited: