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

Personal Information

  • First Name
    TradersLaboratory.com
  • Last Name
    User
  • Country
    Afghanistan

Trading Information

  • Vendor
    No
  • Favorite Markets
    Stocks

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  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
×
×
  • Create New...

Important Information

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