Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

r4bb1t

Members
  • Content Count

    27
  • Joined

  • Last visited

Everything posted by r4bb1t

  1. 'Technical Analysis of the Financial Markets' by john murphy is the textbook of TA. others are just quoted piece of it.
  2. one of most popular MA period would be the 20 MA. when used in Daily chart it's pretty logical since stock market trading days are 20 per month. but what about 200 MA? trading days per year is approximately 250. not 200. what's the logical basis behind this popular period? even people uses 200 MA on every timeframes which is non sense. for example 200 MA on 10 Min chart is just 33.33 hours. what's so special? it's just random number. usually people saying that it's because OTHERS uses it. it's non sense too. MACD would be the most popular indicator but is that really good? should we watch it? i've asked this to numerous traders but no one have answered it yet. will you? why 200 MA?
  3. what i know is. EMA is not the actual average. the one and only actual average is SMA. i like the idea behind VWAP and VWMA that weighting volume. but both are not that different with SMA. so it's depend on your purpose. if you need actual average of past prices. use SMA. or if you need just smoothing filter regardless of actual average. use any other moving averages rather than SMA.
  4. Hello community. recently i've read some interesting paper that invented new moving average called Improved Moving Average. they also published the code but it's written in R the statistical language. can anyone convert it to easy language? here's the link http://www.quantf.com/ima-code
  5. i understand what you meant and i'd like to share anything i have. but i really have nothing. i meant was i just tried to write some pseudo code to know if it's possible by myself.
  6. //+----------------------------------------------- ---------------------------------------+ / / | Hodrick - Prescott Filter.mq5 | / / | Copyright 2010 gpwr | / / | vlad1004@yahoo.com | //+----------------------------------------------- ---------------------------------------+ # property copyright "gpwr" # property version "1.00" # property description "Hodrick - Prescott Filter" # property indicator_chart_window # property indicator_buffers 1 # property indicator_plots 1 # property indicator_label1 "filter" # property indicator_type1 DRAW_LINE # property indicator_color1 Red # property indicator_style1 STYLE_SOLID # property indicator_width1 1 //===================================== INPUTS ========== ================================= input int Per = 50; / / HP filter period input int N = 500 / / # of prices to smooth / / Global variables int PrevBars; double Lambda; / / Indicator buffers double hpf []; / / Custom indicator initialization function -------------------------------------------- - + void OnInit () { / / Initialize global variables PrevBars = Bars (_Symbol, _Period) -1; Lambda = 0.0625/MathPow (MathSin (M_PI / Per), 4); / / Map indicator buffers ArraySetAsSeries (hpf, true); SetIndexBuffer (0 hpf, INDICATOR_DATA); IndicatorSetInteger (INDICATOR_DIGITS, _Digits); IndicatorSetString (INDICATOR_SHORTNAME "HPF ("+ string (Per )+")"); } //====================================== MAIN ========= =================================== int OnCalculate (const int bars, const int prev_calculated, const datetime & Time [], const double & Open [], const double & High [], const double & Low [], const double & Close [], const long & tick_volume [], const long & volume [], const int & spread []) { / / Check for insufficient data and new bar if (bars <N) { Print ( "Error : not enough bars in history!"); return (0); } if (PrevBars == bars) return (bars); PrevBars = bars; / / Initialize indicator buffer to EMPTY_VALUE ArrayInitialize (hpf, EMPTY_VALUE); / / Reverse indexing direction for Open ArraySetAsSeries (Open, true); / / Main cycle ---------------------------------------------- -----------------------------+ for (int i = 0; i <N; i + +) hpf [i] = Open [i]; HPF (N, Lambda, hpf); return (bars); } //==================================== FUNCTIONS =========== ============================== / / Hodrick - Prescott Filter -------------------------------------------- -------------------+ void HPF (int n, double lambda, double & x []) { double a [], b [], c [], h1, h2, h3, h4, h5, hh1, hh2, hh3, hh5, hb, hc, z; ArrayResize (a, n); ArrayResize (b, n); ArrayResize (c, n); a [0] = 1.0 + lambda; b [0] =- 2.0 * lambda; c [0] = lambda; for (int i = 1; i <n - 2; i + +) { a [i] = 6.0 * lambda +1.0; b [i] =- 4.0 * lambda; c [i] = lambda; } a [1] = 5.0 * lambda +1; a [n - 1] = 1.0 + lambda; a [n - 2] = 5.0 * lambda +1.0; b [n - 2] =- 2.0 * lambda; b [n - 1] = 0.0; c [n - 2] = 0.0; c [n - 1] = 0.0; / / Forward for (int i = 0; i <n; i + +) { z = a [i] - h4 * h1 - hh5 * hh2; hb = b [i]; hh1 = h1; h1 = (hb - h4 * h2) / z; b [i] = h1; hc = c [i]; hh2 = h2; h2 = hc / z; c [i] = h2; a [i] = (x [i] - hh3 * hh5 - h3 * h4) / z; hh3 = h3; h3 = a [i]; h4 = hb - h5 * hh1; hh5 = h5; h5 = hc; } / / Backward h2 = 0; h1 = a [n - 1]; x [n - 1] = h1; for (int i = n - 2; i> = 0; i -) { x [i] = a [i] - b [i] * h1 - c [i] * h2; h2 = h1; h1 = x [i]; } } It's Hodrick-Prescott Filter coded in MT4. it's widely used in econometrics or bussiness forecasting. hope someone convert it to Tradestation. i've tried by myself but i've stucked in the Forward iteration part. he used one variable named x in the forward interation and it's third parameter of the function itself. but i don't know how to handle it on Tradestation.
  7. Hi bobcollett. in my opinion, since moving averages are lagging indicator. knowing the precise lag of what you use is important. i just made this small sheet for selecting exact periods of moving average to avoid point numbers of lag. also by using this sheet you can easily replace xx period of SMA to equivalent WMA or EMA.
  8. i've read an article from John Ehler. which explains mathematical nature of the moving averages. he has described that how to calculate the lag of moving averages. SMA's lag is calculated by (N-1)/2. eg : 5 SMA = (5-1)/2 = 2 bar lag. WMA's lag is calculated by (N-1)/3. eg : 7 WMA = (7-1)/3 = 2 bar lag. so both are very similar on price chart. but what if you use 10 SMA? yes it's 4.5 bar lag. (10-1)/2 = 4.5 since stock charts are time series that proceeds one by one . (except P&F and renko etc). i don't feel comfortable with moving averages that has lag of point numbers like 10 SMA. though i don't have any evidence for it. just intuitively so i've collected some moving average periods that has lag of integer numbers. therefore i don't use 20 SMA anymore. hope this helps.
  9. i just curious that anyone could convert following MT4 indicators to easy language. as far as i know these advanced indicators are never been converted to TS. One Side Gaussian Filter One side gaussian ... Fractal Graph Dimension Indicator Fractal Graph Dimension Indicator (FGDI) - MQL4 Code Base Variation Index Variation Index - MQL4 Code Base
  10. Hello Traders. i've seen an interesting article that describes Optimal Donchian Channel. http://www.tradersonline-mag.com/01_ezine/01_traders/en/2011/08/index.html#/58/zoomed it's kind of adaptive. don't need to input static period. automatically finds optimal period to plot donchian channel. unfortunately, there's no code. they're just explaining how they implemented it. and i don't understand that what they are talking about!! anyone interest of making it? and i'd be appreciated if you code in easy language. Thanks.
  11. i hate that people renaming traditional indicator to another. it's just CCI(50) that is plotted as ATR tailing stop.
  12. According to Dow/Gold Ratio (which is relative strength) Random Roving: The Dow Jones Industrial Average / Gold Ratio: The Mathematical Relationships currently down trend (dow weak and/or gold strong) is in process. basically if dow plunges this ratio will go down quickly. which means gold can't go up much relatively if dow holds current level at least. gold can go up. hench dow down+gold up makes this ratio plunge like these days. it works like Put-Call Parity relationships. of options structure. in purely technican's point of view. i can say that this dow weak/gold strong tendency may continue up to 2 years more. because this Dow/Gold Ratio didn't reached the historical bottom yet. since it's forming expanding triangle pattern.this tendency may be extended over 3 years.
  13. Thanks for your kind answer. seems it's inferior interface to use but features are enough for me.
  14. Hello Traders. as title says i'm looking for a Free charting tool that supports custom data importing (OHLC or just Close). and provides various popular technical indicators. i know i can use Excel but it's uncomfortable for me. all i want to do is just so simple. import my data then see how indicators look like with my data. i'd appreciate if anyone bring me to somewhere right place. Thanks
  15. my understanding is that the Forecast variable supposed to be precede data like link below. but i've noticed that DEMA or ZLEMA came from brown's double exponential smoothing. it's the brown's Forecast variable. i guess pic in the tsd link might be Holt Winter's forecast variable that made to accompany with price like ZLEMA does https://www.student.gsu.edu/~lcross5/Forecasting%20Assignment.htm
  16. by the way i've coded Brown's Double exponential smoothing in the reference document. it's not the DEMA. it's slower than normal EMA and smoother. it's just enclosed EMA with EMA. i've plotted normal EMA(Red) and BDES(Blue) together. now, let's complete Holt Winter's too #Brown's Double Exponential Smoothing #Function Name : BDES Inputs : Price(NumericSeries), Period(NumericSimple); Vars : SES(0), Alpha(0); Alpha = 2/(Period+1); #same as normal EMA IF Index==0 Then { SES=C; #Single Exponential Smoothing BDES=C; #Brown's Double Exponential Smoothing } Else { SES=(Alpha*C)+((1-Alpha)*SES[1]); BDES=(Alpha*SES)+((1-Alpha)*BDES[1]); }
  17. Hi Tradewinds. Thanks for paving the way. i'm also struggling by myself. there's an excel worksheet file in the link of my first post. seems it requires different calculation for initial iteration. btw in your code. you're plotting Forecast line. not the smoothing line. (Level) and i've noticed that when i replace alpha to 2/(Period+1) and beta to 0. it's exactly same with Normal EMA. so the rest part to accomplishing it is beta, anyone join us?
  18. Hi Tams. it's kind of exponential smoothing. since normal EMA has an alpha factor that is determined as 2/(Period+1). Holt Winter's method uses 2 factors called alpha and beta. the important factor is beta which weights more when data has trend. though it's not adaptive. therefore we can expect that Holt Winter's method would fit better than normal EMA when market moves in a trend. it's all i know. for mathematical reference please check here. http://www.scss.tcd.ie/Rozenn.Dahyot/ST3007/4DES.pdf
  19. Notice that ZLEMA is exactly same with DEMA. and personally i don't like it since it's overshoot to the place where never been traded.
  20. Hello Traders. i've seen that someone implemented Holt Winter's double exponential smoothing indicator. which is used in business forecasting. http://www.forex-tsd.com/blogs/newdigital/494-new-elite-section-indcators-holt-double-exponential-smoothing-indicators.html and here's simple reference of it. http://vbautomation.110mb.com/FORECASTING/expoential_smoothing_methods.htm#Holt's can anyone convert it to Easy Language please?
  21. i've noticed that there are two versions of Instantaneous TrendLine. both are came from John Ehlers. another one can adjust alpha factor as you see below blog. trading notes: The deep relationship between Instantaneous Trendline and Cyber Cycle is this version self-adjusting the alpha factor depend on market cycle?
  22. i recommend 5m rather than 3m. because 5 is divisor of 10. if you research intraday volume trend you'll realized that automated orders tends to be executed at X0min 00 secs i don't know who it is. probably institutional trader's machines and individual system traders as well. however it could be a bit different in your market. so research first.
  23. Thanks for answer. No i've plotted the RS indicator below price as stockcharts does. it works pretty good for a single stock. but doesn't work for comparing plural stocks however i prefer to plotting moving averages of RS together as we normally do on price. i don't buy stocks when their RS is below 200MA of RS
  24. Hi Do Or Die. relative strength between entire market and a single stock can be done by simple dividing. but how to calculate comparative relative strength? i mean normalization to compare the relative strength of two different stocks. i've tried 'ROC of Stock / ROC of Entire Market' to achieve this but no luck. i'm asking that how William O'neil calculated the relative strength score. Thanks
  25. Hello VSA Experts i'm new to VSA. i'm just curious that when price moving in sideway how VSA distinguish Accumulation and Distribution. attached image is a stock daily chart. as you see, after uptrend the stock moved in a sideway for past 3 months i thought it was accumulation process and i was totally wrong. is there any certain VSA evidence that can say it's in Distribution process ?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.