Basic.fml 89 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Namespace xmlns:Formula="http://finance.easychart.net" Name="FML" Version="1.0.0.143">
  3. <Description />
  4. <GroupOnly>false</GroupOnly>
  5. <Namespaces>
  6. <Namespace Name="Trend Indicators" Version="">
  7. <Description />
  8. <GroupOnly>true</GroupOnly>
  9. <Namespaces />
  10. <Programs>
  11. <Program IsMainView="true" Name="BBI">
  12. <Code>(MA(C,N1)+MA(C,N2)+MA(C,N3)+MA(C,N4))/4</Code>
  13. <Description>algorithm
  14. BBI = a weighted sum of the other indicators that have a bullish trend.</Description>
  15. <DisabledCycle />
  16. <FullName>Bullish-Bearish Indicator</FullName>
  17. <Params>
  18. <FormulaParam DefaultValue="3" Description="" MaxValue="100" MinValue="1" Name="N1" ParamType="double" />
  19. <FormulaParam DefaultValue="6" Description="" MaxValue="100" MinValue="1" Name="N2" ParamType="double" />
  20. <FormulaParam DefaultValue="12" Description="" MaxValue="100" MinValue="1" Name="N3" ParamType="double" />
  21. <FormulaParam DefaultValue="24" Description="" MaxValue="100" MinValue="1" Name="N4" ParamType="double" />
  22. </Params>
  23. </Program>
  24. <Program IsMainView="false" Name="CYS">
  25. <Code>Var1:=IF(YEAR&gt;=2010 &amp; MONTH&gt;=2,0,1);
  26. Var2:=VOL*C;
  27. Var3:=EMA(Var2,13)/EMA(VOL,13);
  28. CYS: (EMA(CLOSE,P1)-Var3)/Var3*100*Var1;
  29. ML: EMA(CYS,P2)*Var1;
  30. LO: 0, POINTDOT;</Code>
  31. <Description>This indicator shows the percentage of buyer which earn money.</Description>
  32. <DisabledCycle />
  33. <FullName />
  34. <Params>
  35. <FormulaParam DefaultValue="4" Description="" MaxValue="15" MinValue="1" Name="P1" ParamType="double" />
  36. <FormulaParam DefaultValue="5" Description="" MaxValue="15" MinValue="1" Name="P2" ParamType="double" />
  37. </Params>
  38. </Program>
  39. <Program IsMainView="false" Name="DDI">
  40. <Code>TR:=MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1)));
  41. DMZ:=IF((H+L)&lt;=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1))));
  42. DMF:=IF((H+L)&gt;=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1))));
  43. DIZ:=SUM(DMZ,N)/(SUM(DMZ,N)+SUM(DMF,N));
  44. DIF:=SUM(DMF,N)/(SUM(DMF,N)+SUM(DMZ,N));
  45. DDI:DIZ-DIF,COLORSTICK;
  46. ADDI:SMA(DDI,N1,M);
  47. AD:MA(ADDI,M1);
  48. </Code>
  49. <Description />
  50. <DisabledCycle />
  51. <FullName>Directional Divergence Index</FullName>
  52. <Params>
  53. <FormulaParam DefaultValue="13" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  54. <FormulaParam DefaultValue="30" Description="" MaxValue="100" MinValue="1" Name="N1" ParamType="double" />
  55. <FormulaParam DefaultValue="10" Description="" MaxValue="100" MinValue="1" Name="M" ParamType="double" />
  56. <FormulaParam DefaultValue="5" Description="" MaxValue="100" MinValue="1" Name="M1" ParamType="double" />
  57. </Params>
  58. </Program>
  59. <Program IsMainView="false" Name="DMA">
  60. <Code>DDD : (MA(CLOSE,SHORT)-MA(CLOSE,LONG));
  61. AMA : MA(DDD,M)</Code>
  62. <Description>A moving average calculated based upon daily activity. A number preceding the abbreviation indicates the daily time period used to calculate the average.</Description>
  63. <DisabledCycle />
  64. <FullName>Daily Moving Average</FullName>
  65. <Params>
  66. <FormulaParam DefaultValue="10" Description="" MaxValue="300" MinValue="2" Name="SHORT" ParamType="double" />
  67. <FormulaParam DefaultValue="50" Description="" MaxValue="300" MinValue="2" Name="LONG" ParamType="double" />
  68. <FormulaParam DefaultValue="10" Description="" MaxValue="300" MinValue="1" Name="M" ParamType="double" />
  69. </Params>
  70. </Program>
  71. <Program IsMainView="false" Name="DMI">
  72. <Code>TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N);
  73. HD := HIGH-REF(HIGH,1);
  74. LD := REF(LOW,1)-LOW;
  75. DMP:= SUM(IF(HD&gt;0 &amp; HD&gt;LD,HD,0),N);
  76. DMM:= SUM(IF(LD&gt;0 &amp; LD&gt;HD,LD,0),N);
  77. PDI: DMP*100/TR;
  78. MDI: DMM*100/TR;
  79. ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
  80. ADXR:(ADX+REF(ADX,M))/2
  81. </Code>
  82. <Description>Directional movement is a system for providing trading signals to be used for price breaks from a trading range. The system involves 5 indicators which are the Directional Movement Index (DX), the plus Directional Indicator (+DI), the minus Directional Indicator (-DI), the average Directional Movement (ADX) and the Directional movement rating (ADXR). The system was developed J. Welles Wilder and is explained thoroughly in his book, New Concepts in Technical Trading Systems .
  83. The basic Directional Movement Trading system involves plotting the 14day +DI and the 14 day -DI on top of each other. When the +DI rises above the -DI, it is a bullish signal. A bearish signal occurs when the +DI falls below the -DI. To avoid whipsaws, Wilder identifies a trigger point to be the extreme price on the day the lines cross. If you have received a buy signal, you would wait for the security to rise above the extreme price (the high price on the day the lines crossed). If you are waiting for a sell signal the extreme point is then defined as the low price on the day's the line cross.</Description>
  84. <DisabledCycle />
  85. <FullName>Directional Movement Index</FullName>
  86. <Params>
  87. <FormulaParam DefaultValue="14" Description="" MaxValue="100" MinValue="2" Name="N" ParamType="double" />
  88. <FormulaParam DefaultValue="6" Description="" MaxValue="100" MinValue="1" Name="M" ParamType="double" />
  89. </Params>
  90. </Program>
  91. <Program IsMainView="true" Name="EMA4">
  92. <Code>MA1:EMA(CLOSE,P1);
  93. MA2:EMA(CLOSE,P2);
  94. MA3:EMA(CLOSE,P3);
  95. MA4:EMA(CLOSE,P4)</Code>
  96. <Description>An exponential moving average (EMA) is calculated by adding a percentage of yesterday's moving average to a percentage of today's closing value. In this way an investor can put more emphasis on more recent data and less weight on past data in the calculation of the moving average.</Description>
  97. <DisabledCycle />
  98. <FullName>Exponential Moving Averages</FullName>
  99. <Params>
  100. <FormulaParam DefaultValue="5" Description="" MaxValue="300" MinValue="1" Name="P1" ParamType="double" />
  101. <FormulaParam DefaultValue="10" Description="" MaxValue="300" MinValue="1" Name="P2" ParamType="double" />
  102. <FormulaParam DefaultValue="20" Description="" MaxValue="300" MinValue="1" Name="P3" ParamType="double" />
  103. <FormulaParam DefaultValue="60" Description="" MaxValue="300" MinValue="1" Name="P4" ParamType="double" />
  104. </Params>
  105. </Program>
  106. <Program IsMainView="false" Name="MA4">
  107. <Code>MA1:MA(CLOSE,P1);
  108. MA2:MA(CLOSE,P2);
  109. MA3:MA(CLOSE,P3);
  110. MA4:MA(CLOSE,P4);</Code>
  111. <Description>Moving averages are used to help identify the trend of prices. By creating an average of prices, that "moves" with the addition of new data, the price action on the security being analyzed is "smoothed". In other words, by calculating the average value of a underlying security or indicator, day to day fluctuations are reduced in importance and what remains is a stronger indication of the trend of prices over the period being analyzed.</Description>
  112. <DisabledCycle />
  113. <FullName>Moving Averages</FullName>
  114. <Params>
  115. <FormulaParam DefaultValue="5" Description="" MaxValue="300" MinValue="0" Name="P1" ParamType="double" />
  116. <FormulaParam DefaultValue="10" Description="" MaxValue="300" MinValue="0" Name="P2" ParamType="double" />
  117. <FormulaParam DefaultValue="20" Description="" MaxValue="300" MinValue="0" Name="P3" ParamType="double" />
  118. <FormulaParam DefaultValue="30" Description="" MaxValue="300" MinValue="0" Name="P4" ParamType="double" />
  119. </Params>
  120. </Program>
  121. <Program IsMainView="false" Name="MACD">
  122. <Code>DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
  123. DEA : EMA(DIFF,M);
  124. MACD : 2*(DIFF-DEA), COLORSTICK;
  125. </Code>
  126. <Description>The Moving Average Convergence/Divergence indicator (MACD) is calculated by subtracting the value of a 26-period exponential moving average from a 12-period exponential moving average (EMA). A 9-period dotted exponential moving average (the "signal line") of the difference between the 26 and 12 period EMA is used as the signal line.
  127. The basic MACD trading rule is to sell when the MACD falls below its 9 day signal line and to buy when the MACD rises above the 9 day signal line. Traders sometimes vary the calculation period of the signal line and may use different moving average lengths in calculating the MACD dependent on the security and trading strategy.</Description>
  128. <DisabledCycle />
  129. <FullName>Moving Average Convergence Divergence</FullName>
  130. <Params>
  131. <FormulaParam DefaultValue="26" Description="" MaxValue="100" MinValue="20" Name="LONG" ParamType="double" />
  132. <FormulaParam DefaultValue="12" Description="" MaxValue="40" MinValue="5" Name="SHORT" ParamType="double" />
  133. <FormulaParam DefaultValue="9" Description="" MaxValue="60" MinValue="2" Name="M" ParamType="double" />
  134. </Params>
  135. </Program>
  136. <Program IsMainView="false" Name="MTM">
  137. <Code>MTM : CLOSE-REF(CLOSE,N);
  138. MTMMA : MA(MTM,N1)</Code>
  139. <Description>The Momentum is simply the difference between the current point (price or something else) and the point N periods ago.
  140. Usage:
  141. The rising line signals that the uptrend is getting stronger, the horizontal line at zero level means there is no trend, and falling line means the downtrend is getting stronger.
  142. The momentum can be used for identifying trends, overbought/oversold conditions and divergences.
  143. </Description>
  144. <DisabledCycle />
  145. <FullName>Momentum</FullName>
  146. <Params>
  147. <FormulaParam DefaultValue="6" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  148. <FormulaParam DefaultValue="6" Description="" MaxValue="100" MinValue="1" Name="N1" ParamType="double" />
  149. </Params>
  150. </Program>
  151. <Program IsMainView="false" Name="PPO">
  152. <Code>PPO:(EMA(CLOSE,SHORT)-EMA(CLOSE,LONG))/EMA(CLOSE,LONG)*100;
  153. EMA(PPO,N);</Code>
  154. <Description>An indicator which attempts to assess the momentum of price activity by the use of two or more moving averages, for a predefined time frame period.</Description>
  155. <DisabledCycle />
  156. <FullName>Price Oscillator</FullName>
  157. <Params>
  158. <FormulaParam DefaultValue="26" Description="" MaxValue="100" MinValue="5" Name="LONG" ParamType="double" />
  159. <FormulaParam DefaultValue="12" Description="" MaxValue="40" MinValue="2" Name="SHORT" ParamType="double" />
  160. <FormulaParam DefaultValue="9" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  161. </Params>
  162. </Program>
  163. <Program IsMainView="true" Name="SAR">
  164. <Code>SAR(N,STEP,MAXP),CIRCLEDOT</Code>
  165. <Description>Parabolic Stop and Release was introduced by J Welles Wilder. The Parabolic SAR is a trend following indicator that is designed to create a trailing stop. This is a point that follows a prevailing trend, giving a possible value for a stop loss order that is far enough away from the original trend to avoid being stopped out with a small consolidation and retraction moves. The trailing stop moves with the trend, accelerating closer to price action as time passes giving the path of the indicator a parabolic look. When price penetrates the SAR a new calculation is started taking the other side of the market with an initial setting that again allows a certain amount of initial volatility if the trend is slow to get underway.</Description>
  166. <DisabledCycle />
  167. <FullName>Stop and Reverse</FullName>
  168. <Params>
  169. <FormulaParam DefaultValue="10" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  170. <FormulaParam DefaultValue="2" Description="" MaxValue="100" MinValue="1" Name="STEP" ParamType="double" />
  171. <FormulaParam DefaultValue="20" Description="" MaxValue="100" MinValue="5" Name="MAXP" ParamType="double" />
  172. </Params>
  173. </Program>
  174. <Program IsMainView="false" Name="TRIX">
  175. <Code>TR:= EMA(EMA(EMA(CLOSE,N),N),N);
  176. TRIX : (TR-REF(TR,1))/REF(TR,1)*100;
  177. TRMA : MA(TRIX,M);
  178. </Code>
  179. <Description>TRIX is a momentum indicator that displays the percent rate-of-change of a triple exponentially smoothed moving average of the security's closing price. It is designed to keep you in trends equal to or shorter than the number of periods you specify.
  180. </Description>
  181. <DisabledCycle />
  182. <FullName />
  183. <Params>
  184. <FormulaParam DefaultValue="12" Description="" MaxValue="100" MinValue="3" Name="N" ParamType="double" />
  185. <FormulaParam DefaultValue="20" Description="" MaxValue="100" MinValue="1" Name="M" ParamType="double" />
  186. </Params>
  187. </Program>
  188. <Program IsMainView="false" Name="VMACD">
  189. <Code>DIFF : EMA(VOL,SHORT) - EMA(VOL,LONG);
  190. DEA : EMA(DIFF,M);
  191. MACD : DIFF-DEA, ff,COLORSTICK</Code>
  192. <Description />
  193. <DisabledCycle />
  194. <FullName>Volumn Moving Average Convergence Divergence</FullName>
  195. <Params>
  196. <FormulaParam DefaultValue="12" Description="" MaxValue="50" MinValue="1" Name="SHORT" ParamType="double" />
  197. <FormulaParam DefaultValue="26" Description="" MaxValue="100" MinValue="20" Name="LONG" ParamType="double" />
  198. <FormulaParam DefaultValue="9" Description="" MaxValue="50" MinValue="30" Name="M" ParamType="double" />
  199. </Params>
  200. </Program>
  201. <Program IsMainView="false" Name="ZIG">
  202. <Code>ZIG(PER),Width2</Code>
  203. <Description>Zig Zag is trend following indicator that helps define what the trend has been, and can be used as a significance test to help determine when changes in the current price might indicate when the trend of price might be changing. The zig zag indicators filters out changes in a data item that are less than a specific amount that you define. Below is a chart of National Semiconductor. If you bought every time the zig zag moved up and sold every time the zig zag moved down, every trade would be a winner.
  204. </Description>
  205. <DisabledCycle />
  206. <FullName>Zig Zag</FullName>
  207. <Params>
  208. <FormulaParam DefaultValue="10" Description="" MaxValue="60" MinValue="1" Name="PER" ParamType="double" />
  209. </Params>
  210. </Program>
  211. <Program IsMainView="false" Name="ADX">
  212. <Code>TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N);
  213. HD := HIGH-REF(HIGH,1);
  214. LD := REF(LOW,1)-LOW;
  215. DMP:= SUM(IF(HD&gt;0 &amp; HD&gt;LD,HD,0),N);
  216. DMM:= SUM(IF(LD&gt;0 &amp; LD&gt;HD,LD,0),N);
  217. PDI: DMP*100/TR;
  218. @SetName(PDI,'+DI');
  219. MDI: DMM*100/TR;
  220. @SetName(MDI,'-DI');
  221. ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,N),Width2;
  222. </Code>
  223. <Description>J. Welles Wilder Jr. developed the Average Directional Index (ADX) in order to evaluate the strength of the current trend, be it up or down. It's important to detemine whether the market is trending or trading (moving sideways), because certain indicators give more useful results depending on the market doing one or the other.
  224. </Description>
  225. <DisabledCycle />
  226. <FullName>Average Directional Index</FullName>
  227. <Params>
  228. <FormulaParam DefaultValue="14" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  229. </Params>
  230. </Program>
  231. <Program IsMainView="false" Name="PERF">
  232. <Code>(C-C.First)/C.First*100</Code>
  233. <Description />
  234. <DisabledCycle />
  235. <FullName>Performance</FullName>
  236. <Params />
  237. </Program>
  238. <Program IsMainView="false" Name="KDJ">
  239. <Code>
  240. RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
  241. K:SMA(RSV,M1,1),COLOR#ffffff;
  242. D:SMA(K,M2,1),COLOR#ffd700;
  243. J:3*K-2*D,COLOR#8b00ff;
  244. </Code>
  245. <Description>
  246. </Description>
  247. <DisabledCycle />
  248. <FullName>KDJ</FullName>
  249. <Params>
  250. <FormulaParam DefaultValue="9" Description="" MaxValue="100" MinValue="2" Name="N" ParamType="double" />
  251. <FormulaParam DefaultValue="3" Description="" MaxValue="30" MinValue="2" Name="M1" ParamType="double" />
  252. <FormulaParam DefaultValue="3" Description="" MaxValue="30" MinValue="2" Name="M2" ParamType="double" />
  253. </Params>
  254. </Program>
  255. </Programs>
  256. </Namespace>
  257. <Namespace Name="Momentum Indicators" Version="">
  258. <Description />
  259. <GroupOnly>true</GroupOnly>
  260. <Namespaces />
  261. <Programs>
  262. <Program IsMainView="false" Name="B3612">
  263. <Code>B36 : MA(CLOSE,3)-MA(CLOSE,6);
  264. B612 : MA(CLOSE,6)-MA(CLOSE,12)</Code>
  265. <Description />
  266. <DisabledCycle />
  267. <FullName>Bias3-Bias6 and Bias6-Bias12</FullName>
  268. <Params />
  269. </Program>
  270. <Program IsMainView="false" Name="BIAS">
  271. <Code>BIAS1 : (CLOSE-MA(CLOSE,L1))/MA(CLOSE,L1)*100;
  272. BIAS2 : (CLOSE-MA(CLOSE,L2))/MA(CLOSE,L2)*100;
  273. BIAS3 : (CLOSE-MA(CLOSE,L3))/MA(CLOSE,L3)*100;</Code>
  274. <Description>Show the distance of close and moving average.</Description>
  275. <DisabledCycle />
  276. <FullName>BIAS</FullName>
  277. <Params>
  278. <FormulaParam DefaultValue="6" Description="" MaxValue="300" MinValue="1" Name="L1" ParamType="double" />
  279. <FormulaParam DefaultValue="12" Description="" MaxValue="300" MinValue="1" Name="L2" ParamType="double" />
  280. <FormulaParam DefaultValue="24" Description="" MaxValue="300" MinValue="1" Name="L3" ParamType="double" />
  281. </Params>
  282. </Program>
  283. <Program IsMainView="false" Name="CCI">
  284. <Code>TYP := (HIGH + LOW + CLOSE)/3;
  285. (TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N))</Code>
  286. <Description>The Commodity Channel Index measures the position of price in relation to its moving average. This can be used to highlight when the market is overbought/oversold or to signal when a trend is weakening. The indicator is similar in concept to Bollinger Bands but is presented as an indicator line rather than as overbought/oversold levels.
  287. The Commodity Channel Index was developed by Donald Lambert and is outlined in his book Commodities Channel Index: Tools for Trading Cyclic Trends.
  288. </Description>
  289. <DisabledCycle />
  290. <FullName>Commodity Channel Index</FullName>
  291. <Params>
  292. <FormulaParam DefaultValue="14" Description="" MaxValue="100" MinValue="2" Name="N" ParamType="double" />
  293. </Params>
  294. </Program>
  295. <Program IsMainView="false" Name="DBCD">
  296. <Code>BIAS:=(C-MA(C,N))/MA(C,N);
  297. DIF:=(BIAS-REF(BIAS,M));
  298. DBCD:SMA(DIF,T,1);
  299. MM:MA(DBCD,5)
  300. </Code>
  301. <Description />
  302. <DisabledCycle />
  303. <FullName>Bias Convergence Divergence</FullName>
  304. <Params>
  305. <FormulaParam DefaultValue="5" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  306. <FormulaParam DefaultValue="16" Description="" MaxValue="100" MinValue="1" Name="M" ParamType="double" />
  307. <FormulaParam DefaultValue="76" Description="" MaxValue="100" MinValue="1" Name="T" ParamType="double" />
  308. </Params>
  309. </Program>
  310. <Program IsMainView="false" Name="DPO">
  311. <Code>C - REF(MA(CLOSE,20),11)</Code>
  312. <Description>Detrended Price Oscillator compares closing price to a prior moving average, eliminating cycles longer than the moving average.
  313. The real power of the Detrended Price Oscillator is in identifying turning points in longer cycles:
  314. When Detrended Price Oscillator shows a higher trough - expect an upturn in the intermediate cycle;
  315. When Detrended Price Oscillator experiences a lower peak - expect a downturn.
  316. </Description>
  317. <DisabledCycle />
  318. <FullName>Detrended Price Oscillator</FullName>
  319. <Params />
  320. </Program>
  321. <Program IsMainView="false" Name="FastSTO">
  322. <Code>K:(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
  323. D:MA(K,M);</Code>
  324. <Description>The Stochastic Oscillator is a measure of the relative momentum of current prices to previous closing prices within a given interval. When it is plotted, it is two lines that move within a range of 0 and 100. Values above 80 are considered to be in overbought territory giving an indication that a reversal in price is possible. Values below 20 are considered oversold and again are an indication that a reversal of the price trend is a higher risk. In a strong trending environment, the Stochastic Oscillator can stay in overbought or oversold territory for some time while price continues in a single direction. In relation to a longer term price trend environment, the stochastic provides little interest. In its construction it is meant to relate the current periods momentum to the most recent previous periods of momentum in price in an attempt to identify periods where momentum may be easing or increasing. The easing (at a top) or increase (at a bottom) of momentum occurs at reversal points for the price trend being measured. However changing momentum also occurs during times when there is no change in the overall trend in prices and should be understood as a period when a reversal in price trend is possible but not guaranteed.</Description>
  325. <DisabledCycle />
  326. <FullName>Fast Stochastic</FullName>
  327. <Params>
  328. <FormulaParam DefaultValue="14" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  329. <FormulaParam DefaultValue="3" Description="" MaxValue="40" MinValue="2" Name="M" ParamType="double" />
  330. </Params>
  331. </Program>
  332. <Program IsMainView="false" Name="LWR">
  333. <Code>RSV:= (HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N))*100;
  334. LWR1:SMA(RSV,M1,1);
  335. LWR2:SMA(LWR1,M2,1)
  336. </Code>
  337. <Description>100-Stochastic</Description>
  338. <DisabledCycle />
  339. <FullName />
  340. <Params>
  341. <FormulaParam DefaultValue="9" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  342. <FormulaParam DefaultValue="3" Description="" MaxValue="40" MinValue="2" Name="M1" ParamType="double" />
  343. <FormulaParam DefaultValue="3" Description="" MaxValue="40" MinValue="2" Name="M2" ParamType="double" />
  344. </Params>
  345. </Program>
  346. <Program IsMainView="false" Name="ROC">
  347. <Code>ROC:(CLOSE-REF(CLOSE,N))/REF(CLOSE,N)*100;
  348. ROCMA:MA(ROC,M)
  349. </Code>
  350. <Description>ROC is a refinement of Momentum - readings fluctuate as percentages around the zero line. Further details are given at Construction.
  351. The indicator is designed for use in ranging markets - to detect trend weakness and likely reversal points. However, when combined with a trend indicator, it can be used in trending markets.
  352. Ranging Markets
  353. First, you will need to set overbought and oversold levels based on your observation of past ranging markets. The levels should cut across at least two-thirds of the peaks and troughs.
  354. Go long when ROC crosses to below the oversold level and then rises back above it.
  355. Go long on bullish divergences - where the first trough is below the oversold level.
  356. Go short when ROC crosses to above the overbought level and then falls back below it.
  357. Go short on a bearish divergence - with the first peak above the overbought level.
  358. </Description>
  359. <DisabledCycle />
  360. <FullName>Price Rate-of-Change</FullName>
  361. <Params>
  362. <FormulaParam DefaultValue="12" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  363. <FormulaParam DefaultValue="6" Description="" MaxValue="50" MinValue="1" Name="M" ParamType="double" />
  364. </Params>
  365. </Program>
  366. <Program IsMainView="false" Name="RSI">
  367. <Code>LC := REF(CLOSE,1);
  368. RSI:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
  369. </Code>
  370. <Description>The Relative Strength Index was introduced by Welles Wilder. It is an indicator for overbought / oversold conditions. It is going up when the market is strong, and down, when the market is weak. The oscillation range is between 0 and 100.
  371. The indicator is non-linear, it is moving faster in the middle of its range, and slower - in the overbought / oversold territory.
  372. The RSI should not be confused with the relative strength indicator which is used to compare stocks to each other.
  373. </Description>
  374. <DisabledCycle />
  375. <FullName>Relative Strength Index</FullName>
  376. <Params>
  377. <FormulaParam DefaultValue="14" Description="" MaxValue="100" MinValue="2" Name="N1" ParamType="double" />
  378. </Params>
  379. </Program>
  380. <Program IsMainView="false" Name="SI">
  381. <Code>LC:=REF(C,1);
  382. AA:=ABS(H-LC);
  383. BB:=ABS(L-LC);
  384. CC:=ABS(H-REF(L,1));
  385. DD:=ABS(LC-REF(O,1));
  386. R:=IF(AA&gt;BB &amp; AA&gt;CC,AA+BB/2+DD/4,IF(BB&gt;CC &amp; BB&gt;AA,BB+AA/2+DD/4,CC+DD/4));
  387. X:=(C-LC+(C-O)/2+LC-REF(O,1));
  388. SI:16*X/R*MAX(AA,BB)</Code>
  389. <Description>Swing Index
  390. </Description>
  391. <DisabledCycle />
  392. <FullName />
  393. <Params />
  394. </Program>
  395. <Program IsMainView="false" Name="SlowSTO">
  396. <Code>A:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
  397. K:MA(A,M1);
  398. D:MA(K,M2)
  399. </Code>
  400. <Description>The Slow Stochastic applies further smoothing to the Stochastic oscillator, to reduce volatility and improve signal accuracy.</Description>
  401. <DisabledCycle />
  402. <FullName>Slow Stochastic</FullName>
  403. <Params>
  404. <FormulaParam DefaultValue="14" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  405. <FormulaParam DefaultValue="3" Description="" MaxValue="50" MinValue="2" Name="M1" ParamType="double" />
  406. <FormulaParam DefaultValue="3" Description="" MaxValue="50" MinValue="2" Name="M2" ParamType="double" />
  407. </Params>
  408. </Program>
  409. <Program IsMainView="false" Name="SRDM">
  410. <Code>DMZ:=IF((H+L)&lt;=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1))));
  411. DMF:=IF((H+L)&gt;=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1))));
  412. ADMZ:=MA(DMZ,10);
  413. ADMF:=MA(DMF,10);
  414. SRDM:IF(ADMZ&gt;ADMF,(ADMZ-ADMF)/ADMZ,IF(ADMZ=ADMF,0,(ADMZ-ADMF)/ADMF));
  415. ASRDM:SMA(SRDM,N,1);</Code>
  416. <Description />
  417. <DisabledCycle />
  418. <FullName>SRDM</FullName>
  419. <Params>
  420. <FormulaParam DefaultValue="30" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  421. </Params>
  422. </Program>
  423. <Program IsMainView="false" Name="VROC">
  424. <Code>(VOL-REF(VOL,N))/REF(VOL,N)*100</Code>
  425. <Description>Rate of Change Volume (ROCV) is an oscillator applied to volume rather than price and is calculated in the same manner as the Rate of Change (Price) indicator.
  426. ROCV highlights increases in volume, which normally occur at most significant market tops, bottoms and breakouts.
  427. </Description>
  428. <DisabledCycle />
  429. <FullName>Rate of Change (Volume)</FullName>
  430. <Params>
  431. <FormulaParam DefaultValue="12" Description="" MaxValue="300" MinValue="2" Name="N" ParamType="double" />
  432. </Params>
  433. </Program>
  434. <Program IsMainView="false" Name="VRSI">
  435. <Code>SMA(MAX(VOL-REF(VOL,1),0),N,1)/SMA(ABS(VOL-REF(VOL,1)),N,1)*100</Code>
  436. <Description>Volumn RSI</Description>
  437. <DisabledCycle />
  438. <FullName>Volumn Relative Strength Index</FullName>
  439. <Params>
  440. <FormulaParam DefaultValue="6" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  441. </Params>
  442. </Program>
  443. <Program IsMainView="false" Name="WR">
  444. <Code>-100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N))</Code>
  445. <Description>The The Williams %R indicator was introduced by Larry Williams. It is working by identifying the overbought / oversold levels. The scale extends from 0 to -100.
  446. Usage
  447. The overbought level is considered 0 to -20, and oversold -70 to -100.
  448. As a confirmation signal, we can wait for the indicator to cross the -50 line.
  449. </Description>
  450. <DisabledCycle />
  451. <FullName>Williams %R</FullName>
  452. <Params>
  453. <FormulaParam DefaultValue="14" Description="" MaxValue="100" MinValue="2" Name="N" ParamType="double" />
  454. </Params>
  455. </Program>
  456. <Program IsMainView="false" Name="SO">
  457. <Code>K :=(C-L)/(H-L);
  458. SK : SMA(K,N1,1);
  459. SD : SMA(SK,N2,1);</Code>
  460. <Description>The Stochastic Oscillator was introduced by George C. Lane. The indicator provides information about the location of a current close in relation to the period's high and low. The closer the close is to the period's high, the higher is the buying pressure, and the closer the close is to the period's low, the more selling pressure is.
  461. Usage:
  462. The indicator is considered bullish, when above 80, and bearish, when below 20. As this definition does not provide any insights on when to buy or sell, consider generating signals when the indicator moves from the overbought / oversold territory back.
  463. The crossings between the %K and its moving average can be used for the same purpose.
  464. Finally, the divergence can be considered a very strong signal. When the divergence develops when the indicator is moving from the overbought / oversold levels, it is a sell / buy signal.
  465. Additionally, the K39 (unsmoothed 39 period stochastic oscillator) was reported to generate good results when tested on paper. A buy signal is generated when K crosses above 50% and the close price is above the previous week's highest close. Sell signals are generated when K crosses below 50% and the close is below the previous week's lowest close.
  466. An additional confirmation can be provided by some indicators from the different group, for example, the On Balance Volume (OBV) indicator.
  467. The most value of a stochastics is when the strong trend is present. According to Lane, the safest way to trade is to buy when the trend is up, and to sell with the downtrend.
  468. </Description>
  469. <DisabledCycle />
  470. <FullName>Stochastic Oscillator</FullName>
  471. <Params>
  472. <FormulaParam DefaultValue="3" Description="" MaxValue="10" MinValue="1" Name="N1" ParamType="double" />
  473. <FormulaParam DefaultValue="3" Description="" MaxValue="10" MinValue="1" Name="N2" ParamType="double" />
  474. </Params>
  475. </Program>
  476. <Program IsMainView="false" Name="MFI">
  477. <Code>TP :=(High + Low + Close) / 3;
  478. LTP := REF(TP,1);
  479. MF :=TP*V;
  480. PMF := IF(TP&gt;LTP,MF,0);
  481. NMF := IF(TP&lt;=LTP,MF,0);
  482. MR :=MA(PMF,N)/MA(NMF,N);
  483. MFI :100-(100/(1+MR));
  484. 20,Color#808080,NoValueLabel;
  485. 80,Color#808080,NoValueLabel;
  486. FillRGN(MFI&gt;80,MFI,80),Brush#20808000;
  487. FillRGN(MFI&lt;20,MFI,20),Brush#20800000;
  488. @SetHLine(20,50,80,100);
  489. @SetYMinMax(0,100)</Code>
  490. <Description />
  491. <DisabledCycle />
  492. <FullName>Money Flow</FullName>
  493. <Params>
  494. <FormulaParam DefaultValue="14" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  495. </Params>
  496. </Program>
  497. <Program IsMainView="false" Name="StochRSI">
  498. <Code>LC := REF(CLOSE,1);
  499. RSI:=SMA(MAX(CLOSE-LC,0),N,1)/SMA(ABS(CLOSE-LC),N,1)*100;
  500. (RSI-LLV(RSI,N))/(HHV(RSI,N)-LLV(RSI,N));</Code>
  501. <Description>Developed by Tushard Chande and Stanley Kroll, StochRSI is an oscillator that measures the level of RSI relative to its range, over a set period of time. The indicator uses RSI as the foundation and applies to it the formula behind Stochastics. The result is an oscillator that fluctuates between 0 and 1.</Description>
  502. <DisabledCycle />
  503. <FullName>StochRSI</FullName>
  504. <Params>
  505. <FormulaParam DefaultValue="14" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  506. </Params>
  507. </Program>
  508. <Program IsMainView="false" Name="EOM">
  509. <Code>MP:=(H+L)/2;
  510. MM :=MP-REF(MP,1);
  511. BR :=V/(H-L)/1000000;
  512. EOM : MM/BR;
  513. MA(EOM,N);</Code>
  514. <Description />
  515. <DisabledCycle />
  516. <FullName>Ease of Movement</FullName>
  517. <Params>
  518. <FormulaParam DefaultValue="14" Description="" MaxValue="1000" MinValue="1" Name="N" ParamType="double" />
  519. </Params>
  520. </Program>
  521. </Programs>
  522. </Namespace>
  523. <Namespace Name="Volatility Indicators" Version="">
  524. <Description />
  525. <GroupOnly>true</GroupOnly>
  526. <Namespaces />
  527. <Programs>
  528. <Program IsMainView="false" Name="PSY">
  529. <Code>COUNT(CLOSE&gt;REF(CLOSE,1),N)/N*100</Code>
  530. <Description>people resist paying more for a stock than others unless the stock continues to move up. People resist selling a stock for less than the price others have been getting for it unless the price continues to decline. People who purchase the stock at the top of a trading range have a strong inclination to wait until the price comes back before they get out.
  531. </Description>
  532. <DisabledCycle />
  533. <FullName>Psychogical line</FullName>
  534. <Params>
  535. <FormulaParam DefaultValue="12" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  536. </Params>
  537. </Program>
  538. <Program IsMainView="false" Name="VR">
  539. <Code>LC:=REF(CLOSE,1);
  540. SUM(IF(CLOSE&gt;LC,VOL,0),N)/
  541. SUM(IF(CLOSE&lt;=LC,VOL,0),N)*100
  542. </Code>
  543. <Description>This ratio is derived from the Volatility Ratio introduced by Jack Schwager in Technical Analysis to identify wide-ranging days.
  544. Designed to highlight breakouts from a trading range, this VR compared to true range for the indicator period.</Description>
  545. <DisabledCycle />
  546. <FullName>Volatility Ratio</FullName>
  547. <Params>
  548. <FormulaParam DefaultValue="26" Description="" MaxValue="300" MinValue="5" Name="N" ParamType="double" />
  549. </Params>
  550. </Program>
  551. <Program IsMainView="false" Name="ATR">
  552. <Code>LC :=REF(CLOSE,1);
  553. TR := MAX(HIGH-LOW,ABS(LC-HIGH),ABS(LC-LOW));
  554. ATR : SMA(TR,N,1)</Code>
  555. <Description>The Average True Range indicator was created by J. Welles Wilder. Its primary use is for determining the volatility of the security. The idea is to replace the high - low interval for the given period, as the high-low does not take into consideration gaps and limit moves.</Description>
  556. <DisabledCycle />
  557. <FullName>Average True Range</FullName>
  558. <Params>
  559. <FormulaParam DefaultValue="10" Description="" MaxValue="300" MinValue="1" Name="N" ParamType="double" />
  560. </Params>
  561. </Program>
  562. <Program IsMainView="false" Name="VOLATI">
  563. <Code>EC := EMA(HIGH-LOW,N);
  564. (EC-REF(EC,N))/REF(EC,N)*100</Code>
  565. <Description>Marc Chaikin measures volatility as the trading range between high and low for each period. This does not take trading gaps into account as Average True Range does.</Description>
  566. <DisabledCycle />
  567. <FullName>Chaikin's Volatility</FullName>
  568. <Params>
  569. <FormulaParam DefaultValue="10" Description="" MaxValue="100" MinValue="2" Name="N" ParamType="double" />
  570. </Params>
  571. </Program>
  572. <Program IsMainView="false" Name="Aroon">
  573. <Code>Up:(N-HHVBARS(C,N))/N*100;
  574. Down:(N-LLVBARS(C,N))/N*100;</Code>
  575. <Description>The Aroon indicator system consists of two lines, 'Aroon(up)' and 'Aroon(down)'. It takes a single parameter which is the number of time periods to use in the calculation. Aroon(up) is the amount of time (on a percentage basis) that has elapsed between the start of the time period and the point at which the highest price during that time period occurred. If the stock closes at a new high for the given period, Aroon(up) will be +100. For each subsequent period that passes without another new high, Aroon(up) moves down by an amount equal to (1 / # of periods) x 100.</Description>
  576. <DisabledCycle />
  577. <FullName>Aroon</FullName>
  578. <Params>
  579. <FormulaParam DefaultValue="25" Description="" MaxValue="1000" MinValue="0" Name="N" ParamType="double" />
  580. </Params>
  581. </Program>
  582. <Program IsMainView="false" Name="HV">
  583. <Code>LogS :=Log(C/Ref(C,1));
  584. TLogs :=Sum(LogS,N);
  585. ALogs :=TLogs/N;
  586. Delta :=LogS-ALogs;
  587. SSD :=Sum(Delta*Delta,N);
  588. HV : Sqrt(SSD/(N-1))*Sqrt(T)</Code>
  589. <Description />
  590. <DisabledCycle />
  591. <FullName>Historic Volatility</FullName>
  592. <Params>
  593. <FormulaParam DefaultValue="21" Description="" MaxValue="10000" MinValue="1" Name="N" ParamType="double" />
  594. <FormulaParam DefaultValue="252" Description="" MaxValue="1000000000" MinValue="0" Name="T" ParamType="double" />
  595. </Params>
  596. </Program>
  597. </Programs>
  598. </Namespace>
  599. <Namespace Name="Price Volumn Indicators" Version="">
  600. <Description />
  601. <GroupOnly>true</GroupOnly>
  602. <Namespaces />
  603. <Programs>
  604. <Program IsMainView="false" Name="ASI">
  605. <Code>LC:=REF(CLOSE,1);
  606. AA:=ABS(HIGH-LC);
  607. BB:=ABS(LOW-LC);
  608. CC:=ABS(HIGH-REF(LOW,1));
  609. DD:=ABS(LC-REF(OPEN,1));
  610. R:=IF(AA&gt;BB &amp; AA&gt;CC,AA+BB/2+DD/4,IF(BB&gt;CC &amp; BB&gt;AA,BB+AA/2+DD/4,CC+DD/4));
  611. X:=(CLOSE-LC+(CLOSE-OPEN)/2+LC-REF(OPEN,1));
  612. SI:=16*X/R*MAX(AA,BB);
  613. ASI:SUM(SI,0)</Code>
  614. <Description>The Accumulation Swing Index (ASI) is a cumulative sum of the Welles Wilder’s Swing Index indicator</Description>
  615. <DisabledCycle />
  616. <FullName>Accumulation Swing Index</FullName>
  617. <Params />
  618. </Program>
  619. <Program IsMainView="false" Name="OBV">
  620. <Code>OBV:SUM(IF(CLOSE&gt;REF(CLOSE,1),VOL,IF(CLOSE&lt;REF(CLOSE,1),-VOL,0)),0),Width2;
  621. M:MA(OBV,N);
  622. </Code>
  623. <Description>Volume is the number of shares or contracts that change ownership over a given period of time. It is an indication of supply and demand that is independent from price and can relate a great deal about the relative enthusiasm of buyers and sellers in the market place. On Balance Volume is one indicator that is designed to track changes in volume over time. It is the running total of volume calculated in such a way as to add the day's volume to a cumulative total if the day's close was higher than the previous day's close and to subtract the day's volume from the cumulative total on down days. The assumption is that changes in volume will precede changes in price trend. On Balance Volume was created by Joseph Granville and has a number of interpretive qualities and should be used in conjunction with other indications of price trend reversals.
  624. Another use of On Balance Volume (OBV) is to look at the trend in the indicator. A rising trend in the OBV gives sign of a healthy move into the security. A doubtful trend, or sideways trend in the OBV leaves price trend suspect and a candidate for a reversal of the trend. A falling OBV trend signals an exodus from the security despite price activity and leads to the caution that price may follow if it is not already. As indicated on the graphs above, look for divergences between the price and the OBV indicator. Divergences between the peaks warns of a potential fall in prices. Divergences between the troughs warns of a potential rise in prices.</Description>
  625. <DisabledCycle />
  626. <FullName>On Balance Volume</FullName>
  627. <Params>
  628. <FormulaParam DefaultValue="20" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  629. </Params>
  630. </Program>
  631. <Program IsMainView="false" Name="PVT">
  632. <Code>SUM((CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*VOL,0)</Code>
  633. <Description>Price and Volume Trend (PVT) is a variation of On Balance Volume, used to determine the strength of trends and warn of reversals.
  634. PVT = yesterday's PVT + today's Volume * (today's Close - yesterday's Close) / yesterday's Close
  635. </Description>
  636. <DisabledCycle />
  637. <FullName>PRICE AND VOLUME TREND</FullName>
  638. <Params />
  639. </Program>
  640. <Program IsMainView="false" Name="SOBV">
  641. <Code>SUM(IF(ISUP,VOL,IF(ISDOWN,-VOL,0)),0)</Code>
  642. <Description />
  643. <DisabledCycle />
  644. <FullName>SOBV</FullName>
  645. <Params />
  646. </Program>
  647. <Program IsMainView="false" Name="WVAD">
  648. <Code>WVAD : (CLOSE-OPEN)/(HIGH-LOW)*VOL;
  649. MA1:MA(WVAD,N1);
  650. MA2:MA(WVAD,N2);
  651. </Code>
  652. <Description />
  653. <DisabledCycle />
  654. <FullName>Williams'Variable Accumulation Distribution</FullName>
  655. <Params>
  656. <FormulaParam DefaultValue="10" Description="" MaxValue="100" MinValue="1" Name="N1" ParamType="double" />
  657. <FormulaParam DefaultValue="20" Description="" MaxValue="100" MinValue="1" Name="N2" ParamType="double" />
  658. </Params>
  659. </Program>
  660. <Program IsMainView="false" Name="NVI">
  661. <Code>A:=IF(V&lt;=REF(V,1),C/REF(C,1),1);
  662. NVI:Start*MUL(A);
  663. M1:EMA(NVI,N1);
  664. M2:EMA(NVI,N2);</Code>
  665. <Description>The Negative Volume Index ("NVI") focuses on days where the volume decreases from the previous day. The premise being that the "smart money" takes positions on days when volume decreases.
  666. 1.Take yesterday's Negative Volume Index
  667. 2.If today's volume is lower than yesterday, add:
  668. { ( Close [today] - Close [yesterday] ) / Close [yesterday] } * NVI [yesterday]
  669. 3.Otherwise, add zero.</Description>
  670. <DisabledCycle />
  671. <FullName>Negative Volume Index</FullName>
  672. <Params>
  673. <FormulaParam DefaultValue="1" Description="" MaxValue="1000000000" MinValue="0" Name="Start" ParamType="double" />
  674. <FormulaParam DefaultValue="9" Description="" MaxValue="10000" MinValue="0" Name="N1" ParamType="double" />
  675. <FormulaParam DefaultValue="255" Description="" MaxValue="10000" MinValue="0" Name="N2" ParamType="double" />
  676. </Params>
  677. </Program>
  678. <Program IsMainView="false" Name="PVI">
  679. <Code>A:=IF(V&gt;=REF(V,1),C/REF(C,1),1);
  680. PVI:Start*MUL(A);
  681. M1:MA(PVI,N1);
  682. M2:MA(PVI,N2);</Code>
  683. <Description>1.Take yesterday's Positive Volume Index
  684. 2.If today's volume is greater than yesterday, add:
  685. { ( Close [today] - Close [yesterday] ) / Close [yesterday] } * PVI [yesterday]
  686. 3.Otherwise, add zero</Description>
  687. <DisabledCycle />
  688. <FullName>Positive Volume Index</FullName>
  689. <Params>
  690. <FormulaParam DefaultValue="1" Description="" MaxValue="1000000000" MinValue="0" Name="Start" ParamType="double" />
  691. <FormulaParam DefaultValue="9" Description="" MaxValue="10000" MinValue="0" Name="N1" ParamType="double" />
  692. <FormulaParam DefaultValue="255" Description="" MaxValue="10000" MinValue="0" Name="N2" ParamType="double" />
  693. </Params>
  694. </Program>
  695. </Programs>
  696. </Namespace>
  697. <Namespace Name="Bands Indicators" Version="">
  698. <Description />
  699. <GroupOnly>true</GroupOnly>
  700. <Namespaces />
  701. <Programs>
  702. <Program IsMainView="true" Name="BBIBOLL">
  703. <Code>BBI:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
  704. UPR:BBI+P*STD(BBI,N);
  705. DWN:BBI-P*STD(BBI,N)</Code>
  706. <Description />
  707. <DisabledCycle />
  708. <FullName>BBIBOLL</FullName>
  709. <Params>
  710. <FormulaParam DefaultValue="10" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  711. <FormulaParam DefaultValue="3" Description="" MaxValue="20" MinValue="0.1" Name="P" ParamType="double" />
  712. </Params>
  713. </Program>
  714. <Program IsMainView="true" Name="BB">
  715. <Code>MID : MA(CLOSE,N);
  716. UPPER: MID + P*STD(CLOSE,N);
  717. LOWER: MID - P*STD(CLOSE,N);</Code>
  718. <Description>The Bollinger Bands were introduced by John Bollinger. Its primary use is for presenting the volatility of the security in an easy to view form. The indicator consists of three bands: a simple moving average (middle), SMA plus 2 standard deviations (upper), and SMA minus 2 standard deviations (lower).</Description>
  719. <DisabledCycle />
  720. <FullName>Bollinger Bands</FullName>
  721. <Params>
  722. <FormulaParam DefaultValue="20" Description="" MaxValue="300" MinValue="5" Name="N" ParamType="double" />
  723. <FormulaParam DefaultValue="2" Description="" MaxValue="10" MinValue="0.1" Name="P" ParamType="double" />
  724. </Params>
  725. </Program>
  726. <Program IsMainView="false" Name="CDP">
  727. <Code>PT := REF(HIGH,1)-REF(LOW,1);
  728. CDP : (HIGH + LOW + CLOSE)/3;
  729. AH : CDP + PT;
  730. AL : CDP - PT;
  731. NH : 2*CDP-LOW;
  732. NL : 2*CDP-HIGH</Code>
  733. <Description />
  734. <DisabledCycle />
  735. <FullName>CDP</FullName>
  736. <Params />
  737. </Program>
  738. <Program IsMainView="true" Name="ENV">
  739. <Code>UPPER : MA(CLOSE,N)*1.06;
  740. LOWER : MA(CLOSE,N)*0.94</Code>
  741. <Description>An envelope is comprised of two moving averages. One moving average is shifted upward and the second moving average is shifted downward.
  742. </Description>
  743. <DisabledCycle />
  744. <FullName>ENVELOPES (TRADING BANDS)</FullName>
  745. <Params>
  746. <FormulaParam DefaultValue="14" Description="" MaxValue="300" MinValue="2" Name="N" ParamType="double" />
  747. </Params>
  748. </Program>
  749. <Program IsMainView="true" Name="MIKE">
  750. <Code>TYP:=(HIGH+LOW+CLOSE)/3;
  751. LL:=LLV(LOW,N);
  752. HH:=HHV(HIGH,N);
  753. WR:TYP+(TYP-LL);
  754. MR:TYP+(HH-LL);
  755. SR:2*HH-LL;
  756. WS:TYP-(HH-TYP);
  757. MS:TYP-(HH-LL);
  758. SS:2*LL-HH</Code>
  759. <Description />
  760. <DisabledCycle />
  761. <FullName>MIKE</FullName>
  762. <Params>
  763. <FormulaParam DefaultValue="12" Description="" MaxValue="200" MinValue="1" Name="N" ParamType="double" />
  764. </Params>
  765. </Program>
  766. <Program IsMainView="true" Name="SR">
  767. <Code>M :=(H+L+C)/3;
  768. A :=H-L;
  769. RR:=M+A;
  770. SS:=M-A;
  771. R:BackSet(IsLastBar,5)*RR.LastData,Width2,HighSpeed,ColorRed;
  772. S:BackSet(IsLastBar,5)*SS.LastData,Width2,HighSpeed,ColorDarkGreen;
  773. DrawNumber(BarsSince(R)==1,R,R,'f2'),Label0,VCenter,Right,ColorRed;
  774. DrawNumber(BarsSince(S)==1,S,S,'f2'),Label0,VCenter,Right,ColorDarkGreen;
  775. </Code>
  776. <Description />
  777. <DisabledCycle />
  778. <FullName>Support &amp; Resistance</FullName>
  779. <Params />
  780. </Program>
  781. <Program IsMainView="false" Name="BBWidth">
  782. <Code>P*STD(C,N)*2,Width1.6,HighQuality</Code>
  783. <Description>The Bollinger Band Width indicator charts the width of the Bollinger Bands. When the Bollinger Band Width increases in value, it indicates that the volatility of the underlying stock has also increased.
  784. </Description>
  785. <DisabledCycle />
  786. <FullName>Bollinger Band Width</FullName>
  787. <Params>
  788. <FormulaParam DefaultValue="20" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  789. <FormulaParam DefaultValue="2" Description="" MaxValue="100" MinValue="0.1" Name="P" ParamType="double" />
  790. </Params>
  791. </Program>
  792. <Program IsMainView="true" Name="Keltner">
  793. <Code>Shift := FACTOR * ATR(Length);
  794. Avg := EMA(C, Length);
  795. Upper : Avg + Shift;
  796. Lower : Avg - Shift</Code>
  797. <Description />
  798. <DisabledCycle />
  799. <FullName>Keltner channel</FullName>
  800. <Params>
  801. <FormulaParam DefaultValue="16" Description="" MaxValue="100" MinValue="1" Name="Length" ParamType="double" />
  802. <FormulaParam DefaultValue="1.3" Description="" MaxValue="100" MinValue="0" Name="Factor" ParamType="double" />
  803. </Params>
  804. </Program>
  805. </Programs>
  806. </Namespace>
  807. <Namespace Name="Index Indicators">
  808. <Description />
  809. <GroupOnly>true</GroupOnly>
  810. <Namespaces />
  811. <Programs>
  812. <Program IsMainView="false" Name="ABI">
  813. <Code>ABS(ADVANCE - DECLINE)</Code>
  814. <Description>The Absolute Breadth Index ("ABI") is a market momentum indicator that was developed by Norman G. Fosback.
  815. The ABI shows how much activity, volatility, and change is taking place on the New York Stock Exchange while ignoring the direction prices are headed.
  816. You can think of the ABI as an "activity index." High readings indicate market activity and change, while low readings indicate lack of change.</Description>
  817. <DisabledCycle />
  818. <FullName>Absolute Breadth Index</FullName>
  819. <Params />
  820. </Program>
  821. <Program IsMainView="false" Name="ADL">
  822. <Code>SUM(ADVANCE-DECLINE,0)</Code>
  823. <Description>The advance and decline line is a cumulative, ongoing sum of the difference between the number of stocks closing higher minus the number of stocks closing lower each day. It can be used as a measure of market strength as it moves higher when the there are more advancing issues than declining issues. It moves lower when there are more declining issues than advancing issues. Plotting the Advance/Decline line allows insight into market strength. At times the major U.S. indices can continue higher while we are seeing a drop in the advance/decline line. This is called a divergence and warns that we may be at the end of an upward movement and sets the stage for a possible reversal of price trend. However such divergences can exist over a long period of time before evidence of price trend reversal occur. It becomes a matter of sound analysis to build as wide a body of evidence as possible in forming an outlook for the future path of prices.</Description>
  824. <DisabledCycle />
  825. <FullName>Advance/Decline line</FullName>
  826. <Params />
  827. </Program>
  828. <Program IsMainView="false" Name="ADR">
  829. <Code>SUM(ADVANCE,N)/SUM(DECLINE,N)</Code>
  830. <Description>The Advance/Decline Ratio ("A/D Ratio") shows the ratio of advancing issues to declining issues. It is calculated by dividing the number of advancing issues by the number of declining issues.
  831. Interpretation
  832. The A/D Ratio is similar to the Advancing-Declining Issues in that it displays market breadth. But, where the Advancing-Declining Issues subtracts the advancing/declining values, the A/D Ratio divides the values. The advantage of the Ratio is that it remains constant regardless of the number of issues that are traded on the New York Stock Exchange (which has steadily increased).
  833. A moving average of the A/D Ratio is often used as an overbought/oversold indicator. The higher the value, the more "excessive" the rally and the more likely a correction. Likewise, low readings imply an oversold market and suggest a technical rally.
  834. Keep in mind, however, that markets that appear to be extremely overbought or oversold may stay that way for some time. When investing using overbought and oversold indicators, it is wise to wait for the prices to confirm your belief that a change is due before placing your trades.
  835. Day-to-day fluctuations of the Advance/Decline Ratio are often eliminated by smoothing the ratio with a moving average
  836. </Description>
  837. <DisabledCycle />
  838. <FullName>ADVANCE/DECLINE RATIO</FullName>
  839. <Params>
  840. <FormulaParam DefaultValue="10" Description="" MaxValue="200" MinValue="1" Name="N" ParamType="double" />
  841. </Params>
  842. </Program>
  843. <Program IsMainView="false" Name="BT">
  844. <Code>MA(ADVANCE/(ADVANCE-DECLINE),N)</Code>
  845. <Description>The Breadth Thrust indicator is a market momentum indicator. It was developed by Dr. Martin Zweig. The Breadth Thrust is calculated by dividing a 10-day exponential moving average of the number of advancing issues, by the number of advancing plus declining issues.
  846. Interpretation
  847. A "Breadth Thrust" occurs when, during a 10-day period, the Breadth Thrust indicator rises from below 40% to above 61.5%. A "Thrust" indicates that the stock market has rapidly changed from an oversold condition to one of strength, but has not yet become overbought.
  848. According to Dr. Zweig, there have only been fourteen Breadth Thrusts since 1945. The average gain following these fourteen Thrusts was 24.6% in an average time-frame of eleven months. Dr. Zweig also points out that most bull markets begin with a Breadth Thrust.</Description>
  849. <DisabledCycle />
  850. <FullName>Breadth Trust</FullName>
  851. <Params>
  852. <FormulaParam DefaultValue="10" Description="" MaxValue="300" MinValue="1" Name="N" ParamType="double" />
  853. </Params>
  854. </Program>
  855. <Program IsMainView="false" Name="CHAIKIN">
  856. <Code>ADL := SUM(ADVANCE-DECLINE,0);
  857. CHA : MA(ADL,SHORT) - MA(ADL,LONG)</Code>
  858. <Description>A cumulative volume indicator attempting to assess the net volume movement on a day or week.</Description>
  859. <DisabledCycle />
  860. <FullName>Chaikin's Accumulation/Distribution Indicator</FullName>
  861. <Params>
  862. <FormulaParam DefaultValue="10" Description="" MaxValue="300" MinValue="5" Name="LONG" ParamType="double" />
  863. <FormulaParam DefaultValue="3" Description="" MaxValue="300" MinValue="1" Name="SHORT" ParamType="double" />
  864. </Params>
  865. </Program>
  866. <Program IsMainView="false" Name="MCO">
  867. <Code>EMA(ADVANCE-DECLINE,N1)/10 - EMA(ADVANCE-DECLINE,N2)/20</Code>
  868. <Description>The McClellan Oscillator can be used as an overbought/oversold indicator. It also has value at predicting short term trend changes when it crosses the zero line. A rising indicator that crosses the zero line from below is a bullish sign. A falling indicator that crosses the zero line from above is a bearish sign.
  869. The McClellan Oscillator is calculated by subtracting a 39 day moving average of advances minus declines, from a 19 day moving average of advances minus declines. Generally it is not considered a forward looking indicator but can tell you a lot about trend.
  870. </Description>
  871. <DisabledCycle />
  872. <FullName>McClellan Oscillator</FullName>
  873. <Params>
  874. <FormulaParam DefaultValue="19" Description="" MaxValue="80" MinValue="10" Name="N1" ParamType="double" />
  875. <FormulaParam DefaultValue="39" Description="" MaxValue="100" MinValue="30" Name="N2" ParamType="double" />
  876. </Params>
  877. </Program>
  878. <Program IsMainView="false" Name="OBOS">
  879. <Code>MA(ADVANCE-DECLINE,N)</Code>
  880. <Description />
  881. <DisabledCycle />
  882. <FullName>Over Buy/Over Sell</FullName>
  883. <Params>
  884. <FormulaParam DefaultValue="10" Description="" MaxValue="100" MinValue="2" Name="N" ParamType="double" />
  885. </Params>
  886. </Program>
  887. <Program IsMainView="false" Name="STIX">
  888. <Code>EMA(ADVANCE/(ADVANCE+DECLINE)*100,N)</Code>
  889. <Description />
  890. <DisabledCycle />
  891. <FullName>STIX</FullName>
  892. <Params>
  893. <FormulaParam DefaultValue="11" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  894. </Params>
  895. </Program>
  896. </Programs>
  897. </Namespace>
  898. <Namespace Name="Volumn Indicators" Version="">
  899. <Description />
  900. <GroupOnly>true</GroupOnly>
  901. <Namespaces />
  902. <Programs>
  903. <Program IsMainView="false" Name="AMOUNT">
  904. <Code>AMOUNT,VOLSTICK;
  905. MA1:MA(AMOUNT,N1);
  906. MA2:MA(AMOUNT,N2)</Code>
  907. <Description>AMOUNT</Description>
  908. <DisabledCycle />
  909. <FullName>AMOUNT</FullName>
  910. <Params>
  911. <FormulaParam DefaultValue="5" Description="" MaxValue="100" MinValue="1" Name="N1" ParamType="double" />
  912. <FormulaParam DefaultValue="20" Description="" MaxValue="100" MinValue="1" Name="N2" ParamType="double" />
  913. </Params>
  914. </Program>
  915. <Program IsMainView="false" Name="VOLMA">
  916. <Code>VV:V,VOLSTICK;
  917. @SetName(VV,'');
  918. MA1:MA(VV,M1);
  919. @SetName(MA1,'MA');
  920. </Code>
  921. <Description>Volumn and moving average</Description>
  922. <DisabledCycle />
  923. <FullName>Volumn</FullName>
  924. <Params>
  925. <FormulaParam DefaultValue="60" Description="" MaxValue="100" MinValue="1" Name="M1" ParamType="double" />
  926. </Params>
  927. </Program>
  928. <Program IsMainView="false" Name="VOSC">
  929. <Code>(MA(VOL,SHORT)-MA(VOL,LONG))/MA(VOL,SHORT)*100</Code>
  930. <Description>The Volume Oscillator (VO) identifies trends in volume using a two moving average system.
  931. The Volume Oscillator measures the difference between a faster and slower moving average (MA).
  932. If the fast MA is above the slow MA the oscillator will be positive.
  933. If the fast MA is below the slow MA then the oscillator will be negative.
  934. The Volume Oscillator will be zero when the two MA's cross.</Description>
  935. <DisabledCycle />
  936. <FullName>Volume Oscillator</FullName>
  937. <Params>
  938. <FormulaParam DefaultValue="12" Description="" MaxValue="50" MinValue="2" Name="SHORT" ParamType="double" />
  939. <FormulaParam DefaultValue="26" Description="" MaxValue="100" MinValue="15" Name="LONG" ParamType="double" />
  940. </Params>
  941. </Program>
  942. <Program IsMainView="false" Name="VSTD">
  943. <Code>STD(VOL,N)</Code>
  944. <Description>Volumn STD</Description>
  945. <DisabledCycle />
  946. <FullName>Volumn STD</FullName>
  947. <Params>
  948. <FormulaParam DefaultValue="10" Description="" MaxValue="1000" MinValue="1" Name="N" ParamType="double" />
  949. </Params>
  950. </Program>
  951. <Program IsMainView="false" Name="PVO">
  952. <Code>E1 :=EMA(V,N1);
  953. PVO : (E1-EMA(V,N2))/E1*100,Width1.6,HighQuality;
  954. M : EMA(PVO,N3);</Code>
  955. <Description>The Percentage Volume Oscillator (PVO) is the percentage difference between two moving averages of volume.</Description>
  956. <DisabledCycle />
  957. <FullName>Percentage Volume Oscillator</FullName>
  958. <Params>
  959. <FormulaParam DefaultValue="12" Description="" MaxValue="100" MinValue="1" Name="N1" ParamType="double" />
  960. <FormulaParam DefaultValue="26" Description="" MaxValue="100" MinValue="1" Name="N2" ParamType="double" />
  961. <FormulaParam DefaultValue="9" Description="" MaxValue="100" MinValue="1" Name="N3" ParamType="double" />
  962. </Params>
  963. </Program>
  964. <Program IsMainView="false" Name="MaxV">
  965. <Code>HHV(V,N)</Code>
  966. <Description />
  967. <DisabledCycle />
  968. <FullName>N day's maximum volume</FullName>
  969. <Params>
  970. <FormulaParam DefaultValue="20" Description="" MaxValue="100000" MinValue="0" Name="N" ParamType="double" />
  971. </Params>
  972. </Program>
  973. <Program IsMainView="false" Name="COLORV">
  974. <Code>STICKLINE(C&gt;REF(C,1),V,0),Brush#FF0000,Color#800000;
  975. STICKLINE(C&lt;=REF(C,1),V,0),Brush#00FF00,Color#008000;</Code>
  976. <Description />
  977. <DisabledCycle />
  978. <FullName>Volume with custom color</FullName>
  979. <Params />
  980. </Program>
  981. </Programs>
  982. </Namespace>
  983. <Namespace Name="Oscillator Indicators">
  984. <Description />
  985. <GroupOnly>true</GroupOnly>
  986. <Namespaces />
  987. <Programs>
  988. <Program IsMainView="false" Name="AD">
  989. <Code>AD:SUM(((CLOSE-LOW)-(HIGH-CLOSE))/(HIGH-LOW)*VOL,0);
  990. M:MA(AD,N);</Code>
  991. <Description>The Accumulation/Distribution is a momentum indicator that associates changes in price and volume. The indicator is based on the premise that the more volume that accompanies a price move, the more significant the price move.
  992. </Description>
  993. <DisabledCycle />
  994. <FullName>Accumulation/Distribution</FullName>
  995. <Params>
  996. <FormulaParam DefaultValue="20" Description="" MaxValue="1000" MinValue="1" Name="N" ParamType="double" />
  997. </Params>
  998. </Program>
  999. <Program IsMainView="false" Name="MI">
  1000. <Code>A:C-REF(C,N);
  1001. MI:SMA(A,N,1);</Code>
  1002. <Description />
  1003. <DisabledCycle />
  1004. <FullName>MI</FullName>
  1005. <Params>
  1006. <FormulaParam DefaultValue="12" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1007. </Params>
  1008. </Program>
  1009. <Program IsMainView="false" Name="MICD">
  1010. <Code>MI:=C-REF(C,1);
  1011. AMI:=SMA(MI,N,1);
  1012. DIF:MA(REF(AMI,1),N1)-MA(REF(AMI,1),N2);
  1013. MICD:SMA(DIF,10,1)</Code>
  1014. <Description />
  1015. <DisabledCycle />
  1016. <FullName>MICD</FullName>
  1017. <Params>
  1018. <FormulaParam DefaultValue="3" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1019. <FormulaParam DefaultValue="10" Description="" MaxValue="100" MinValue="1" Name="N1" ParamType="double" />
  1020. <FormulaParam DefaultValue="20" Description="" MaxValue="100" MinValue="1" Name="N2" ParamType="double" />
  1021. </Params>
  1022. </Program>
  1023. <Program IsMainView="false" Name="RC">
  1024. <Code>RC:=C/REF(C,N);
  1025. ARC:SMA(REF(RC,1),N,1)
  1026. </Code>
  1027. <Description />
  1028. <DisabledCycle />
  1029. <FullName>Rate of Change</FullName>
  1030. <Params>
  1031. <FormulaParam DefaultValue="50" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1032. </Params>
  1033. </Program>
  1034. <Program IsMainView="false" Name="RCCD">
  1035. <Code>RC:=C/REF(C,N);
  1036. ARC:=SMA(REF(RC,1),N,1);
  1037. DIF:MA(REF(ARC,1),N1)-MA(REF(ARC,1),N2);
  1038. RCCD:SMA(DIF,N,1)</Code>
  1039. <Description />
  1040. <DisabledCycle />
  1041. <FullName>Rate of Change Convergence Divergence</FullName>
  1042. <Params>
  1043. <FormulaParam DefaultValue="59" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1044. <FormulaParam DefaultValue="21" Description="" MaxValue="100" MinValue="1" Name="N1" ParamType="double" />
  1045. <FormulaParam DefaultValue="28" Description="" MaxValue="100" MinValue="1" Name="N2" ParamType="double" />
  1046. </Params>
  1047. </Program>
  1048. <Program IsMainView="false" Name="SRMI">
  1049. <Code>IF(C&lt;REF(C,N),(C-REF(C,N))/REF(C,N),IF(C==REF(C,N),0,(C-REF(C,N))/C))</Code>
  1050. <Description />
  1051. <DisabledCycle />
  1052. <FullName>SRMI</FullName>
  1053. <Params>
  1054. <FormulaParam DefaultValue="9" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1055. </Params>
  1056. </Program>
  1057. <Program IsMainView="false" Name="CMF">
  1058. <Code>D :=(HIGH-LOW);
  1059. AD:=IF(D==0,0,((CLOSE-LOW)-(HIGH-CLOSE))/D*VOL);
  1060. MV :=MA(VOL,N);
  1061. CMF:IF(MV==0,0,MA(AD,N)/MV),COLORSTICK;</Code>
  1062. <Description>Developed by Marc Chaikin, the Chaikin Money Flow oscillator is calculated from the daily readings of the Accumulation/Distribution Line. The basic premise behind the Accumulation Distribution Line is that the degree of buying or selling pressure can be determined by the location of the close relative to the high and low for the corresponding period (Closing Location Value). There is buying pressure when a stock closes in the upper half of a period's range and there is selling pressure when a stock closes in the lower half of the period's trading range. The Closing Location Value multiplied by volume forms the Accumulation/Distribution Value for each period.</Description>
  1063. <DisabledCycle />
  1064. <FullName>Chaikin Money Flow</FullName>
  1065. <Params>
  1066. <FormulaParam DefaultValue="20" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1067. </Params>
  1068. </Program>
  1069. <Program IsMainView="false" Name="ULT">
  1070. <Code>LC :=REF(C,1);
  1071. TL :=MIN(L,LC);
  1072. BP :=C-TL;
  1073. TR := MAX(H-L,ABS(LC-H),ABS(LC-L));
  1074. BPSum1 := MA(BP,N1);
  1075. BPSum2 := MA(BP,N2);
  1076. BPSum3 := MA(BP,N3);
  1077. TRSum1 := MA(TR,N1);
  1078. TRSum2 := MA(TR,N2);
  1079. TRSum3 := MA(TR,N3);
  1080. RawUO :=4*(BPSum1/TRSum1)+2*(BPSum2/TRSum2)+(BPSum3/TRSum3);
  1081. (RawUO/(4+2+1))*100,Width1.6,HighQuality;
  1082. </Code>
  1083. <Description>Developed by Larry Williams and first described in a 1985 article for Technical Analysis of Stocks and Commodities magazine, the "Ultimate" Oscillator combines a stock's price action during three different time frames into one bounded oscillator. Values range from 0 to 100 with 50 as the center line. Oversold territory exists below 30 and overbought territory extends from 70 to 100.
  1084. </Description>
  1085. <DisabledCycle />
  1086. <FullName>Ultimate Oscillator</FullName>
  1087. <Params>
  1088. <FormulaParam DefaultValue="7" Description="" MaxValue="100" MinValue="1" Name="N1" ParamType="double" />
  1089. <FormulaParam DefaultValue="14" Description="" MaxValue="100" MinValue="1" Name="N2" ParamType="double" />
  1090. <FormulaParam DefaultValue="28" Description="" MaxValue="100" MinValue="1" Name="N3" ParamType="double" />
  1091. </Params>
  1092. </Program>
  1093. <Program IsMainView="false" Name="AroonOsc">
  1094. <Code>0;
  1095. "Aroon(N)[UP]"-"Aroon(N)[DOWN]"</Code>
  1096. <Description>The Aroon Oscillator was constructed by subtracting Aroon(down) from Aroon(up). Since Aroon(up) and Aroon(down) oscillate between 0 and +100, the Aroon Oscillator oscillate between -100 and +100 with zero as the center crossover line.</Description>
  1097. <DisabledCycle />
  1098. <FullName>Aroon Oscillator</FullName>
  1099. <Params>
  1100. <FormulaParam DefaultValue="25" Description="" MaxValue="1000" MinValue="0" Name="N" ParamType="double" />
  1101. </Params>
  1102. </Program>
  1103. </Programs>
  1104. </Namespace>
  1105. <Namespace Name="Others" Version="">
  1106. <Description />
  1107. <GroupOnly>true</GroupOnly>
  1108. <Namespaces />
  1109. <Programs>
  1110. <Program IsMainView="false" Name="MASS">
  1111. <Code>SUM(EMA((HIGH-LOW),N1)/EMA(EMA((HIGH-LOW),N1),N1),N2)</Code>
  1112. <Description>The Mass Index was designed to identify trend reversals by measuring the narrowing and widening of the range between the high and low prices. As this range widens, the Mass Index increases; as the range narrows the Mass Index decreases.
  1113. The Mass Index was developed by Donald Dorsey.
  1114. </Description>
  1115. <DisabledCycle />
  1116. <FullName>Mass Index</FullName>
  1117. <Params>
  1118. <FormulaParam DefaultValue="9" Description="" MaxValue="100" MinValue="2" Name="N1" ParamType="double" />
  1119. <FormulaParam DefaultValue="25" Description="" MaxValue="100" MinValue="5" Name="N2" ParamType="double" />
  1120. </Params>
  1121. </Program>
  1122. <Program IsMainView="false" Name="STD">
  1123. <Code>STD(CLOSE,N)</Code>
  1124. <Description>STD</Description>
  1125. <DisabledCycle />
  1126. <FullName>STD</FullName>
  1127. <Params>
  1128. <FormulaParam DefaultValue="26" Description="" MaxValue="100" MinValue="2" Name="N" ParamType="double" />
  1129. </Params>
  1130. </Program>
  1131. <Program IsMainView="false" Name="VHF">
  1132. <Code>(HHV(CLOSE,N)-LLV(CLOSE,N))/SUM(ABS(CLOSE-REF(CLOSE,1)),N)</Code>
  1133. <Description>Vertical Horizontal Filter (VHF) was created by Adam White to identify trending and ranging markets. VHF measures the level of trend activity, similar to ADX in the Directional Movement System. Trend indicators can then be employed in trending markets and momentum indicators in ranging markets.
  1134. Vary the number of periods in the Vertical Horizontal Filter to suit different time frames. White originally recommended 28 days but now prefers an 18-day window smoothed with a 6-day moving average.
  1135. </Description>
  1136. <DisabledCycle />
  1137. <FullName>Vertical Horizontal Filter</FullName>
  1138. <Params>
  1139. <FormulaParam DefaultValue="28" Description="" MaxValue="100" MinValue="3" Name="N" ParamType="double" />
  1140. </Params>
  1141. </Program>
  1142. <Program IsMainView="false" Name="WAD">
  1143. <Code>SUM(IF( CLOSE&gt;REF(CLOSE,1),CLOSE-MIN(REF(CLOSE,1),LOW),IF(CLOSE&lt;REF(CLOSE,1),
  1144. CLOSE-MAX(REF(CLOSE,1),HIGH),0)),0)</Code>
  1145. <Description>A price indicator attempting to assess the accumulation or distribution of securities.</Description>
  1146. <DisabledCycle />
  1147. <FullName>William's Accumulation/Distribution</FullName>
  1148. <Params />
  1149. </Program>
  1150. <Program IsMainView="false" Name="ZigLabel">
  1151. <Code>DrawNumber(FindPeak(N),H,H,'f2'),Label3;
  1152. DrawNumber(FindTrough(N),L,L,'f2'),Label3,Valign2;</Code>
  1153. <Description />
  1154. <DisabledCycle />
  1155. <FullName>Zig Zag Label</FullName>
  1156. <Params>
  1157. <FormulaParam DefaultValue="6" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1158. </Params>
  1159. </Program>
  1160. <Program IsMainView="false" Name="PR">
  1161. <Code>PR:C/FML(StockCode,'C')*100,HighQuality;
  1162. EMA(PR,N);</Code>
  1163. <Description>The Price Relative compares the performance of one security against that of another. It is often used to compare the performance of a particular stock to a market index, usually the S&amp;P 500. Because the goal of many portfolio managers is to outperform the S&amp;P 500, they are usually interested in the strongest stocks. The price relative offers a straightforward and accurate portrayal of a stock's performance relative to the market.</Description>
  1164. <DisabledCycle />
  1165. <FullName>Price Relative</FullName>
  1166. <Params>
  1167. <FormulaParam DefaultValue="^DJI" Description="" MaxValue="0" MinValue="0" Name="StockCode" ParamType="string" />
  1168. <FormulaParam DefaultValue="20" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1169. </Params>
  1170. </Program>
  1171. <Program IsMainView="true" Name="Fibonnaci">
  1172. <Code>A := HHV(H,N);
  1173. B := LLV(L,N);
  1174. HH:BackSet(IsLastBar,N)*A.LastData,Width2;
  1175. LL:BackSet(IsLastBar,N)*B.LastData,Width2;
  1176. Height := HH-LL;
  1177. A1 : LL+Height*0.382;
  1178. A2 : LL+Height*0.5;
  1179. A3 : LL+Height*0.618;
  1180. @SetTextVisible(HH,false);
  1181. @SetTextVisible(LL,false);
  1182. @SetTextVisible(A1,false);
  1183. @SetTextVisible(A2,false);
  1184. @SetTextVisible(A3,false);</Code>
  1185. <Description />
  1186. <DisabledCycle />
  1187. <FullName>Fibonnaci</FullName>
  1188. <Params>
  1189. <FormulaParam DefaultValue="100" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1190. </Params>
  1191. </Program>
  1192. <Program IsMainView="true" Name="LinRegr">
  1193. <Code>A := LR(C,N);
  1194. Dist :=C-A;
  1195. M := Max(MaxValue(Dist),ABS(MinValue(Dist)))*P/100;
  1196. Upper : A +M;
  1197. Lower : A - M;
  1198. A;
  1199. @SetName(A,'');
  1200. @SetTextVisible(Upper,false);
  1201. @SetTextVisible(Lower,false);</Code>
  1202. <Description />
  1203. <DisabledCycle />
  1204. <FullName>Linear Regression Channels</FullName>
  1205. <Params>
  1206. <FormulaParam DefaultValue="14" Description="" MaxValue="1000" MinValue="1" Name="N" ParamType="double" />
  1207. <FormulaParam DefaultValue="100" Description="" MaxValue="100" MinValue="0" Name="P" ParamType="double" />
  1208. </Params>
  1209. </Program>
  1210. <Program IsMainView="false" Name="RawData">
  1211. <Code>O:OrgData(DataName);
  1212. @SetName(O,DataName);
  1213. @SetTextVisible(false);</Code>
  1214. <Description />
  1215. <DisabledCycle />
  1216. <FullName>Provide raw data from data provider</FullName>
  1217. <Params>
  1218. <FormulaParam DefaultValue="0" Description="" MaxValue="0" MinValue="0" Name="DataName" ParamType="string" />
  1219. </Params>
  1220. </Program>
  1221. <Program IsMainView="false" Name="ZigW">
  1222. <Code>Zig(N),Width2;
  1223. A :=FindPeak(N);
  1224. B :=FindTrough(N);
  1225. A1 :=ToValue(A,H,0.5);
  1226. A2 :=ToValue(B,L,0.5);
  1227. PolyLine(A,H),StyleDash;
  1228. PolyLine(B,L),StyleDash,SameColor;
  1229. A3 :=ZIGP(N);
  1230. DrawNumber(A1,A1,A3,'f3'),Label3,VAlign0;
  1231. DrawNumber(A2,A2,A3,'f3'),Label3,VAlign0;</Code>
  1232. <Description />
  1233. <DisabledCycle />
  1234. <FullName>Zig /w retracements</FullName>
  1235. <Params>
  1236. <FormulaParam DefaultValue="10" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1237. </Params>
  1238. </Program>
  1239. <Program IsMainView="true" Name="ZigSR">
  1240. <Code>A1 :=Peak(N);
  1241. A2 :=Peak(N,2);
  1242. B1 :=PeakBars(N);
  1243. B2 :=PeakBars(N,2);
  1244. DrawLine(B2.LastData,A2.LastData,B1.LastData,A1.LastData,1);
  1245. DrawText(B2.LastData,A2.LastData,'{HIGH} +hi[UP]'),SameColor;
  1246. DrawText(B1.LastData,A1.LastData,'{HIGH} +hi'),SameColor;
  1247. D1 :=Trough(N);
  1248. D2 :=Trough(N,2);
  1249. E1 :=TroughBars(N);
  1250. E2 :=TroughBars(N,2);
  1251. DrawLine(E2.LastData,D2.LastData,E1.LastData,D1.LastData,1),SameColor;
  1252. DrawText(E2.LastData,D2.LastData,'{LOW} +lo[up channel]'),VAlign2,SameColor;
  1253. DrawText(E1.LastData,D1.LastData,'{LOW} +lo[b/o retest]'),VAlign2,SameColor;
  1254. </Code>
  1255. <Description />
  1256. <DisabledCycle />
  1257. <FullName>Zig support and resistance</FullName>
  1258. <Params>
  1259. <FormulaParam DefaultValue="10" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1260. </Params>
  1261. </Program>
  1262. <Program IsMainView="true" Name="ZigIcon">
  1263. <Code>DrawIcon(FindPeak(N),H,'dn.gif'),Top;
  1264. DrawIcon(FindTrough(N),L,'up.gif'),Bottom;</Code>
  1265. <Description />
  1266. <DisabledCycle />
  1267. <FullName>Draw buy sell Icon according Zig</FullName>
  1268. <Params>
  1269. <FormulaParam DefaultValue="6" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1270. </Params>
  1271. </Program>
  1272. <Program IsMainView="true" Name="TimeLabel">
  1273. <Code>AA : DrawText(NEARESTTIME(D,T),C,Text);
  1274. @SetAttr(AA,Style);
  1275. @SETTEXTVISIBLE(false);</Code>
  1276. <Description />
  1277. <DisabledCycle />
  1278. <FullName>Draw label at specific time</FullName>
  1279. <Params>
  1280. <FormulaParam DefaultValue="20031231" Description="" MaxValue="100000000" MinValue="0" Name="D" ParamType="double" />
  1281. <FormulaParam DefaultValue="091000" Description="" MaxValue="100000000" MinValue="0" Name="T" ParamType="double" />
  1282. <FormulaParam DefaultValue="Rumour" Description="" MaxValue="0" MinValue="0" Name="Text" ParamType="string" />
  1283. <FormulaParam DefaultValue="Font(Verdana, 10pt, style=Bold, Italic),ColorRed" Description="" MaxValue="0" MinValue="0" Name="Style" ParamType="string" />
  1284. </Params>
  1285. </Program>
  1286. </Programs>
  1287. </Namespace>
  1288. <Namespace Name="Native" Version="">
  1289. <Description />
  1290. <GroupOnly>true</GroupOnly>
  1291. <Namespaces />
  1292. <Programs>
  1293. <Program IsMainView="false" Name="HL">
  1294. <Code>N</Code>
  1295. <Description />
  1296. <DisabledCycle />
  1297. <FullName>Horizon Line</FullName>
  1298. <Params>
  1299. <FormulaParam DefaultValue="0" Description="" MaxValue="20000" MinValue="1" Name="N" ParamType="double" />
  1300. </Params>
  1301. </Program>
  1302. <Program IsMainView="false" Name="EMA">
  1303. <Code>EMA(C,N);</Code>
  1304. <Description />
  1305. <DisabledCycle />
  1306. <FullName>EMA</FullName>
  1307. <Params>
  1308. <FormulaParam DefaultValue="12" Description="" MaxValue="1000" MinValue="1" Name="N" ParamType="double" />
  1309. </Params>
  1310. </Program>
  1311. <Program IsMainView="false" Name="MA">
  1312. <Code>MA(C,N);</Code>
  1313. <Description />
  1314. <DisabledCycle />
  1315. <FullName>MA</FullName>
  1316. <Params>
  1317. <FormulaParam DefaultValue="12" Description="" MaxValue="1000" MinValue="1" Name="N" ParamType="double" />
  1318. </Params>
  1319. </Program>
  1320. <Program IsMainView="false" Name="MAIN">
  1321. <Code>M:STOCK;
  1322. @SetName('');
  1323. @SetTextVisible(M,false);</Code>
  1324. <Description />
  1325. <DisabledCycle />
  1326. <FullName>Stock area</FullName>
  1327. <Params />
  1328. </Program>
  1329. <Program IsMainView="false" Name="VOL">
  1330. <Code>VOL,VOLSTICK;</Code>
  1331. <Description />
  1332. <DisabledCycle />
  1333. <FullName>Volumn View</FullName>
  1334. <Params />
  1335. </Program>
  1336. <Program IsMainView="false" Name="DotLine">
  1337. <Code>N,StyleDash,ColorRed</Code>
  1338. <Description />
  1339. <DisabledCycle />
  1340. <FullName>Dot Horizon Line</FullName>
  1341. <Params>
  1342. <FormulaParam DefaultValue="0" Description="" MaxValue="20000" MinValue="0" Name="N" ParamType="double" />
  1343. </Params>
  1344. </Program>
  1345. <Program IsMainView="false" Name="MAIN2">
  1346. <Code>M:STOCK;
  1347. @SetName(M,StkLabel);
  1348. @SetTextVisible(false);
  1349. </Code>
  1350. <Description />
  1351. <DisabledCycle />
  1352. <FullName>Stock area show symbol and value</FullName>
  1353. <Params />
  1354. </Program>
  1355. <Program IsMainView="false" Name="OverlayV">
  1356. <Code>A:VOL,VOLSTICK,HIGH0.2,Alpha100;
  1357. @SETNAME(A,'V');
  1358. @SETTEXTVISIBLE(false)</Code>
  1359. <Description />
  1360. <DisabledCycle />
  1361. <FullName>Volume for overlay</FullName>
  1362. <Params />
  1363. </Program>
  1364. <Program IsMainView="false" Name="REF">
  1365. <Code>A:=REF(FML(Indi),N);
  1366. BackSet(IsLastValue(A),A,M)</Code>
  1367. <Description />
  1368. <DisabledCycle />
  1369. <FullName>Reference values of N days before</FullName>
  1370. <Params>
  1371. <FormulaParam DefaultValue="C" Description="" MaxValue="" MinValue="" Name="Indi" ParamType="indicator" />
  1372. <FormulaParam DefaultValue="1" Description="" MaxValue="10000" MinValue="0" Name="N" ParamType="double" />
  1373. <FormulaParam DefaultValue="20" Description="" MaxValue="10000" MinValue="0" Name="M" ParamType="double" />
  1374. </Params>
  1375. </Program>
  1376. <Program IsMainView="false" Name="REFC">
  1377. <Code>REF(C,N);</Code>
  1378. <Description />
  1379. <DisabledCycle />
  1380. <FullName>Reference Close Value</FullName>
  1381. <Params>
  1382. <FormulaParam DefaultValue="1" Description="" MaxValue="1000000" MinValue="0" Name="N" ParamType="double" />
  1383. </Params>
  1384. </Program>
  1385. </Programs>
  1386. </Namespace>
  1387. <Namespace Name="Extend" Version="">
  1388. <Description />
  1389. <GroupOnly>true</GroupOnly>
  1390. <Namespaces />
  1391. <Programs>
  1392. <Program IsMainView="true" Name="AreaBB">
  1393. <Code>MID := MA(CLOSE,N);
  1394. UPPER: MID + P*STD(CLOSE,N),Color#8080c0;
  1395. LOWER: MID - P*STD(CLOSE,N),Color#8080c0;
  1396. FILLRGN(1,LOWER,UPPER),Brush#200000C0;
  1397. </Code>
  1398. <Description>The Bollinger Bands were introduced by John Bollinger. Its primary use is for presenting the volatility of the security in an easy to view form. The indicator consists of three bands: a simple moving average (middle), SMA plus 2 standard deviations (upper), and SMA minus 2 standard deviations (lower).</Description>
  1399. <DisabledCycle />
  1400. <FullName>Area Bollinger Bands</FullName>
  1401. <Params>
  1402. <FormulaParam DefaultValue="26" Description="" MaxValue="300" MinValue="5" Name="N" ParamType="double" />
  1403. <FormulaParam DefaultValue="2" Description="" MaxValue="10" MinValue="0.1" Name="P" ParamType="double" />
  1404. </Params>
  1405. </Program>
  1406. <Program IsMainView="false" Name="AreaRSI">
  1407. <Code>LC := REF(CLOSE,1);
  1408. RSI:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
  1409. 70,HighSpeed;
  1410. 30,HighSpeed;
  1411. FILLRGN(RSI&gt;70,RSI,70),Brush#20808000;
  1412. FILLRGN(RSI&lt;30,RSI,30),Brush#20800000;</Code>
  1413. <Description>The Relative Strength Index was introduced by Welles Wilder. It is an indicator for overbought / oversold conditions. It is going up when the market is strong, and down, when the market is weak. The oscillation range is between 0 and 100.
  1414. The indicator is non-linear, it is moving faster in the middle of its range, and slower - in the overbought / oversold territory.
  1415. The RSI should not be confused with the relative strength indicator which is used to compare stocks to each other.
  1416. </Description>
  1417. <DisabledCycle />
  1418. <FullName>Relative Strength Index</FullName>
  1419. <Params>
  1420. <FormulaParam DefaultValue="14" Description="" MaxValue="100" MinValue="2" Name="N1" ParamType="double" />
  1421. </Params>
  1422. </Program>
  1423. <Program IsMainView="false" Name="SR2">
  1424. <Code>M :=(H+L+C)/3;
  1425. S:M +((-L+(2*M)-(-H+2*M))),Color#80c080;
  1426. R:M-((-L+(2*M))-(-H+2*M)),Color#80c080;
  1427. FILLRGN(1,S,R),Brush#2000C000;</Code>
  1428. <Description />
  1429. <DisabledCycle />
  1430. <FullName>Support &amp; Resistance</FullName>
  1431. <Params />
  1432. </Program>
  1433. <Program IsMainView="true" Name="Compare">
  1434. <Code>FML(StockCode,'C'),FirstDataOfView,HighQuality;
  1435. @SetName(StockCode);</Code>
  1436. <Description />
  1437. <DisabledCycle />
  1438. <FullName>Compare Stocks</FullName>
  1439. <Params>
  1440. <FormulaParam DefaultValue="^DJI" Description="" MaxValue="0" MinValue="0" Name="StockCode" ParamType="symbol" />
  1441. </Params>
  1442. </Program>
  1443. <Program IsMainView="false" Name="CmpIndi">
  1444. <Code>V1:FML(Indi),HighQuality;
  1445. V2:FML(StockCode,Indi),HighQuality;
  1446. @SetName(V1,StkLabel);
  1447. @SetName(V2,StockCode);
  1448. @SetName(Indi);
  1449. </Code>
  1450. <Description />
  1451. <DisabledCycle />
  1452. <FullName>Compare two indicators</FullName>
  1453. <Params>
  1454. <FormulaParam DefaultValue="^DJI" Description="" MaxValue="0" MinValue="0" Name="StockCode" ParamType="symbol" />
  1455. <FormulaParam DefaultValue="RSI(14)" Description="" MaxValue="0" MinValue="0" Name="Indi" ParamType="indicator" />
  1456. </Params>
  1457. </Program>
  1458. <Program IsMainView="false" Name="SRAxisY">
  1459. <Code>M :=(H+L+C)/3;
  1460. A :=H-L;
  1461. RR:=M+A;
  1462. SS:=M-A;
  1463. R : DrawAxisY(RR,-10,12),Width2,Color#A0FF0000,AxisMargin12;
  1464. S : DrawAxisY(SS,-10,12),Width2,Color#A0004000;
  1465. DrawTextAxisY(RR,'R',1),Color#FF0000,VCenter;
  1466. DrawTextAxisY(SS,'S',1),Color#004000,VCenter;
  1467. @SetName('SR');</Code>
  1468. <Description />
  1469. <DisabledCycle />
  1470. <FullName>Support &amp; Resistance on AxisY</FullName>
  1471. <Params />
  1472. </Program>
  1473. <Program IsMainView="false" Name="SlowSTO2">
  1474. <Code>A:=(C-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100;
  1475. K:MA(A,M1),ColorDarkGreen,Width2,HighQuality;
  1476. D:MA(K,M2);
  1477. PartLine(K&gt;=D,K),ColorRed,Width2,HighQuality;
  1478. </Code>
  1479. <Description />
  1480. <DisabledCycle />
  1481. <FullName>Slow Stochastic</FullName>
  1482. <Params>
  1483. <FormulaParam DefaultValue="14" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1484. <FormulaParam DefaultValue="3" Description="" MaxValue="50" MinValue="1" Name="M1" ParamType="double" />
  1485. <FormulaParam DefaultValue="9" Description="" MaxValue="50" MinValue="1" Name="M2" ParamType="double" />
  1486. </Params>
  1487. </Program>
  1488. <Program IsMainView="false" Name="RefIndi">
  1489. <Code>REF(FML(Indi),N);
  1490. @SetName(Indi+'-'+N);</Code>
  1491. <Description />
  1492. <DisabledCycle />
  1493. <FullName>Reference indicator's value</FullName>
  1494. <Params>
  1495. <FormulaParam DefaultValue="MACD[DIFF]" Description="" MaxValue="0" MinValue="0" Name="Indi" ParamType="string" />
  1496. <FormulaParam DefaultValue="10" Description="" MaxValue="10000" MinValue="1" Name="N" ParamType="double" />
  1497. </Params>
  1498. </Program>
  1499. <Program IsMainView="false" Name="MainArea">
  1500. <Code>MAIN : C,HighQuality;
  1501. FILLAREA(MAIN),Brush#20808000;
  1502. @SetTextVisible(MAIN,false);
  1503. @SetTextVisible(false);</Code>
  1504. <Description />
  1505. <DisabledCycle />
  1506. <FullName>Main Area View</FullName>
  1507. <Params>
  1508. <FormulaParam DefaultValue="100" Description="" MaxValue="100000" MinValue="1" Name="N" ParamType="double" />
  1509. </Params>
  1510. </Program>
  1511. <Program IsMainView="false" Name="SR3">
  1512. <Code>P := (H+L+C)/3;
  1513. YL := REF(L,1);
  1514. YH := REF(H,1);
  1515. R1 : 2 * P - YL;
  1516. S1 : 2 * P - YH;
  1517. R2 : (P - S1) + R1;
  1518. S2 : P - (R1-S1);
  1519. R3 : (P + R2) - S1;
  1520. S3 : (P - R2) + S1;
  1521. R4 : (P + R3) - S1;
  1522. S4 : (P - R3) + S1;
  1523. R5 : (P + R4) - S1;
  1524. S5 : (P - R4) + S1;</Code>
  1525. <Description />
  1526. <DisabledCycle />
  1527. <FullName>Support &amp; Resistance 2</FullName>
  1528. <Params />
  1529. </Program>
  1530. <Program IsMainView="true" Name="Compare2">
  1531. <Code>FML(StockCode,'STOCK'),FullView,HighQuality,MonoStock;
  1532. @SetName(StockCode);</Code>
  1533. <Description />
  1534. <DisabledCycle />
  1535. <FullName>Compare Stocks</FullName>
  1536. <Params>
  1537. <FormulaParam DefaultValue="^DJI" Description="" MaxValue="0" MinValue="0" Name="StockCode" ParamType="symbol" />
  1538. </Params>
  1539. </Program>
  1540. <Program IsMainView="false" Name="TwoDiff">
  1541. <Code>C1:=FML(Symbol2,'C')-C;
  1542. H1:=FML(Symbol2,'H')-H;
  1543. L1:=FML(Symbol2,'L')-L;
  1544. O1:=FML(Symbol2,'O')-O;
  1545. GETSTOCK(O1,C1,MAX(C1,O1,H1,L1),MIN(C1,O1,H1,L1));
  1546. </Code>
  1547. <Description>draw difference of two symbol in candle mode.</Description>
  1548. <DisabledCycle />
  1549. <FullName>Difference of Two Symbol</FullName>
  1550. <Params>
  1551. <FormulaParam DefaultValue="INTL" Description="" MaxValue="0" MinValue="0" Name="Symbol2" ParamType="string" />
  1552. </Params>
  1553. </Program>
  1554. <Program IsMainView="true" Name="TradingIcon">
  1555. <Code>DrawIcon(FML(Indi+'[ExitLong]'),H,'DN.GIF'),TOP;
  1556. DrawIcon(FML(Indi+'[EnterLong]'),L,'UP.GIF'),BOTTOM;</Code>
  1557. <Description />
  1558. <DisabledCycle />
  1559. <FullName>Trading Icon</FullName>
  1560. <Params>
  1561. <FormulaParam DefaultValue="Trading.RSI" Description="" MaxValue="0" MinValue="0" Name="Indi" ParamType="indicator" />
  1562. </Params>
  1563. </Program>
  1564. <Program IsMainView="false" Name="Compare3">
  1565. <Code>FML(StockCode,'C'),HighQuality;
  1566. @SetName(StockCode);</Code>
  1567. <Description />
  1568. <DisabledCycle />
  1569. <FullName>Compare Stocks</FullName>
  1570. <Params>
  1571. <FormulaParam DefaultValue="^DJI" Description="" MaxValue="0" MinValue="0" Name="StockCode" ParamType="symbol" />
  1572. </Params>
  1573. </Program>
  1574. <Program IsMainView="false" Name="ColorSar">
  1575. <Code>M : SAR(N,STEP,MAXP),COLORBLUE;
  1576. A1:STOCK,MONOSTOCK,BRUSHRED,COLORRED;
  1577. A2:IF(M&lt;C,STOCK,NAN),MONOSTOCK,BRUSHBLUE,COLORBLUE;
  1578. A3:IF(M&lt;C,M,NAN),COLORRED,CIRCLEDOT;
  1579. @SETNAME(M,'SAR');
  1580. @SETTEXTVISIBLE(A1,FALSE);
  1581. @SETTEXTVISIBLE(A2,FALSE);
  1582. @SETTEXTVISIBLE(A3,FALSE);
  1583. @SETTEXTVISIBLE(FALSE);</Code>
  1584. <Description />
  1585. <DisabledCycle />
  1586. <FullName>Color candle bar based on sar</FullName>
  1587. <Params>
  1588. <FormulaParam DefaultValue="10" Description="" MaxValue="100" MinValue="1" Name="N" ParamType="double" />
  1589. <FormulaParam DefaultValue="2" Description="" MaxValue="100" MinValue="1" Name="STEP" ParamType="double" />
  1590. <FormulaParam DefaultValue="20" Description="" MaxValue="100" MinValue="5" Name="MAXP" ParamType="double" />
  1591. </Params>
  1592. </Program>
  1593. </Programs>
  1594. </Namespace>
  1595. <Namespace Name="Intraday" Version="">
  1596. <Description />
  1597. <GroupOnly>true</GroupOnly>
  1598. <Namespaces />
  1599. <Programs>
  1600. <Program IsMainView="false" Name="OpeningRange">
  1601. <Code>H1:=IF(IsLastDay &amp; Time&lt;=N,H,NaN);
  1602. L1:=IF(IsLastDay &amp; Time&lt;=N,L,NaN);
  1603. HH :=HHV(H1,0);
  1604. LL :=LLV(L1,0);
  1605. Extend(IF(HH.LastValue==HH,HH,NaN)),StyleDash,Width2;
  1606. Extend(IF(LL.LastValue==LL,LL,NaN)),StyleDash,Width2;
  1607. </Code>
  1608. <Description>a horizontal line based on the high and low of the first X minutes of the trading day.</Description>
  1609. <DisabledCycle />
  1610. <FullName>Opening Range</FullName>
  1611. <Params>
  1612. <FormulaParam DefaultValue="100000" Description="" MaxValue="240000" MinValue="0" Name="N" ParamType="double" />
  1613. </Params>
  1614. </Program>
  1615. <Program IsMainView="false" Name="PriorClose">
  1616. <Code>"REFC#DAY",StyleDash,ColorRed,NoValueLabel,Horizontal,Width2;
  1617. @SetTextVisible(false);</Code>
  1618. <Description />
  1619. <DisabledCycle />
  1620. <FullName>Prior day's close</FullName>
  1621. <Params />
  1622. </Program>
  1623. <Program IsMainView="false" Name="PriorHLC">
  1624. <Code>"RefIndi(H,1)#DAY",StyleDash,NoValueLabel,Horizontal,Width2;
  1625. "RefC#DAY",StyleDash,NoValueLabel,Horizontal,Width2;
  1626. "RefIndi(L,1)#DAY",StyleDash,NoValueLabel,Horizontal,Width2;
  1627. @SetTextVisible(false);</Code>
  1628. <Description />
  1629. <DisabledCycle />
  1630. <FullName>Prior day's High,Low,Close</FullName>
  1631. <Params />
  1632. </Program>
  1633. <Program IsMainView="false" Name="TDP">
  1634. <Code>Cond := Between(DoubleDate,LastDoubleDate-N,LastDoubleDate-0.00001);
  1635. HH :=HHV(IF(Cond,H,NaN)).LastValue;
  1636. LL :=LLV(IF(Cond,L,NaN)).LastValue;
  1637. CC :=IF(Cond,C,NaN).LastValue;
  1638. P :=(HH+LL+CC)/3;
  1639. M :=(HH+LL)/2;
  1640. PD :=ABS(P-M);
  1641. PH:IF(IsLastDay,P+PD,NaN),StyleDash,Width2;
  1642. PL:IF(IsLastDay,P-PD,NaN),StyleDash,Width2;
  1643. </Code>
  1644. <Description />
  1645. <DisabledCycle />
  1646. <FullName>Three Days Pivot Range</FullName>
  1647. <Params>
  1648. <FormulaParam DefaultValue="3" Description="" MaxValue="1000" MinValue="0" Name="N" ParamType="double" />
  1649. </Params>
  1650. </Program>
  1651. </Programs>
  1652. </Namespace>
  1653. <Namespace Name="Test" Version="">
  1654. <Description>Test some operation</Description>
  1655. <GroupOnly>false</GroupOnly>
  1656. <Namespaces />
  1657. <Programs>
  1658. <Program IsMainView="false" Name="DDAA">
  1659. <Code>"MACD(26,12,9)"</Code>
  1660. <Description />
  1661. <DisabledCycle />
  1662. <FullName />
  1663. <Params />
  1664. </Program>
  1665. <Program IsMainView="false" Name="DNF">
  1666. <Code>TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N);
  1667. HD := HIGH-REF(HIGH,1);
  1668. LD := REF(LOW,1)-LOW;
  1669. DMP:= SUM(IF(HD&gt;0 &amp; HD&gt;LD,HD,0),N);
  1670. DMM:= SUM(IF(LD&gt;0 &amp; LD&gt;HD,LD,0),N);
  1671. PDI: DMP*100/TR;
  1672. MDI: DMM*100/TR;
  1673. ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
  1674. ADXR:(ADX+REF(ADX,M))/2
  1675. </Code>
  1676. <Description />
  1677. <DisabledCycle />
  1678. <FullName />
  1679. <Params>
  1680. <FormulaParam DefaultValue="10" Description="" MaxValue="100" MinValue="0" Name="N" ParamType="double" />
  1681. <FormulaParam DefaultValue="6" Description="" MaxValue="100" MinValue="1" Name="M" ParamType="double" />
  1682. </Params>
  1683. </Program>
  1684. <Program IsMainView="false" Name="NewCode">
  1685. <Code>HD := HIGH-REF(HIGH,1);</Code>
  1686. <Description />
  1687. <DisabledCycle />
  1688. <FullName />
  1689. <Params />
  1690. </Program>
  1691. </Programs>
  1692. </Namespace>
  1693. </Namespaces>
  1694. <Programs />
  1695. </Namespace>