RangeFinder January 20, 2016 11:24PM |
Registered: 8 years ago Posts: 3 |
Re: RangeFinder January 21, 2016 08:40PM |
Registered: 8 years ago Posts: 3 |
Re: Fun with ThinkScript January 22, 2016 01:15AM |
Registered: 10 years ago Posts: 465 |
Re: Fun with ThinkScript January 23, 2016 02:21PM |
Registered: 8 years ago Posts: 22 |
Re: Fun with ThinkScript January 25, 2016 02:34PM |
Registered: 10 years ago Posts: 143 |
Re: Fun with ThinkScript January 25, 2016 03:28PM |
Registered: 8 years ago Posts: 9 |
Re: Fun with ThinkScript January 25, 2016 03:34PM |
Registered: 8 years ago Posts: 3 |
Re: Fun with ThinkScript January 25, 2016 08:37PM |
Registered: 10 years ago Posts: 143 |
Advanced Alerts in TOS? January 25, 2016 04:28PM |
Registered: 8 years ago Posts: 56 |
Re: Fun with ThinkScript January 25, 2016 10:23PM |
Registered: 8 years ago Posts: 9 |
Re: Fun with ThinkScript January 26, 2016 01:41PM |
Registered: 10 years ago Posts: 143 |
Re: Fun with ThinkScript January 26, 2016 04:52PM |
Registered: 8 years ago Posts: 1 |
Directional Divergence Index ( DDI ) need a THINKORSWIM Script September 05, 2014 03:52AM |
Registered: 9 years ago Posts: 60 |
Re: Directional Divergence Index ( DDI ) need a THINKORSWIM Script January 27, 2016 01:15AM |
Registered: 8 years ago Posts: 7 |
Re: Directional Divergence Index ( DDI ) need a THINKORSWIM Script January 27, 2016 04:58AM |
Registered: 8 years ago Posts: 161 |
hanimusa, I have no idea what kind of code that DDI is written in. But, I took a try at interpreting what I think it means. I then ran it on TOS and it seems useful. BUT, I don't believe there is a way to create histogram bars for a custom study in TOS (I'm pretty sure histogram bars are limited to TOS canned studies). Best I could do is add Cloud. I have the TOS code in bold, and the old code normal. Just copy it all and load it as it is. Hope it's at least a step in the right direction.Quote
hanimusa
> good day
> have any one fund the Directional Divergence Index
> ( DDI ) if some one can help me in tradestations
> program or THINKORSWIM program.
> Thanks
> Hani
declare lower; input span1 = 12; input span2 = 26; #TR : = MAX ( ABS (H - REF ( H , 1 ) ) , ABS ( L - REF ( L , 1 ) ) ) ; def TR = absvalue(high-high[1]); def TR2 = absvalue(low-low[1]); #DMZ : = IF ( ( H+L ) < = ( REF ( H,1 ) + REF ( L,1 ) ) , 0 , MAX ( ABS ( H - REF #( H , 1 ) ) , #ABS ( L - REF ( L , 1 ) ) ) ) ; def DMZ = if (high+low) <= (high[1]+low[1]) then 0 else absvalue(high-high[1]) and absvalue(low-low[1]); #DMF : = IF ( ( H+L ) > = ( REF ( H ,1 ) + REF ( L,1 ) ) , 0, MAX ( ABS ( H - REF #( H , 1 ) ) , #ABS ( L - REF ( L, 1 ) ) ) ) ; def DMF = if (high+low) >= (high[1]+low[1]) then 0 else absvalue(high-high[1]) and absvalue(low-low[1]); #DIZ : = SUM ( DMZ , N ) / ( SUM ( DMZ , N ) + SUM ( DMF , N ) ) ; def DIZ = (sum(DMZ,span1)/sum(DMZ,span2) )+ sum(DMF,span1); #DIF : = SUM ( DMF , N ) / ( SUM ( DMF , N ) + SUM ( DMZ , N ) ) ; def DIF = (sum(DMF,span1)/sum(DMF,span2) )+ sum(DMZ,span1); #DDI : DIZ - DIF , COLORSTICK ; def DDI = DIZ-DIF; #ADDI : SMA ( DDI , N1 , M ) ; plot ADDI = average(DDI,span1); #AD : MA ( ADDI , M1 ) ; plot AD = average(ADDI,span2); addcloud(ADDI,AD,color.plum,color.magenta);
Re: Fun with ThinkScript January 27, 2016 02:23PM |
Registered: 8 years ago Posts: 22 |
Re: Fun with ThinkScript January 27, 2016 07:26PM |
Registered: 10 years ago Posts: 143 |
Re: Fun with ThinkScript January 27, 2016 10:40PM |
Registered: 8 years ago Posts: 9 |
Re: Fun with ThinkScript January 28, 2016 02:38AM |
Registered: 8 years ago Posts: 22 |
Re: Fun with ThinkScript January 28, 2016 01:51PM |
Registered: 10 years ago Posts: 143 |
Re: Fun with ThinkScript January 28, 2016 01:52PM |
Registered: 9 years ago Posts: 14 |
Re: Fun with ThinkScript January 28, 2016 01:53PM |
Registered: 9 years ago Posts: 14 |
Re: Fun with ThinkScript January 28, 2016 03:23PM |
Registered: 8 years ago Posts: 161 |
Re: Fun with ThinkScript January 28, 2016 05:42PM |
Registered: 10 years ago Posts: 143 |
Re: Fun with ThinkScript January 28, 2016 11:46PM |
Registered: 8 years ago Posts: 20 |
# SJ_ADX_DMI_TrendStrengthLabels # # Directional Movement System measures the ability of bulls and # bears to move price outside the previous day's trading range. declare upper; input length = 14; def hiDiff = high - high[1]; def loDiff = low[1] - low; def plusDM = if hiDiff > loDiff and hiDiff > 0 then hiDiff else 0; def minusDM = if loDiff > hiDiff and loDiff > 0 then loDiff else 0; def ATR = WildersAverage(TrueRange(high, close, low), length); def "DI+" = 100 * WildersAverage(plusDM, length) / ATR; def "DI-" = 100 * WildersAverage(minusDM, length) / ATR; def DX = if ("DI+" + "DI-" > 0) then 100 * AbsValue("DI+" - "DI-" / ("DI+" + "DI-" else 0; def ADX = WildersAverage(DX, length); # # ============================================================ # TREND DIRECTION # ============================================================ # Bullish Trend def BullishCondition = "DI+" > "DI-"; # Bearish Trend def BearishCondition = "DI-" > "DI+"; # ============================================================ # TREND STRENGTH # ============================================================ # Range Bound & No Trend def ConditionA = ADX > 0 && ADX < 20; # Absent or Weak Trend def ConditionB = ADX > 20 && ADX < 25; # Strong Trend def ConditionC = ADX > 25 && ADX < 50; # Very Strong Trend def ConditionD = ADX > 50 && ADX < 75; # Extremely Strong Trend def ConditionE = ADX > 75 && ADX < 100; # ============================================================ # ************************************************************ # addChartLabel(visible, value, textLabel, color) AddLabel(yes, Concat( ADX, Concat( if ConditionA then " Range Bound " else if ConditionB then " Weak " else if ConditionC then " Strong " else if ConditionD then " Very Strong " else if ConditionE then " Extremely Strong " else " No Strength ", if BullishCondition then "Bullish Trend" else if BearishCondition then "Bearish Trend" else "& No Trend"), if ConditionA && BullishCondition then Color.LIME else if ConditionA && BearishCondition then Color.MAGENTA else if ConditionB && BullishCondition then Color.LIGHT_GREEN else if ConditionB && BearishCondition then Color.PINK else if ConditionC && BullishCondition then Color.GREEN else if ConditionC && BearishCondition then Color.RED else if ConditionD && BullishCondition then Color.DARK_GREEN else if ConditionD && BearishCondition then Color.DARK_RED else if ConditionE && BullishCondition then Color.YELLOW else if ConditionE && BearishCondition then Color.PLUM else Color.WHITE); plot null = Double.NaN;
Re: Fun with ThinkScript January 29, 2016 01:58AM |
Registered: 8 years ago Posts: 161 |
bughatti, you've come to the right place, as there are many expert options traders here. I hope they'll share with you. I'm not an expert in that area, but I traded options (Long only) during a most difficult period, 2008-2009. So here's my two cents. Yes, that's too many indicators. As you know- and it's easy to forget- there are only three things important to trading options: Timing, Direction, and Speed. Speed translates as beta, or volatility. Time decay (theta) can be readily forecasted and, though it's important, if you get TDS right, then theta's irrelevant. I don't know which combination of your studies is best for realizing TDS but you sound diligent so I know you'll figure it out.Quote
bughatti
...What I am looking for is
> suggestions on best setups or at least a starting
> point...
> I guess the biggest question I have is do I have
> to many indicators setup, am I trying to over
> analyze the stocks?...
> I know even with indicators, it is still a semi
> guessing game and nothing is guaranteed but is
> there one of the above or another indicator that
> should be my starting point and whatever it is,
> what is the best way to read it....
Re: Directional Divergence Index ( DDI ) need a THINKORSWIM Script January 29, 2016 04:18PM |
Registered: 8 years ago Posts: 7 |
Re: Directional Divergence Index ( DDI ) need a THINKORSWIM Script January 29, 2016 06:48PM |
Registered: 8 years ago Posts: 161 |
Hanimusa, glad I could help a little. There's no pic (and it might not help that much anyway). I have been unable to find a clear description of DDI anyplace, so it's very hard to code what I don't understand. Your description helps but it's still not perfectly clear. Are those "periods" EMAs? Which ones to subtract from which ones? Is only one of them the signal line? If you can clarify these points I'm sure this code can be written (even by an amateur like me). This link explains how MACD is set up so you see what I meanQuote
hanimusa
> Thanks a lot baffled1 for yor reply and help
> Directional Divergence Index ( DDI ) looks like
> MACD, but the difference between MACD AND DDI IS
> MACD 26,12,9
>
> DDI has 4 periods
> period 13
> period 30
> period 10
> period 5
>
> kindly look to the pic
> [www.google.com]
_KAhVEuBQKHYXVCp8QjRwIBw&url=http%3A%2F%2Fwww.researchtrade.com%2Fforum%2Fread.php%3F7%2C3877&psig=AFQjCNG7Pb0ZKt3LLzlCgSlY3E2DL-wBcQ&ust=1454186789689981
so could you please help me with the formela for DDI
Hani
Re: Fun with ThinkScript January 29, 2016 08:45PM |
Registered: 10 years ago Posts: 143 |
Re: Fun with ThinkScript January 29, 2016 11:15PM |
Registered: 8 years ago Posts: 20 |