| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | TS Indicator for RS - Gaps I tried to create a new indicator for RS. Actually i tried to modify an old indicator I dont know what is the problem.... Any help will be welcomed Thanks [SameTickOpt=True]; // Noam Gap Size // // Data1 must be intraday -- Data2 not required Input: AvgLength ( 20),// length to determine Daily Range Average Range_Length(20); Var: Avgvalue ( 0 ), YH ( 0 ), YL ( 0 ), TH ( 0 ), TL ( 0 ), {Hsum ( 0 ), Lsum ( 0 ), } Yrange ( 0 ), Trange ( 0 ), TotalRange ( 0 ), { StartPoint ( 0 ), EndPoint ( 0 ), sdate ( 0 ), edate ( 0 ), YHL ( 0 ), YLL ( 0 ), THL ( 0 ), TLL ( 0 ), TopenL (0), YcloseL (0),} GapPercent (0), Gap (0), GappercentGeneral (0), TYclose (0), TTopen (0), Decp ( 0 ), DIFER (0), Yclose (0), Topen (0), vRange(0), GapPercentLength (0), LastBar (false); YH = HighD(1); YL = LowD(1); TH = HighD(0); TL = LowD(0); Yclose= closed(1); Topen= openD (0); // this section to calculate the Average without requiring Daily Symbol as Data2 TotalRange = 0; For Value1 = 0 to avglength-1 begin TotalRange = TotalRange+(HighD(value1)-LowD(value1)); end; If AvgLength <> 0 then Avgvalue = TotalRange/AvgLength; // **** Trange = TH-TL; Yrange = YH-YL; difer= Avgvalue-Trange; Gappercent= (Topen-Yclose)/(yh-yl)*100 ; gap=topen-yclose; Gappercent= (Topen-Yclose)/(yh-yl)*100 ; GappercentGeneral=(Topen-Yclose)/last*100 ; vRange = Average((High-Low),Range_Length); GapPercentLength= (Topen-Yclose)/(Avgvalue)*100; plot1(Gappercent, "Gappercent"); plot2 (Avgvalue, "Avgvalue"); plot3 (difer, "difer"); plot4 (Gap, "gap"); {Text_setstring(Text_ID1, numtostr(Avgvalue,decimal ) +" :Avg_Rg_ "+numtostr(AvgLength, 0) +" " +numtostr(TRange,decimal) +" :T_Rg " ); Value1 = TextLocale(Text_ID1,place mentholder,Avg_Color, percent); Text_setstring(Text_ID4,n umtostr(DIFER,decimal)+" ifer"); Value1 = TextLocale(Text_ID4,place mentholder,DIFER_Color, percent*spreadfactor*.6); Text_setstring(Text_ID5,n umtostr(GapPercentLength, decimal)+" :G "+numtostr(Range_Length,0 ) + " R %" +" " +numtostr(Gap,decimal)+" :G_Sz"); Value1 = TextLocale(Text_ID5,place mentholder,TodayColor, percent*spreadfactor*1); } | ||
| |
|
| | #2 | ||
![]() | Re: TS Indicator for RS - Gaps Quote:
| ||
| |
|
| | #3 | ||
![]() | Re: TS Indicator for RS - Gaps This indicator should calculate today's gap, the gap as a % of the last x days range and the difference between today range and the average range for the last x days. I had this indicator as text on the chart. But i tried to modify it to RS without success. The problem is that this indicator is verified but the RS says that it tried to divide by zero... | ||
| |
|
| | #4 | ||
![]() | Re: TS Indicator for RS - Gaps Quote:
| ||
| |
|
| | #5 | ||
![]() | Re: TS Indicator for RS - Gaps Quote:
the least you can do is post a chart, or a mock up. ...and explain the efforts (codes) you have attempted. (not that I can be of any help...) | ||
| |
|
| | #6 | ||
![]() | Re: TS Indicator for RS - Gaps Take a look at the examples in Stocks & Commodities magazine, RS codes are 4 times as long as others. | ||
| |
|
![]() |
| Tags |
| gap |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Gaps Test | N57H | Technical Analysis | 0 | 07-22-2009 10:57 PM |
| Gaps in Value area | waveslider | Market Profile | 3 | 07-25-2007 05:20 PM |
| Trading GAPS | Robert | Technical Analysis | 0 | 10-05-2006 05:30 PM |
| Understanding Gaps: Why do they exist? | Soultrader | Technical Analysis | 3 | 09-23-2006 09:31 PM |
| Gaps also act as pivots | Soultrader | Technical Analysis | 0 | 08-10-2006 10:00 AM |