Jump to content

ahuramazdi

Members
  • Posts

    15
  • Joined

  • Last visited

Reputation Activity

  1. Like
    ahuramazdi reacted to Johan445 in Sam S3iden   
    XL.T.ST.2010.04.15.Lesso.n6.Trade.Plan.Development.Part1.
    http://www.mediafire.com/?64xm4kp33cki4xi
     
    XL.T.ST.2010.04.23.Lesso.n7.Scanning.For.Opportunities-Top.Down.Approach
    http://www.mediafire.com/?d3ea6jn6er7b35x
     
    XL.T.ST.2010.04.29.Lesso.n8.CandlestickPattern.Using.Patterns.to.Confirm.Suppl.y&Demand
    http://www.mediafire.com/?il4f71my7kupkot
  2. Like
    ahuramazdi got a reaction from udc in Ocean Theory indis from TSD elite   
    As I was downloading I used all of my thank yous and the forum does not let me to thank you anymore!!!
    So here is a very big thank you for all your hard work and help. It has been a pleasure seeing a master who enjoys what he does at work.
    A very BIG HEART FELT THANK YOU.
  3. Like
    ahuramazdi reacted to udc in Ocean Theory indis from TSD elite   
    NMM_MACD for MT4
     
    This one is NMM_MACD. First it calculates NMM, then it calculates NMA of it (like in NMM_with_Ocn_MAs), but what is actually drawn on the chart is the difference between those two, i.e. NMM-NMA.
     
     
    Original NMM_MACD on TradeStation:
    http://img585.imageshack.us/img585/1374/nmmmacdtradestation.png
     
    NMM_MACD on Metatrader:
    http://img844.imageshack.us/img844/7105/nmmmacdmetatrader.png
     
    Original size screenshots:
    http://img834.imageshack.us/img834/1374/nmmmacdtradestation.png
    http://img191.imageshack.us/img191/7105/nmmmacdmetatrader.png
     

    #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Magenta #property indicator_color2 Silver #property indicator_level1 0 #property indicator_levelcolor Gray #property indicator_levelstyle 2 extern int NMM_MACD_period = 40; extern bool Show_SD = true; extern int SD_len = 30; extern double SD_up = 2; extern double SD_dn = 2; double NMM_MACD[]; double SD[]; double NMM[]; double NMM_MA[]; int init() { string nmmmacdname = "NMM_MACD(" + NMM_MACD_period + ")"; string sdname = "NMM_MACD_SD(" + SD_len + ")"; IndicatorShortName(nmmmacdname); IndicatorBuffers(4); SetIndexBuffer(0, NMM_MACD); SetIndexLabel(0, nmmmacdname); SetIndexBuffer(1, SD); SetIndexLabel(1, sdname); SetIndexBuffer(2, NMM); SetIndexBuffer(3, NMM_MA); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); double nmm2, sum, abssum, ratio; if(Bars <= 2*NMM_MACD_period) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > NMM_MACD_period) limit = Bars - counted_bars; else limit = Bars - NMM_MACD_period - 1; for(i = limit; i >= 0; i--) { nmm2 = 0; for(ii = 1; ii <= NMM_MACD_period; ii++) nmm2 += (MathLog(Close[i]) - MathLog(Close[i+ii])) / MathSqrt(ii); NMM[i] = (nmm2 / NMM_MACD_period) * 1000; } for(i = limit; i >= 0; i--) if(i < Bars - 2*NMM_MACD_period - 1) { ratio = 0; sum = (NMM[i] - NMM[i+1]) + (NMM[i+1] - NMM[i+2]) * (MathSqrt(2)-1); for(ii = 2; ii < NMM_MACD_period; ii++) sum += (NMM[i+ii] - NMM[i+ii+1]) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMM_MACD_period; ii++) sum += MathAbs(NMM[i+ii] - NMM[i+ii+1]); if(sum != 0) ratio = abssum / sum; NMM_MA[i] = NMM_MA[i+1] + (NMM[i] - NMM_MA[i+1]) * ratio; NMM_MACD[i] = NMM[i] - NMM_MA[i]; } if(Show_SD) for(i = limit; i >= 0; i--) if(i < Bars - 2*NMM_MACD_period - 1 - SD_len) { if(NMM_MACD[i] == 0) SD[i] = 0; else if(NMM_MACD[i] > 0) SD[i] = iBandsOnArray(NMM_MACD, 0, SD_len, SD_up, 0, MODE_UPPER, i); else if(NMM_MACD[i] < 0) SD[i] = iBandsOnArray(NMM_MACD, 0, SD_len, SD_dn, 0, MODE_LOWER, i); } return(0); }
     
    The source code is also available for download here:
    http://pastebin.com/JczHEshB
  4. Like
    ahuramazdi reacted to udc in Ocean Theory indis from TSD elite   
    NMS_with_Ocn_MAs for MT4
     
    NMS_with_Ocn_MAs.
     
    There is again a bug in the TradeStation source code regarding the FastNMA's lookback calculation. Actually it's in all source codes where NMA & FastNMA are applied onto another Ocean indi.
     
    Wherever you see a line like this:

    Value3 = _Ocn.FastMA.Fn (FALSE, Value1, CLOSE, SC, 1, 1, LB.Min) ;
     
    the third parameter of _Ocn.FastMA.Fn must be identical to the second parameter, so it must be like this:

    Value3 = _Ocn.FastMA.Fn (FALSE, Value1, Value1, SC, 1, 1, LB.Min) ;
     
     
    Original NMS_with_Ocn_MAs on TradeStation:
    http://img208.imageshack.us/img208/7532/nmswithocnmastradestati.png
     
    NMS_with_Ocn_MAs on Metatrader:
    http://img140.imageshack.us/img140/6875/nmswithocnmasmetatrader.png
     
    Original size screenshots:
    http://img38.imageshack.us/img38/7532/nmswithocnmastradestati.png
    http://img525.imageshack.us/img525/6875/nmswithocnmasmetatrader.png
     

    #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 Magenta #property indicator_color2 Yellow #property indicator_color3 Aqua #property indicator_level1 0 #property indicator_levelcolor Gray #property indicator_levelstyle 2 extern int NMS_period = 40; extern int NMA_period = 40; extern int NMA_LB_min = 8; double NMS[]; double NMS_NMA[]; double NMS_FastNMA[]; int init() { IndicatorShortName("NMS_with_Ocn_MAs(" + NMS_period + ", " + NMA_period + ", " + NMA_LB_min + ")"); IndicatorBuffers(3); SetIndexBuffer(0, NMS); SetIndexLabel(0, "NMS(" + NMS_period + ")"); SetIndexBuffer(1, NMS_NMA); SetIndexLabel(1, "NMS_NMA(" + NMA_period + ")"); SetIndexBuffer(2, NMS_FastNMA); SetIndexLabel(2, "NMS_FastNMA(" + NMA_period + ", " + NMA_LB_min + ")"); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); double nms2, sum, abssum, ratio, nmsnum, maxnms; if(Bars <= NMS_period) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > NMS_period) limit = Bars - counted_bars; else limit = Bars - NMS_period - 1; for(i = limit; i >= 0; i--) { nms2 = 0; for(ii = 1; ii <= NMS_period; ii++) { double oLRSlope = 0, SumXY = 0, SumY = 0, SumX, SumXSqr, Divisor; if(ii > 1) { SumX = ii * (ii - 1) * 0.5; SumXSqr = ii * (ii - 1) * (2 * ii - 1) * 1/6; Divisor = (SumX * SumX) - ii * SumXSqr; for(int iii = 0; iii < ii; iii++) { SumXY += iii * MathLog(Close[i+iii]); SumY += MathLog(Close[i+iii]); } oLRSlope = (ii * SumXY - SumX * SumY) / Divisor; } nms2 += oLRSlope * MathSqrt(ii); } NMS[i] = nms2 * 100; } for(i = limit; i >= 0; i--) if(i < Bars - NMS_period - 1 - NMA_period) { ratio = 0; sum = (NMS[i] - NMS[i+1]) + (NMS[i+1] - NMS[i+2]) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_period; ii++) sum += (NMS[i+ii] - NMS[i+ii+1]) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_period; ii++) sum += MathAbs(NMS[i+ii] - NMS[i+ii+1]); if(sum != 0) ratio = abssum / sum; NMS_NMA[i] = NMS_NMA[i+1] + (NMS[i] - NMS_NMA[i+1]) * ratio; } for(i = limit; i >= 0; i--) if(i < Bars - NMS_period - 1 - NMA_period) { maxnms = 0; ratio = 0; int NMA_LB_max; for(ii = 1; ii <= NMA_period; ii++) { nmsnum = (NMS[i] - NMS[i+ii]) / MathSqrt(ii); if(MathAbs(nmsnum) > maxnms) { maxnms = MathAbs(nmsnum); NMA_LB_max = ii; } } if(NMA_LB_max < NMA_LB_min) NMA_LB_max = NMA_LB_min; sum = (NMS[i] - NMS[i+1]) + (NMS[i+1] - NMS[i+2]) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_LB_max; ii++) sum += (NMS[i+ii] - NMS[i+ii+1]) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_LB_max; ii++) sum += MathAbs(NMS[i+ii] - NMS[i+ii+1]); if(sum != 0) ratio = abssum / sum; NMS_FastNMA[i] = NMS_FastNMA[i+1] + (NMS[i] - NMS_FastNMA[i+1]) * ratio; } return(0); }
     
    The source code is also available for download here:
    http://pastebin.com/eEqjBy7C
  5. Like
    ahuramazdi reacted to udc in Ocean Theory indis from TSD elite   
    NMS for MT4
     
    NMS.
     
    It's slowly getting more interesting.
     
     
    Original NMS on TradeStation:
    http://img29.imageshack.us/img29/3972/nmstradestation.png
     
    NMS on Metatrader:
    http://img525.imageshack.us/img525/6312/nmsmetatrader.png
     
    Original size screenshots:
    http://img526.imageshack.us/img526/3972/nmstradestation.png
    http://img585.imageshack.us/img585/6312/nmsmetatrader.png
     

    #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Magenta #property indicator_color2 Silver #property indicator_level1 0 #property indicator_levelcolor Gray #property indicator_levelstyle 2 extern int NMS_period = 40; extern bool Show_SD = true; extern int SD_len = 30; extern double SD_up = 2; extern double SD_dn = 2; double NMS[]; double SD[]; int init() { string nmsname = "NMS(" + NMS_period + ")"; string sdname = "NMS_SD(" + SD_len + ")"; IndicatorShortName(nmsname); IndicatorBuffers(2); SetIndexBuffer(0, NMS); SetIndexLabel(0, nmsname); SetIndexBuffer(1, SD); SetIndexLabel(1, sdname); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); if(Bars <= NMS_period) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > NMS_period) limit = Bars - counted_bars; else limit = Bars - NMS_period - 1; for(i = limit; i >= 0; i--) { double nms2 = 0; for(ii = 1; ii <= NMS_period; ii++) { double oLRSlope = 0, SumXY = 0, SumY = 0, SumX, SumXSqr, Divisor; if(ii > 1) { SumX = ii * (ii - 1) * 0.5; SumXSqr = ii * (ii - 1) * (2 * ii - 1) * 1/6; Divisor = (SumX * SumX) - ii * SumXSqr; for(int iii = 0; iii < ii; iii++) { SumXY += iii * MathLog(Close[i+iii]); SumY += MathLog(Close[i+iii]); } oLRSlope = (ii * SumXY - SumX * SumY) / Divisor; } nms2 += oLRSlope * MathSqrt(ii); } NMS[i] = nms2 * 100; } if(Show_SD) for(i = limit; i >= 0; i--) if(i < Bars - NMS_period - 1 - SD_len) { if(NMS[i] == 0) SD[i] = 0; else if(NMS[i] > 0) SD[i] = iBandsOnArray(NMS, 0, SD_len, SD_up, 0, MODE_UPPER, i); else if(NMS[i] < 0) SD[i] = iBandsOnArray(NMS, 0, SD_len, SD_dn, 0, MODE_LOWER, i); } return(0); }
     
    The source code is also available for download here:
    http://pastebin.com/Ct55hgr7
     
     
    fawaz79: I will get to NMC too, just patience.
  6. Like
    ahuramazdi reacted to udc in Ocean Theory indis from TSD elite   
    NMM_with_Ocn_MAs for MT4
     
    NMM_with_Ocn_MAs.
     
    This one is the NMM indi as before, but instead of showing SD bands there are NMA and FastNMA applied onto NMM.
     
    The reason why FastNMA of NMM is different in my implementation is because there is a mistake in the original TradeStation version. When Pat was modifying the FastNMA code to take NMM as an input (instead of the price) he forgot to change the input for lookback calculation so he is still calculating the lookback from the price.
     
    For those interested in TradeStation version, the following change needs to be done in the $NMM_with Ocn MAs study:
     
    (wrong)

    Value1 = _Ocn.NMM.Fn (Price, SC, 1, 1) ; Value2 = _Ocn.MA.Fn (FALSE, Value1, 1) ; Value3 = _Ocn.FastMA.Fn (FALSE, Value1, [b][u]CLOSE[/u][/b], SC, 1, 1, LB.Min) ;
    (correct)

    Value1 = _Ocn.NMM.Fn (Price, SC, 1, 1) ; Value2 = _Ocn.MA.Fn (FALSE, Value1, 1) ; Value3 = _Ocn.FastMA.Fn (FALSE, Value1, [b][u]Value1[/u][/b], SC, 1, 1, LB.Min) ;
     
     
    Original NMM_with_Ocn_MAs on TradeStation:
    http://img827.imageshack.us/img827/3440/nmmwithocnmastradestati.png
     
    NMM_with_Ocn_MAs on Metatrader:
    http://img6.imageshack.us/img6/3783/nmmwithocnmasmetatrader.png
     
    Original size screenshots:
    http://img542.imageshack.us/img542/3440/nmmwithocnmastradestati.png
    http://img820.imageshack.us/img820/3783/nmmwithocnmasmetatrader.png
     

    #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 Magenta #property indicator_color2 Yellow #property indicator_color3 Aqua #property indicator_level1 0 #property indicator_levelcolor Gray #property indicator_levelstyle 2 extern int NMM_period = 40; extern int NMA_period = 40; extern int NMA_LB_min = 8; double NMM[]; double NMM_NMA[]; double NMM_FastNMA[]; int init() { IndicatorShortName("NMM_with_Ocn_MAs(" + NMM_period + ", " + NMA_period + ", " + NMA_LB_min + ")"); IndicatorBuffers(3); SetIndexBuffer(0, NMM); SetIndexLabel(0, "NMM(" + NMM_period + ")"); SetIndexBuffer(1, NMM_NMA); SetIndexLabel(1, "NMM_NMA(" + NMA_period + ")"); SetIndexBuffer(2, NMM_FastNMA); SetIndexLabel(2, "NMM_FastNMA(" + NMA_period + ", " + NMA_LB_min + ")"); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); double nmm2, sum, abssum, ratio, nmmnum, maxnmm; if(Bars <= NMM_period) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > NMM_period) limit = Bars - counted_bars; else limit = Bars - NMM_period - 1; for(i = limit; i >= 0; i--) { nmm2 = 0; for(ii = 1; ii <= NMM_period; ii++) nmm2 += (MathLog(Close[i]) - MathLog(Close[i+ii])) / MathSqrt(ii); NMM[i] = (nmm2 / NMM_period) * 1000; } for(i = limit; i >= 0; i--) if(i < Bars - NMM_period - 1 - NMA_period) { ratio = 0; sum = (NMM[i] - NMM[i+1]) + (NMM[i+1] - NMM[i+2]) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_period; ii++) sum += (NMM[i+ii] - NMM[i+ii+1]) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_period; ii++) sum += MathAbs(NMM[i+ii] - NMM[i+ii+1]); if(sum != 0) ratio = abssum / sum; NMM_NMA[i] = NMM_NMA[i+1] + (NMM[i] - NMM_NMA[i+1]) * ratio; } for(i = limit; i >= 0; i--) if(i < Bars - NMM_period - 1 - NMA_period) { maxnmm = 0; ratio = 0; int NMA_LB_max; for(ii = 1; ii <= NMA_period; ii++) { nmmnum = (NMM[i] - NMM[i+ii]) / MathSqrt(ii); if(MathAbs(nmmnum) > maxnmm) { maxnmm = MathAbs(nmmnum); NMA_LB_max = ii; } } if(NMA_LB_max < NMA_LB_min) NMA_LB_max = NMA_LB_min; sum = (NMM[i] - NMM[i+1]) + (NMM[i+1] - NMM[i+2]) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_LB_max; ii++) sum += (NMM[i+ii] - NMM[i+ii+1]) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_LB_max; ii++) sum += MathAbs(NMM[i+ii] - NMM[i+ii+1]); if(sum != 0) ratio = abssum / sum; NMM_FastNMA[i] = NMM_FastNMA[i+1] + (NMM[i] - NMM_FastNMA[i+1]) * ratio; } return(0); }
     
    The source code is also available for download here:
    http://pastebin.com/Dp9ErqUf
     
     
    tgt123: you are welcome.
  7. Like
    ahuramazdi reacted to udc in Ocean Theory indis from TSD elite   
    NMA_Price_Osc for MT4
     
    NMA_Price_Osc.
     
    This indi shows the distance between the price and NMA in the form of an oscilator. The TradeStation's original version can do that only for the regular NMA. My Metatrader version can do that also for the Fast NMA.
     
     
    Original NMA_Price_Osc on TradeStation:
    http://img252.imageshack.us/img252/4949/nmapriceosctradestation.png
     
    NMA_Price_Osc on Metatrader:
    http://img851.imageshack.us/img851/8864/nmapriceoscmetatrader.png
     
    Original size screenshots:
    http://img39.imageshack.us/img39/4949/nmapriceosctradestation.png
    http://img560.imageshack.us/img560/8864/nmapriceoscmetatrader.png
     

    #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Magenta #property indicator_color2 Silver #property indicator_level1 0 #property indicator_levelcolor Gray #property indicator_levelstyle 2 extern int NMA_period = 40; extern bool FastNMA = true; extern int NMA_LB_min = 8; extern bool Show_SD = true; extern int SD_len = 30; extern double SD_up = 2; extern double SD_dn = 2; double Price_Osc[]; double SD[]; double NMA[]; int init() { string nmaname = "NMA_Price_Osc(" + NMA_period + ")"; if(FastNMA) nmaname = "Fast_NMA_Price_Osc(" + NMA_period + ", " + NMA_LB_min + ")"; string sdname = "NMA_Price_Osc_SD(" + SD_len + ")"; IndicatorShortName(nmaname); IndicatorBuffers(3); SetIndexBuffer(0, Price_Osc); SetIndexLabel(0, nmaname); SetIndexBuffer(1, SD); SetIndexLabel(1, sdname); SetIndexBuffer(2, NMA); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); if(Bars <= NMA_period) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > NMA_period) limit = Bars - counted_bars; else limit = Bars - NMA_period - 1; for(i = limit; i >= 0; i--) { double nmmnum, maxnmm = 0, sum, abssum, ratio = 0; int NMA_LB_max; if(FastNMA) { for(ii = 1; ii <= NMA_period; ii++) { nmmnum = (MathLog(Close[i]) - MathLog(Close[i+ii])) / MathSqrt(ii); if(MathAbs(nmmnum) > maxnmm) { maxnmm = MathAbs(nmmnum); NMA_LB_max = ii; } } if(NMA_LB_max < NMA_LB_min) NMA_LB_max = NMA_LB_min; } else NMA_LB_max = NMA_period; sum = (MathLog(Close[i]) - MathLog(Close[i+1])) + (MathLog(Close[i+1]) - MathLog(Close[i+2])) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_LB_max; ii++) sum += (MathLog(Close[i+ii]) - MathLog(Close[i+ii+1])) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_LB_max; ii++) sum += MathAbs(MathLog(Close[i+ii]) - MathLog(Close[i+ii+1])); if(sum != 0) ratio = abssum / sum; NMA[i] = NMA[i+1] + (Close[i] - NMA[i+1]) * ratio; Price_Osc[i] = Close[i] - NMA[i]; } if(Show_SD) for(i = limit; i >= 0; i--) if(i < Bars - NMA_period - 1 - SD_len) { if(Price_Osc[i] == 0) SD[i] = 0; else if(Price_Osc[i] > 0) SD[i] = iBandsOnArray(Price_Osc, 0, SD_len, SD_up, 0, MODE_UPPER, i); else if(Price_Osc[i] < 0) SD[i] = iBandsOnArray(Price_Osc, 0, SD_len, SD_dn, 0, MODE_LOWER, i); } return(0); }
     
    The source code is also available for download here:
    http://pastebin.com/htivEk8D
  8. Like
    ahuramazdi reacted to udc in Ocean Theory indis from TSD elite   
    NMA_SD_Band_Osc for MT4
     
    NMA_SD_Band_Osc.
     
     
    Original NMA_SD_Band_Osc on TradeStation:
    http://img13.imageshack.us/img13/7295/nmasdbandosctradestatio.png
     
    NMA_SD_Band_Osc on Metatrader:
    http://img836.imageshack.us/img836/6674/nmasdbandoscmetatrader.png
     
    Original size screenshots:
    http://img526.imageshack.us/img526/7295/nmasdbandosctradestatio.png
    http://img401.imageshack.us/img401/6674/nmasdbandoscmetatrader.png
     

    #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Red #property indicator_level1 0 #property indicator_level2 50 #property indicator_level3 100 #property indicator_levelcolor Gray #property indicator_levelstyle 2 extern int NMA_period = 40; extern bool FastNMA = true; extern int NMA_LB_min = 8; extern int SD_len = 20; extern double SD_up = 1.5; extern double SD_dn = 1.5; double SD_Band_Osc[]; double NMA[]; double SDup[]; double SDdn[]; int init() { string nmaname = "NMA_SD_Band_Osc(" + NMA_period + ")"; if(FastNMA) nmaname = "Fast_NMA_SD_Band_Osc(" + NMA_period + ", " + NMA_LB_min + ")"; IndicatorShortName(nmaname); IndicatorBuffers(4); SetIndexBuffer(0, SD_Band_Osc); SetIndexLabel(0, nmaname); SetIndexBuffer(1, NMA); SetIndexBuffer(2, SDup); SetIndexBuffer(3, SDdn); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); if(Bars <= MathMax(NMA_period, SD_len)) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > MathMax(NMA_period, SD_len)) limit = Bars - counted_bars; else limit = Bars - MathMax(NMA_period, SD_len) - 1; for(i = limit; i >= 0; i--) { double nmmnum, maxnmm = 0, sum, abssum, ratio = 0; int NMA_LB_max; if(FastNMA) { for(ii = 1; ii <= NMA_period; ii++) { nmmnum = (MathLog(Close[i]) - MathLog(Close[i+ii])) / MathSqrt(ii); if(MathAbs(nmmnum) > maxnmm) { maxnmm = MathAbs(nmmnum); NMA_LB_max = ii; } } if(NMA_LB_max < NMA_LB_min) NMA_LB_max = NMA_LB_min; } else NMA_LB_max = NMA_period; sum = (MathLog(Close[i]) - MathLog(Close[i+1])) + (MathLog(Close[i+1]) - MathLog(Close[i+2])) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_LB_max; ii++) sum += (MathLog(Close[i+ii]) - MathLog(Close[i+ii+1])) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_LB_max; ii++) sum += MathAbs(MathLog(Close[i+ii]) - MathLog(Close[i+ii+1])); if(sum != 0) ratio = abssum / sum; NMA[i] = NMA[i+1] + (Close[i] - NMA[i+1]) * ratio; SDup[i] = NMA[i] + SD_up * iStdDev(NULL, 0, SD_len, 0, 0, PRICE_CLOSE, i); SDdn[i] = NMA[i] - SD_dn * iStdDev(NULL, 0, SD_len, 0, 0, PRICE_CLOSE, i); SD_Band_Osc[i] = (Close[i] - SDdn[i]) / (SDup[i] - SDdn[i]) * 100; } return(0); }
     
    The source code is also available for download here:
    http://pastebin.com/aC6C7ZDH
  9. Like
    ahuramazdi reacted to udc in Ocean Theory indis from TSD elite   
    NMA_SD_Band_Width for MT4
     
    NMA_SD_Band_Width.
     
    Though fully faithful to the original TradeStation source code, this one shouldn't be called NMA_anything as it has basically nothing to do with NMA. Pat probably didn't realize that he calculates the SD bands from the price, not from the NMA, and thus the difference between the upper and lower band is mere a sum of both deviation constants:

    SDup = NMA + SD_up * StdDev SDdn = NMA - SD_dn * StdDev SDwidth = SDup - SDdn = NMA + SD_up * StdDev - (NMA - SD_dn * StdDev) = NMA - NMA + SD_up * StdDev + SD_dn * StdDev = (SD_up + SD_dn) * iStdDev
     
    EDIT: Pat actually said on the video that what this indicator does is measuring the volatility. I guess he just named it NMA_... for convenience. It's a simple idea but definitely not unuseful.
     
     
    Original NMA_SD_Band_Width on TradeStation:
    http://img339.imageshack.us/img339/3770/nmasdbandwidthtradestat.png
     
    NMA_SD_Band_Width on Metatrader:
    http://img190.imageshack.us/img190/8113/nmasdbandwidthmetatrade.png
     
    Original size screenshots:
    http://img853.imageshack.us/img853/3770/nmasdbandwidthtradestat.png
    http://img189.imageshack.us/img189/8113/nmasdbandwidthmetatrade.png
     

    #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Blue extern int NMA_period = 40; extern bool FastNMA = true; extern int NMA_LB_min = 8; extern int SD_len = 20; extern double SD_up = 1.5; extern double SD_dn = 1.5; extern bool Show_Pct = false; double SD_Band_Width[]; double NMA[]; double SDup[]; double SDdn[]; int init() { string nmaname = "NMA_SD_Band_Width(" + NMA_period + ")"; if(FastNMA) nmaname = "Fast_NMA_SD_Band_Width(" + NMA_period + ", " + NMA_LB_min + ")"; IndicatorShortName(nmaname); IndicatorBuffers(4); SetIndexBuffer(0, SD_Band_Width); SetIndexLabel(0, nmaname); SetIndexBuffer(1, NMA); SetIndexBuffer(2, SDup); SetIndexBuffer(3, SDdn); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); if(Bars <= MathMax(NMA_period, SD_len)) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > MathMax(NMA_period, SD_len)) limit = Bars - counted_bars; else limit = Bars - MathMax(NMA_period, SD_len) - 1; for(i = limit; i >= 0; i--) { double nmmnum, maxnmm = 0, sum, abssum, ratio = 0; int NMA_LB_max; if(FastNMA) { for(ii = 1; ii <= NMA_period; ii++) { nmmnum = (MathLog(Close[i]) - MathLog(Close[i+ii])) / MathSqrt(ii); if(MathAbs(nmmnum) > maxnmm) { maxnmm = MathAbs(nmmnum); NMA_LB_max = ii; } } if(NMA_LB_max < NMA_LB_min) NMA_LB_max = NMA_LB_min; } else NMA_LB_max = NMA_period; sum = (MathLog(Close[i]) - MathLog(Close[i+1])) + (MathLog(Close[i+1]) - MathLog(Close[i+2])) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_LB_max; ii++) sum += (MathLog(Close[i+ii]) - MathLog(Close[i+ii+1])) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_LB_max; ii++) sum += MathAbs(MathLog(Close[i+ii]) - MathLog(Close[i+ii+1])); if(sum != 0) ratio = abssum / sum; NMA[i] = NMA[i+1] + (Close[i] - NMA[i+1]) * ratio; SDup[i] = NMA[i] + SD_up * iStdDev(NULL, 0, SD_len, 0, 0, PRICE_CLOSE, i); SDdn[i] = NMA[i] - SD_dn * iStdDev(NULL, 0, SD_len, 0, 0, PRICE_CLOSE, i); if(Show_Pct) SD_Band_Width[i] = (SDup[i] - SDdn[i]) / NMA[i] * 100; else SD_Band_Width[i] = SDup[i] - SDdn[i]; } return(0); }
     
    The source code is also available for download here:
    http://pastebin.com/Bq4yHqAB
  10. Like
    ahuramazdi reacted to udc in Ocean Theory indis from TSD elite   
    NMM_X-Ray_1 for MT4
     
    NMM_X-Ray_1.
     
    The scale of this indicator is from 0 to 40 with a dotted auxiliary middle line at 20. The number 40 is hardwired in the original TradeStation's version, I made it changeable via external variable called "NMM_period". You have no real reason to change it but if you do then you should also change the scale and the middle line appropriately.
     
    Also, there is a switch Show_Pct, turned off by default, to show values in percentage (what was 0 - 40 would be 0 - 100). If you use that switch you should respectively adjust the scale and the middle line.
     
    The TradeStation's version shows only the PosCnt value (the chart line). I show all 3 values (PosCnt, NegCnt and ZeroCnt) where the two others have by default no color assigned (thus are not visible). You can assign them a color, or, you can check their values via "Data Window". All three most recent values are also always shown in the upper left corner of the indicator chart window.
     
     
    Original NMM_X-Ray_1 on TradeStation:
    http://img341.imageshack.us/img341/7481/nmmxray1tradestation.png
     
    NMM_X-Ray_1 on Metatrader:
    http://img10.imageshack.us/img10/6563/nmmxray1metatrader.png
     
    Original size screenshots:
    http://img829.imageshack.us/img829/7481/nmmxray1tradestation.png
    http://img849.imageshack.us/img849/6563/nmmxray1metatrader.png
     

    #property indicator_separate_window #property indicator_minimum 0 #property indicator_maximum 40 #property indicator_buffers 3 #property indicator_color1 Yellow #property indicator_color2 CLR_NONE #property indicator_color3 CLR_NONE #property indicator_level1 20 #property indicator_levelcolor Gray #property indicator_levelstyle 2 extern int NMM_period = 40; extern bool Show_Pct = false; double NMM[]; double NegCnt[]; double ZeroCnt[]; int init() { string nmmname = "NMM_X-Ray_1"; IndicatorShortName(nmmname + "(" + NMM_period + ")"); IndicatorBuffers(3); SetIndexBuffer(0, NMM); SetIndexLabel(0, nmmname + "(" + NMM_period + ")"); SetIndexBuffer(1, NegCnt); SetIndexLabel(1, nmmname + "_NegCnt"); SetIndexBuffer(2, ZeroCnt); SetIndexLabel(2, nmmname + "_ZeroCnt"); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); if(Bars <= NMM_period) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > NMM_period) limit = Bars - counted_bars; else limit = Bars - NMM_period - 1; for(i = limit; i >= 0; i--) { double nmmnum, Pos = 0, Neg = 0, Zero = 0; for(ii = 1; ii <= NMM_period; ii++) { nmmnum = (MathLog(Close[i]) - MathLog(Close[i+ii])) / MathSqrt(ii); if(nmmnum > 0) Pos++; else if(nmmnum < 0) Neg++; else Zero++; } if(Show_Pct) { NMM[i] = Pos / NMM_period * 100; NegCnt[i] = Neg / NMM_period * 100; ZeroCnt[i] = Zero / NMM_period * 100; } else { NMM[i] = Pos; NegCnt[i] = Neg; ZeroCnt[i] = Zero; } } return(0); }
     
    The source code is also available for download here:
    http://pastebin.com/40qiAPLD
  11. Like
    ahuramazdi reacted to udc in Ocean Theory indis from TSD elite   
    NMM Ocean Index for MT4
     
    Next one is the NMM Ocean Index.
    A slight discrepancy (i.e. a missing SD band's zero cross from below on 3/29) is due to the differences in price feeds, the math is correct.
     
    Original NMM Ocean Index on TradeStation:
    http://img195.imageshack.us/img195/7533/oceanindextradestation.png
     
    NMM Ocean Index on Metatrader:
    http://img853.imageshack.us/img853/438/oceanindexmetatrader.png
     
    Original size screenshots:
    http://img651.imageshack.us/img651/7533/oceanindextradestation.png
    http://img40.imageshack.us/img40/438/oceanindexmetatrader.png
     

    #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Magenta #property indicator_color2 Silver #property indicator_level1 0 #property indicator_levelcolor Gray #property indicator_levelstyle 2 extern int NMM_LB = 21; extern bool Show_SD = true; extern int SD_len = 30; extern double SD_up = 2; extern double SD_dn = 2; double NMM[]; double SD[]; int init() { string nmmname = "NMM_Ocean_Index(" + NMM_LB + ")"; string sdname = "NMM_Ocean_Index_SD(" + SD_len + ")"; IndicatorShortName(nmmname); IndicatorBuffers(2); SetIndexBuffer(0, NMM); SetIndexLabel(0, nmmname); SetIndexBuffer(1, SD); SetIndexLabel(1, sdname); return(0); } int start() { int limit, i, counted_bars = IndicatorCounted(); if(Bars <= NMM_LB) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > NMM_LB) limit = Bars - counted_bars; else limit = Bars - NMM_LB - 1; for(i = limit; i >= 0; i--) NMM[i] = (MathLog(Close[i]) - MathLog(Close[i+NMM_LB])) / MathSqrt(NMM_LB) * 1000; if(Show_SD) for(i = limit; i >= 0; i--) if(i < Bars - NMM_LB - 1 - SD_len) { if(NMM[i] == 0) SD[i] = 0; else if(NMM[i] > 0) SD[i] = iBandsOnArray(NMM, 0, SD_len, SD_up, 0, MODE_UPPER, i); else if(NMM[i] < 0) SD[i] = iBandsOnArray(NMM, 0, SD_len, SD_dn, 0, MODE_LOWER, i); } return(0); }
     
    The source code is also available for download here:
    http://pastebin.com/RFFngh9g
     
     
    I take it chronologically as Pat is explaining them in the videos, so the next one will probably be NMR. These are the building blocks for the more advanced Ocean indis so even though these may not be the most useful directly I would have to program them anyway.
     
     
    tgt123: I will get to those as well.
     
    Grain Trader: not sure which ones you mean. In some of earlier posts I described what Ocean indis are in the TradeStation package I shared here.
  12. Like
    ahuramazdi reacted to udc in Ocean Theory indis from TSD elite   
    NMA for MT4
     
    Well, since no one seems to either have access to the advanced elite section of the TSD forum, or isn't willing to share, I started reprogramming Ocean Theory indicators from TradeStation to Metatrader myself, first one is NMA.
    I may do a couple more and that's it because the TradeStation code is annoying.
     
    Original NMA on TradeStation:
    http://img404.imageshack.us/img404/3062/nmatradestation.png
     
    NMA on Metatrader:
    http://img69.imageshack.us/img69/2483/nmametatrader.png
     
    Original size screenshots:
    http://img521.imageshack.us/img521/3062/nmatradestation.png
    http://img19.imageshack.us/img19/2483/nmametatrader.png
     
     
    For some reason I can't post an attachment so I just paste the code here:

    #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Yellow #property indicator_color2 Gray #property indicator_color3 Gray extern int NMA_period = 40; extern bool Show_SD = true; extern int SD_len = 30; extern double SD_up = 2; extern double SD_dn = 2; double NMA[]; double SDup[]; double SDdn[]; int init() { string nmaname = "NMA(" + NMA_period + ")"; string sdname = "NMA_SD(" + SD_len + ")"; IndicatorShortName(nmaname); IndicatorBuffers(3); SetIndexBuffer(0, NMA); SetIndexLabel(0, nmaname); SetIndexBuffer(1, SDup); SetIndexLabel(1, sdname+"_up"); SetIndexBuffer(2, SDdn); SetIndexLabel(2, sdname+"_dn"); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); if(Bars <= MathMax(NMA_period, SD_len)) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > MathMax(NMA_period, SD_len)) limit = Bars - counted_bars; else limit = Bars - MathMax(NMA_period, SD_len) - 1; for(i = limit; i >= 0; i--) { double sum, abssum, ratio; sum = (MathLog(Close[i]) - MathLog(Close[i+1])) + (MathLog(Close[i+1]) - MathLog(Close[i+2])) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_period; ii++) sum += (MathLog(Close[i+ii]) - MathLog(Close[i+ii+1])) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_period; ii++) sum += MathAbs(MathLog(Close[i+ii]) - MathLog(Close[i+ii+1])); if(sum != 0) ratio = abssum / sum; NMA[i] = NMA[i+1] + (Close[i] - NMA[i+1]) * ratio; if(Show_SD) { SDup[i] = NMA[i] + SD_up * iStdDev(Symbol(), Period(), SD_len, 0, 0, PRICE_CLOSE, i); SDdn[i] = NMA[i] - SD_dn * iStdDev(Symbol(), Period(), SD_len, 0, 0, PRICE_CLOSE, i); } } return(0); }
     
    The source code is also available for download here:
    http://pastebin.com/6iN4YdH5
     
     
    Please suggest which Ocean indi would be the most useful to reprogram to Metatrader.
  13. Like
    ahuramazdi got a reaction from alansim in Post Your EX4 Here -Part 2   
    I would be most grateful if anyone could convert these ex4 to mq4 format. They are different versions of the same EA which is based on synergy system.
     
    http://www.4shared.com/file/776bYOj-/TMS_V21_MTFH.html
    http://www.4shared.com/file/PWHGJwrA/TMS_V19_MTF.html
     
    Many thanks
  14. Like
    ahuramazdi reacted to ⭐ musketeer in Post Your EX4 Here -Part 2   
    really I am not sure what you mean... there are links to 14 sites and they probably works, I've just tried few of them... cant even reach "lividsetup"...
  15. Like
    ahuramazdi got a reaction from ⭐ musketeer in Post Your EX4 Here -Part 2   
    OOPS. SOrry, must have had my head up my a**. That is what you get for working at 3am. I clciked the top of the page and did not scroll to the links. PLEASE ACCEPT MY APOLOGIES.
     
    Thanks very much, once again,
    Kind Regards
     

  16. Like
    ahuramazdi reacted to ⭐ musketeer in Post Your EX4 Here -Part 2   
    http://mir.cr/0G4ES6ZA (http://mir.cr/0G4ES6ZA) p:indo123456
  17. Like
    ahuramazdi reacted to RogueTrader in xMeter in Indicator form   
    Here is a currency pack I made...same as above xmeter but with only pairs instead of all currencies.
    Just place on individual charts...ie EURCHF on EURCHF chart
    EURCHF
    EURGBP
    EURJPY
    GBPCHF
    GBPJPY
    GBPUSD
    USDCAD
    USDCHF
    USDJPY
    AUDUSD
    EURUSD
    NZDUSD
    Hope you find it handy
     
    http://www.4shared.com/file/GwO_cpmR/Currency_pack_player.html
     
    P.S
    56 downloads and only 2 people have said thanks...sheesh , why do I bother!
  18. Like
    ahuramazdi reacted to flyaamfx in Post Your EX4 Here -Part 2   
    http://www.4shared.com/file/SR89h6hB/KG_GGH_Signal_V_1_12.html
     
    Send your thanks
    flyaamfx
  19. Like
    ahuramazdi reacted to Diesel 10 in Foll0wtrend indi. Enjoy!   
    Here's a nice trend following indicator. Apparently is very similar to ablesys. Can use on all pairs, all timeframes. Buy on Blue dot, Sell on red dot. Simple.
     
    Enjoy, my friends !
     

    http://www.mediafire.com/?b66ak8u9epy0x5h
  20. Like
    ahuramazdi got a reaction from FLT in One of the best support/resistance indi i ever found   
    I just downloaded from the link fom yhe top of this page with no problem. Are you using the latest mq4 file here http://www.4shared.com/file/254864591/ac30b4f/_TLB_OC_v02.html
    thanks
  21. Like
    ahuramazdi got a reaction from sidecona in One of the best support/resistance indi i ever found   
    I just downloaded from the link fom yhe top of this page with no problem. Are you using the latest mq4 file here http://www.4shared.com/file/254864591/ac30b4f/_TLB_OC_v02.html
    thanks
×
×
  • Create New...