-
Posts
14 -
Joined
-
Last visited
Reputation Activity
-
kolikol got a reaction from casey12 in Steinitz Fractal Breakout Custom Indicator
I do not use this indicator. I try this sometime. All information is here
http://www.forexrobottrader.com/steinitz_fractal_breakout_custom_indicator.php
-
kolikol got a reaction from casey12 in Steinitz Fractal Breakout Custom Indicator
http://uploadmirrors.com/download/9OL6LPPX/SFBI1.5.rar
or
https://hotfile.com/dl/166919424/2235b28/SFBI1.5_MultiUpload.biz.rar.html
-
kolikol got a reaction from iqofgenius in Steinitz Fractal Breakout Custom Indicator
http://uploadmirrors.com/download/9OL6LPPX/SFBI1.5.rar
or
https://hotfile.com/dl/166919424/2235b28/SFBI1.5_MultiUpload.biz.rar.html
-
kolikol got a reaction from pavlus777 in Fibon@cci Lines An@lyzer 3.0 $39
www.fibon@cci-tr@[email protected]
http://mir.cr/0RPTWLJX
:)
http://fibonacci-trading-software.info/images/1.jpg
-
kolikol got a reaction from taipan in Fibon@cci Lines An@lyzer 3.0 $39
www.fibon@cci-tr@[email protected]
http://mir.cr/0RPTWLJX
:)
http://fibonacci-trading-software.info/images/1.jpg
-
kolikol got a reaction from ummo in Fibon@cci Lines An@lyzer 3.0 $39
www.fibon@cci-tr@[email protected]
http://mir.cr/0RPTWLJX
:)
http://fibonacci-trading-software.info/images/1.jpg
-
kolikol got a reaction from hermes in Fibon@cci Lines An@lyzer 3.0 $39
www.fibon@cci-tr@[email protected]
http://mir.cr/0RPTWLJX
:)
http://fibonacci-trading-software.info/images/1.jpg
-
kolikol got a reaction from cazador in Fibon@cci Lines An@lyzer 3.0 $39
www.fibon@cci-tr@[email protected]
http://mir.cr/0RPTWLJX
:)
http://fibonacci-trading-software.info/images/1.jpg
-
kolikol got a reaction from tsar in Fibon@cci Lines An@lyzer 3.0 $39
www.fibon@cci-tr@[email protected]
http://mir.cr/0RPTWLJX
:)
http://fibonacci-trading-software.info/images/1.jpg
-
kolikol got a reaction from metal1713006284 in Fibon@cci Lines An@lyzer 3.0 $39
www.fibon@cci-tr@[email protected]
http://mir.cr/0RPTWLJX
:)
http://fibonacci-trading-software.info/images/1.jpg
-
kolikol got a reaction from ⭐ Ormazd in Fibon@cci Lines An@lyzer 3.0 $39
www.fibon@cci-tr@[email protected]
http://mir.cr/0RPTWLJX
:)
http://fibonacci-trading-software.info/images/1.jpg
-
kolikol got a reaction from e-Invester in Fibon@cci Lines An@lyzer 3.0 $39
www.fibon@cci-tr@[email protected]
http://mir.cr/0RPTWLJX
:)
http://fibonacci-trading-software.info/images/1.jpg
-
kolikol got a reaction from mashki in Fibon@cci Lines An@lyzer 3.0 $39
www.fibon@cci-tr@[email protected]
http://mir.cr/0RPTWLJX
:)
http://fibonacci-trading-software.info/images/1.jpg
-
kolikol got a reaction from ⭐ mr12323 in Fibon@cci Lines An@lyzer 3.0 $39
www.fibon@cci-tr@[email protected]
http://mir.cr/0RPTWLJX
:)
http://fibonacci-trading-software.info/images/1.jpg
-
kolikol reacted to udc in Ocean Theory indis from TSD elite
NDX, NST, NXC et al.
Three bounded Ocean indicators, the first two you already got, the third one is an improved version (thus "x" suffix) of the original with the option to mark zero hits.
Original NDX, NST, NXC on TradeStation:
http://img705.imageshack.us/img705/7306/ndxnstnxctradestation.png
Ocn_NDX, Ocn_NST, Ocn_NXCx on Metatrader:
http://img825.imageshack.us/img825/2768/ndxnstnxcmetatrader.png
Original size screenshots:
http://img802.imageshack.us/img802/7306/ndxnstnxctradestation.png
http://img402.imageshack.us/img402/2768/ndxnstnxcmetatrader.png
However, you don't actually need these three indis at all, because I've combined them all into a single Ocn_NDXNSTNXCx indi, which can:
show NDX, NST, NXC
show NXC zero hits
show a common NDX&NST's NMA
turn on/off each of these 5 elements individually (so you can for example show NDX and NXC's zero hits without even showing NXC itself)
As for the NMA, you have 4 options there to adjust it:
the period of NMA
you can choose whether it should be regular or fast NMA
if fast then what would be the minimal lookback
pre-smoothing the data before entering NMA
The default settings is: period 20, regular NMA, pre-smoothing 1 (means no smoothing). As I mentioned I don't know what should be the default settings, I don't even exactly know how this NMA should be calculated from NDX&NST, however after countless studying the videos and testing and trying I found this settings as somewhat, more or less, give or take, remotely similar to what they have. No guarantee (most probably it's not right) :)
Also, I have done another few changes:
Ocn_NMA_Price_Osc improved into Ocn_NMA_Price_Oscx: added all SD band lines
all indis with SD band lines got a third SD band line in the middle, optional of course
when zero hit was detected the SD bands were zeroed; this is now optional and can be turned on/off
all indis have versions now
Now the full list of Ocean Classic library (worth $4,995.00) includes:
Ocn_NMAx
Ocn_NMA_Price_Oscx
Ocn_NMA_SD_Band_Osc (orig, keeping this version for compatibility because the improved one got a shifted scale)
Ocn_NMA_SD_Band_Oscx
Ocn_NMA_SD_Band_Width (orig)
Ocn_NMM_X-Ray_1 (orig)
Ocn_NMM_X-Ray_2 (orig, didn't get any idea what to improve on these last three)
Ocn_NMM_Ocean_Indexx
Ocn_NMMx
Ocn_NMM_MACDx
Ocn_NMM_ROCx
Ocn_NMRx
Ocn_NMSx
Ocn_NMCx
Ocn_NMC2x
Ocn_NDX
Ocn_NST
Ocn_NXCx
Ocn_NDXNSTNXCx
Note: I didn't implement all original options and features, namely those functions showing historical overbought/oversold levels etc. They never demonstrated nor commented it in any video so I just haven't found it worth an effort. It can be implemented if needed, though.
http://uloz.to/xeTvGZd/ocn-classic-7z
digian: maybe you could make again the "full bundle" package?
Now it's finally time for BTX/STX.
-
kolikol reacted to udc in Ocean Theory indis from TSD elite
Ocn_NDX for MT4
Here goes Ocn_NDX - first of three bounded Ocean indicators.
Original Ocn_NDX on TradeStation:
http://img18.imageshack.us/img18/4526/ndxtradestation.png
Ocn_NDX on Metatrader:
http://img269.imageshack.us/img269/4003/ndxmetatrader.png
Original size screenshots:
http://img138.imageshack.us/img138/4526/ndxtradestation.png
http://img27.imageshack.us/img27/4003/ndxmetatrader.png
#property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Red #property indicator_level1 0 #property indicator_level2 50 #property indicator_level3 -50 #property indicator_levelcolor Gray #property indicator_levelstyle 2 extern int NDX_period = 40; extern int SmLen = 20; double NDX[]; double RawNDX[]; int init() { if(SmLen < 10) SmLen = 10; else if(SmLen > 30) SmLen = 30; string ndxname = "NDX(" + NDX_period + ")"; IndicatorShortName(ndxname); IndicatorDigits(0); IndicatorBuffers(2); SetIndexBuffer(0, NDX); SetIndexLabel(0, ndxname); SetIndexBuffer(1, RawNDX); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); if(Bars <= NDX_period + 3*SmLen) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > NDX_period) limit = Bars - counted_bars; else limit = Bars - NDX_period - 1; for(i = limit; i >= 0; i--) { double SumWght = 0, SumDnom = 0, DifAry, DnomAry, FracAry, TimeAry, WgtAry; for(ii = 1; ii <= NDX_period; ii++) { DifAry = MathLog(Close[i+ii-1]) - MathLog(Close[i+ii]); if(ii == 1) DnomAry = MathAbs(DifAry); else DnomAry += MathAbs(DifAry); if(DnomAry == 0) FracAry = 0; else FracAry = (MathLog(Close[i]) - MathLog(Close[i+ii])) / DnomAry; TimeAry = 1 / MathPow(ii, 0.5); WgtAry = FracAry * TimeAry; SumWght += WgtAry; SumDnom += TimeAry; } RawNDX[i] = 100 * SumWght / SumDnom; } double ExpSmooth = 2, XAvg1, XAvg2, XAvg3, TemaNDX; ExpSmooth = ExpSmooth / (SmLen + 1); for(i = Bars - NDX_period - 1; i >= 0; i--) { XAvg1 += ExpSmooth * (RawNDX[i] - XAvg1); XAvg2 += ExpSmooth * (XAvg1 - XAvg2); XAvg3 += ExpSmooth * (XAvg2 - XAvg3); TemaNDX = 3 * XAvg1 - 3 * XAvg2 + XAvg3; if(i < Bars - NDX_period - 1 - 3*SmLen) { if(TemaNDX > 90) NDX[i] = MathRound(90 + (TemaNDX - 90) / 2); else if(TemaNDX < -90) NDX[i] = MathRound(-90 - (MathAbs(TemaNDX) - 90) / 2); else NDX[i] = MathRound(TemaNDX); } } return(0); }
The source code is also available for download here:
http://pastebin.com/DRuAK9GY
-
kolikol reacted to udc in Ocean Theory indis from TSD elite
Ocn_NST for MT4
Ocn_NST.
Discrepancies from the TradeStation are due to the different price feed, the math is identical. It calculates ranges using highest high and lowest low so the result is highly affected by the spikes and how much the broker averages them.
Original Ocn_NST on TradeStation:
http://img827.imageshack.us/img827/5014/ocnnsttradestation.png
Ocn_NST on Metatrader:
http://img707.imageshack.us/img707/2519/ocnnstmetatrader.png
Original size screenshots:
http://img444.imageshack.us/img444/5014/ocnnsttradestation.png
http://img217.imageshack.us/img217/2519/ocnnstmetatrader.png
#property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Red #property indicator_level1 0 #property indicator_level2 50 #property indicator_level3 -50 #property indicator_levelcolor Gray #property indicator_levelstyle 2 extern int NST_period = 20; extern int SmLen = 10; double NST[]; double RawNST[]; int init() { if(SmLen < 5) SmLen = 5; else if(SmLen > 15) SmLen = 15; string nstname = "NST(" + NST_period + ", " + SmLen + ")"; IndicatorShortName(nstname); IndicatorDigits(0); IndicatorBuffers(2); SetIndexBuffer(0, NST); SetIndexLabel(0, nstname); SetIndexBuffer(1, RawNST); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); if(Bars <= NST_period + 3*SmLen) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > NST_period) limit = Bars - counted_bars; else limit = Bars - NST_period - 1; for(i = limit; i >= 0; i--) { double SumWgt = 0, SumDnom = 0, HghAry, LowAry, RngAry, FrcAry, TmeAry, WgtAry; for(ii = 0; ii <= NST_period; ii++) { HghAry = iHigh(NULL, 0, iHighest(NULL, 0, MODE_HIGH, ii, i)); LowAry = iLow(NULL, 0, iLowest(NULL, 0, MODE_LOW, ii, i)); RngAry = HghAry - LowAry; if(RngAry == 0) FrcAry = 0; else FrcAry = (Close[i] - LowAry) / RngAry; TmeAry = 1 / MathPow(ii+1, 0.5); WgtAry = TmeAry * FrcAry; SumWgt += WgtAry; SumDnom += TmeAry; } RawNST[i] = (200 * SumWgt / SumDnom) - 100; } double ExpSmooth = 2, XAvg1, XAvg2, XAvg3, TemaNST; ExpSmooth = ExpSmooth / (SmLen + 1); for(i = Bars - NST_period - 1; i >= 0; i--) { XAvg1 += ExpSmooth * (RawNST[i] - XAvg1); XAvg2 += ExpSmooth * (XAvg1 - XAvg2); XAvg3 += ExpSmooth * (XAvg2 - XAvg3); TemaNST = 3 * XAvg1 - 3 * XAvg2 + XAvg3; if(i < Bars - NST_period - 1 - 3*SmLen) { if(TemaNST > 85) NST[i] = MathRound(85 + (TemaNST - 85) / 2); else if(TemaNST < -85) NST[i] = MathRound(-85 - (MathAbs(TemaNST) - 85) / 2); else NST[i] = MathRound(TemaNST); } } return(0); }
The source code is also available for download here:
http://pastebin.com/HECMnLvB
-
kolikol reacted to udc in Ocean Theory indis from TSD elite
resume
Ok, so what I have actually done:
renamed NMA_Price_Osc to Ocn_NMA_Price_Osc
renamed NMA_SD_Band_Width to Ocn_NMA_SD_Band_Width
renamed NMM_X-Ray_1 to Ocn_NMM_X-Ray_1
renamed NMM_X-Ray_2 to Ocn_NMM_X-Ray_2
renamed NMA_SD_Band_Osc to Ocn_NMA_SD_Band_Osc (my improved version has different scale so I am keeping the original version too)
improved NMA_SD_Band_Osc into Ocn_NMA_SD_Band_Oscx
improved NMM_Ocean_Index into Ocn_NMM_Ocean_Indexx
improved NMM_ROC into Ocn_NMM_ROCx
improved NMR into Ocn_NMRx
improved NMA and Fast_NMA and combined both into a single Ocn_NMAx
improved NMC and NMC_with_Ocn_MAs and combined both into a single Ocn_NMCx
improved NMC2 and NMC2_with_Ocn_MAs and combined both into a single Ocn_NMC2x
improved NMM and NMM_with_Ocn_MAs and combined both into a single Ocn_NMMx
improved NMM_MACD and NMM_MACD_with_Ocn_MAs and combined both into a single Ocn_NMM_MACDx
improved NMS and NMS_with_Ocn_MAs and combined both into a single Ocn_NMSx
If you did the same you would end up with 15 indicators. If not, you can download them from here:
http://uloz.to/xTwJmMJ/ocn-7z
Now I can finally get to NDX, NST and NXC, and then see about BTX/STX buddies.
-
kolikol reacted to udc in Ocean Theory indis from TSD elite
NMM for MT4
Now NMM itself.
NMM is basically an average of Ocean Indexes with lookback from 1 to n, where n is NMM_period (40 by default).
So for example NMM(5) would be:
( OceanIndex(1) + OceanIndex(2) + OceanIndex(3) + OceanIndex(4) + OceanIndex(5) ) / 5
Original NMM on TradeStation:
http://img835.imageshack.us/img835/8959/nmmtradestation.png
NMM on Metatrader:
http://img820.imageshack.us/img820/5751/nmmmetatrader.png
Original size screenshots:
http://img833.imageshack.us/img833/8959/nmmtradestation.png
http://img20.imageshack.us/img20/5751/nmmmetatrader.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_period = 40; 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(" + NMM_period + ")"; string sdname = "NMM_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, 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 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; } if(Show_SD) for(i = limit; i >= 0; i--) if(i < Bars - NMM_period - 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/K86AJkEE
For now I am showing the Ocean indis on the same chart for reference.
-
kolikol reacted to udc in Ocean Theory indis from TSD elite
NMC_with_Ocn_MAs for MT4
..and an older brother NMC_with_Ocn_MAs.
Original NMC_with_Ocn_MAs on TradeStation:
http://img43.imageshack.us/img43/6556/nmcwithocnmastradestati.png
NMC_with_Ocn_MAs on Metatrader:
http://img220.imageshack.us/img220/7998/nmcwithocnmasmetatrader.png
Original size screenshots:
http://img210.imageshack.us/img210/6556/nmcwithocnmastradestati.png
http://img822.imageshack.us/img822/7998/nmcwithocnmasmetatrader.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 NMC_period = 40; extern int NMA_period = 40; extern int NMA_LB_min = 8; double NMC[]; double NMC_NMA[]; double NMC_FastNMA[]; int init() { IndicatorShortName("NMC_with_Ocn_MAs(" + NMC_period + ", " + NMA_period + ", " + NMA_LB_min + ")"); IndicatorBuffers(3); SetIndexBuffer(0, NMC); SetIndexLabel(0, "NMC(" + NMC_period + ")"); SetIndexBuffer(1, NMC_NMA); SetIndexLabel(1, "NMC_NMA(" + NMA_period + ")"); SetIndexBuffer(2, NMC_FastNMA); SetIndexLabel(2, "NMC_FastNMA(" + NMA_period + ", " + NMA_LB_min + ")"); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); double nmm, nmr, nmm2, nmr2, avg, sign, sum, abssum, ratio, nmcnum, maxnmc; if(Bars <= NMC_period) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > NMC_period) limit = Bars - counted_bars; else limit = Bars - NMC_period - 1; for(i = limit; i >= 0; i--) { nmm2 = 0; nmr2 = 0; for(ii = 1; ii <= NMC_period; ii++) { nmm2 += (MathLog(Close[i]) - MathLog(Close[i+ii])) / MathSqrt(ii); nmr2 += (MathLog(Close[i+ii-1]) - MathLog(Close[i+ii])) * (MathSqrt(ii) - MathSqrt(ii-1)); } nmm = (nmm2 / NMC_period) * 1000; nmr = nmr2 * 1000; avg = ((MathAbs(nmm) * nmr) + (MathAbs(nmr) * nmm)) / 2; if(avg > 0) sign = 1; else if(avg < 0) sign = -1; else sign = 0; NMC[i] = sign * MathSqrt(MathAbs(avg)); } for(i = limit; i >= 0; i--) if(i < Bars - NMC_period - 1 - NMA_period) { ratio = 0; sum = (NMC[i] - NMC[i+1]) + (NMC[i+1] - NMC[i+2]) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_period; ii++) sum += (NMC[i+ii] - NMC[i+ii+1]) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_period; ii++) sum += MathAbs(NMC[i+ii] - NMC[i+ii+1]); if(sum != 0) ratio = abssum / sum; NMC_NMA[i] = NMC_NMA[i+1] + (NMC[i] - NMC_NMA[i+1]) * ratio; } for(i = limit; i >= 0; i--) if(i < Bars - NMC_period - 1 - NMA_period) { maxnmc = 0; ratio = 0; int NMA_LB_max; for(ii = 1; ii <= NMA_period; ii++) { nmcnum = (NMC[i] - NMC[i+ii]) / MathSqrt(ii); if(MathAbs(nmcnum) > maxnmc) { maxnmc = MathAbs(nmcnum); NMA_LB_max = ii; } } if(NMA_LB_max < NMA_LB_min) NMA_LB_max = NMA_LB_min; sum = (NMC[i] - NMC[i+1]) + (NMC[i+1] - NMC[i+2]) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_LB_max; ii++) sum += (NMC[i+ii] - NMC[i+ii+1]) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_LB_max; ii++) sum += MathAbs(NMC[i+ii] - NMC[i+ii+1]); if(sum != 0) ratio = abssum / sum; NMC_FastNMA[i] = NMC_FastNMA[i+1] + (NMC[i] - NMC_FastNMA[i+1]) * ratio; } return(0); }
The source code is also available for download here:
http://pastebin.com/hU8hazhx
-
kolikol reacted to udc in Ocean Theory indis from TSD elite
NMC2_with_Ocn_MAs for MT4
NMC2_with_Ocn_MAs.
Original NMC2_with_Ocn_MAs on TradeStation:
http://img834.imageshack.us/img834/7189/nmc2withocnmastradestat.png
NMC2_with_Ocn_MAs on Metatrader:
http://img31.imageshack.us/img31/6079/nmc2withocnmasmetatrade.png
Original size screenshots:
http://img17.imageshack.us/img17/7189/nmc2withocnmastradestat.png
http://img534.imageshack.us/img534/6079/nmc2withocnmasmetatrade.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 NMC2_period = 40; extern bool Use_NMR_instead_NMM = false; extern int NMA_period = 40; extern int NMA_LB_min = 8; double NMC2[]; double NMC2_NMA[]; double NMC2_FastNMA[]; int init() { string whichone = "NMM"; if(Use_NMR_instead_NMM) whichone = "NMR"; IndicatorShortName("NMC2_with_Ocn_MAs(" + NMC2_period + ", using " + whichone + ", " + NMA_period + ", " + NMA_LB_min + ")"); IndicatorBuffers(3); SetIndexBuffer(0, NMC2); SetIndexLabel(0, "NMC2(" + NMC2_period + ", using " + whichone + ")"); SetIndexBuffer(1, NMC2_NMA); SetIndexLabel(1, "NMC2_NMA(" + NMA_period + ")"); SetIndexBuffer(2, NMC2_FastNMA); SetIndexLabel(2, "NMC2_FastNMA(" + NMA_period + ", " + NMA_LB_min + ")"); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); double nms, nmm, nmr, nms2, nmm2, nmr2, whichone, avg, sign, sum, abssum, ratio, nmc2num, maxnmc2; if(Bars <= NMC2_period) return(0); if(counted_bars < 0) counted_bars = 0; if(counted_bars > NMC2_period) limit = Bars - counted_bars; else limit = Bars - NMC2_period - 1; for(i = limit; i >= 0; i--) { nms2 = 0; nmm2 = 0; nmr2 = 0; for(ii = 1; ii <= NMC2_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); nmm2 += (MathLog(Close[i]) - MathLog(Close[i+ii])) / MathSqrt(ii); nmr2 += (MathLog(Close[i+ii-1]) - MathLog(Close[i+ii])) * (MathSqrt(ii) - MathSqrt(ii-1)); } nms = nms2 * 100; nmm = (nmm2 / NMC2_period) * 1000; nmr = nmr2 * 1000; if(Use_NMR_instead_NMM) whichone = nmr; else whichone = nmm; avg = ((MathAbs(nms) * whichone) + (MathAbs(whichone) * nms)) / 2; if(avg > 0) sign = 1; else if(avg < 0) sign = -1; else sign = 0; NMC2[i] = sign * MathSqrt(MathAbs(avg)); } for(i = limit; i >= 0; i--) if(i < Bars - NMC2_period - 1 - NMA_period) { ratio = 0; sum = (NMC2[i] - NMC2[i+1]) + (NMC2[i+1] - NMC2[i+2]) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_period; ii++) sum += (NMC2[i+ii] - NMC2[i+ii+1]) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_period; ii++) sum += MathAbs(NMC2[i+ii] - NMC2[i+ii+1]); if(sum != 0) ratio = abssum / sum; NMC2_NMA[i] = NMC2_NMA[i+1] + (NMC2[i] - NMC2_NMA[i+1]) * ratio; } for(i = limit; i >= 0; i--) if(i < Bars - NMC2_period - 1 - NMA_period) { maxnmc2 = 0; ratio = 0; int NMA_LB_max; for(ii = 1; ii <= NMA_period; ii++) { nmc2num = (NMC2[i] - NMC2[i+ii]) / MathSqrt(ii); if(MathAbs(nmc2num) > maxnmc2) { maxnmc2 = MathAbs(nmc2num); NMA_LB_max = ii; } } if(NMA_LB_max < NMA_LB_min) NMA_LB_max = NMA_LB_min; sum = (NMC2[i] - NMC2[i+1]) + (NMC2[i+1] - NMC2[i+2]) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_LB_max; ii++) sum += (NMC2[i+ii] - NMC2[i+ii+1]) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_LB_max; ii++) sum += MathAbs(NMC2[i+ii] - NMC2[i+ii+1]); if(sum != 0) ratio = abssum / sum; NMC2_FastNMA[i] = NMC2_FastNMA[i+1] + (NMC2[i] - NMC2_FastNMA[i+1]) * ratio; } return(0); }
The source code is also available for download here:
http://pastebin.com/F2H6tjXV
-
kolikol 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.
-
kolikol 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
-
kolikol 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
-
kolikol reacted to udc in Ocean Theory indis from TSD elite
NMM_MACD_with_Ocn_MAs for MT4
NMM_MACD_with_Ocn_MAs. Again bug in FastNMA TS source code.
Now the 3 lines in the chart are calculated like this:
magenta: Price -> NMM -> NMA -> (NMM-NMA) yellow: Price -> NMM -> NMA -> (NMM-NMA) -> NMA blue: Price -> NMM -> NMA -> (NMM-NMA) -> FastNMA
Original NMM_MACD_with_Ocn_MAs on TradeStation:
http://img713.imageshack.us/img713/6022/nmmmacdwithocnmastrades.png
NMM_MACD_with_Ocn_MAs on Metatrader:
http://img26.imageshack.us/img26/7956/nmmmacdwithocnmasmetatr.png
Original size screenshots:
http://img194.imageshack.us/img194/6022/nmmmacdwithocnmastrades.png
http://img140.imageshack.us/img140/7956/nmmmacdwithocnmasmetatr.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_MACD_period = 40; extern int NMA_period = 40; extern int NMA_LB_min = 8; double NMM_MACD[]; double NMM_MACD_NMA[]; double NMM_MACD_FastNMA[]; double NMM[]; double NMM_MA[]; int init() { IndicatorShortName("NMM_MACD_with_Ocn_MAs(" + NMM_MACD_period + ", " + NMA_period + ", " + NMA_LB_min + ")"); IndicatorBuffers(5); SetIndexBuffer(0, NMM_MACD); SetIndexLabel(0, "NMM_MACD(" + NMM_MACD_period + ")"); SetIndexBuffer(1, NMM_MACD_NMA); SetIndexLabel(1, "NMM_MACD_NMA(" + NMA_period + ")"); SetIndexBuffer(2, NMM_MACD_FastNMA); SetIndexLabel(2, "NMM_MACD_FastNMA(" + NMA_period + ", " + NMA_LB_min + ")"); SetIndexBuffer(3, NMM); SetIndexBuffer(4, NMM_MA); return(0); } int start() { int limit, i, ii, counted_bars = IndicatorCounted(); double nmm2, sum, abssum, ratio, nmmnum, maxnmm; 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]; } for(i = limit; i >= 0; i--) if(i < Bars - 2*NMM_MACD_period - 1 - NMA_period) { ratio = 0; sum = (NMM_MACD[i] - NMM_MACD[i+1]) + (NMM_MACD[i+1] - NMM_MACD[i+2]) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_period; ii++) sum += (NMM_MACD[i+ii] - NMM_MACD[i+ii+1]) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_period; ii++) sum += MathAbs(NMM_MACD[i+ii] - NMM_MACD[i+ii+1]); if(sum != 0) ratio = abssum / sum; NMM_MACD_NMA[i] = NMM_MACD_NMA[i+1] + (NMM_MACD[i] - NMM_MACD_NMA[i+1]) * ratio; } for(i = limit; i >= 0; i--) if(i < Bars - 2*NMM_MACD_period - 1 - NMA_period) { maxnmm = 0; ratio = 0; int NMA_LB_max; for(ii = 1; ii <= NMA_period; ii++) { nmmnum = (NMM_MACD[i] - NMM_MACD[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_MACD[i] - NMM_MACD[i+1]) + (NMM_MACD[i+1] - NMM_MACD[i+2]) * (MathSqrt(2)-1); for(ii = 2; ii < NMA_LB_max; ii++) sum += (NMM_MACD[i+ii] - NMM_MACD[i+ii+1]) * (MathSqrt(ii+1) - MathSqrt(ii)); abssum = MathAbs(sum); sum = 0; for(ii = 0; ii < NMA_LB_max; ii++) sum += MathAbs(NMM_MACD[i+ii] - NMM_MACD[i+ii+1]); if(sum != 0) ratio = abssum / sum; NMM_MACD_FastNMA[i] = NMM_MACD_FastNMA[i+1] + (NMM_MACD[i] - NMM_MACD_FastNMA[i+1]) * ratio; } return(0); }
The source code is also available for download here:
http://pastebin.com/atG6n9x0
Next one will be NMC.