Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

FVE and NXC for Amibroker (AFL)

Copy & Paste Friendly
_SECTION_BEGIN("FVE");
/* Volatility modified FVE chart 
** plus Volatility color-coded Volume chart + trading system
** TJ for S&C Traders Tips Sep 2003,
*/
Period = Param("Period for FVE", 24, 5, 80, 1 );
Coeff = Param("Coeff for Cutoff", 0.1, 0, 2, 0.01 );
intra=log(H)-log(L);
Vintra = StDev(intra, period );
inter = log(Avg)-log(Ref(Avg,-1));
Vinter = StDev(inter,period);
Cutoff = Coeff * (Vinter+Vintra)*C;
MF = C- (H+L)/2 + Avg - Ref( Avg, -1 );
VC = IIf( MF > Cutoff, V,
IIf( MF < -Cutoff, -V, 0 ));
FVE = 100 * Sum( VC, Period )/(MA( V, Period ) * Period );
Plot( FVE, "Modified FVE", colorRed, styleThick );
// volatility color-coded volume bars:
BarColor =
IIf( MF > Cutoff,  colorGreen, /* up volume */
IIf( MF < -Cutoff, colorRed, /* down volume */
                   colorBlue /*otherwise*/ ));
//Plot( Volume, "Volume", BarColor, styleHistogram | styleThick | styleOwnScale );
/* Trading system */
SetTradeDelays(0,0,0,0);
PositionSize = 10000; // fixed position size - remove to enable compounding
RoundLotSize = 10;
BuyPrice = Close; SellPrice = Close;
RAD_TO_DEG = 180/3.1415926; // radians to degrees
LinRegAngleFVE = RAD_TO_DEG * atan( LinRegSlope( FVE, 20 ) );
Buy = FVE < 10 AND
FVE > -20 AND
LinRegAngleFVE > 30 AND
FVE > EMA( FVE, 40 ) AND
LinRegSlope( C, 30 ) < Ref(C, -30 ) *0.6/100 AND
LinRegSlope( C, 30 ) > -Ref( C, -30 ) * 0.3/100;
Sell = LinRegAngleFVE < -30;

Short = Sell;
Cover = Buy;
_SECTION_END();

Plot( 60, "", colorwhite, styleThick );
Plot( 0, "", colorwhite, styleThick );
Plot( -60, "", colorwhite, styleThick );

//SetChartBkColor(ParamColor("Panel Color",colorBlack));
//SetChartBkGradientFill(ParamColor("Upper Chart",colorBlack),ParamColor("Lower Chart",colorBlack));


_SECTION_BEGIN("Ocean Theory");
NDX_period          = Param("NDX Period",75,40,375);
NDX_SmLen           = round(NDX_Period*20/40);

NST_period          = round(NDX_Period*20/40);
NST_SmLen           = round(NDX_Period*10/40);





SumWght = 0;
SumDnom = 0;

    for(i = 1; i < NDX_period+1; i++)
      {
      DifAry = ln(Ref(Close,-i+1)) - ln(Ref(Close,-i));
      if(i == 1) 
		DnomAry = abs(DifAry); 
		else 
		DnomAry =DNomAry+ abs(DifAry);
	  FracAry =IIf(DNomAry==0, 0,(ln(Close) - ln(Ref(Close,-i))) / DnomAry);
      TimeAry = 1 / (i^( 0.5));
      WghtAry = FracAry * TimeAry;
      SumWght =SumWght+ WghtAry;
      SumDnom =SumDnom+ TimeAry;
      }
    RawNDX = 100 * SumWght / SumDnom;

    TemaNDX= TEMA(RawNDX,NDX_SmLen); 

	 SumWgt = 0;
		 SumDnm = 0;
 
    for(i = 0; i <NST_period+1; i++)
      {
      if(i < 2) 
		{
		HghAry = High;
		LowAry = Low; 
		} 
		HghAry = HHV(High, i);
		LowAry=LLV(Low,i);
	
      RngAry = HghAry - LowAry;
     
	   FrcAry =IIf(RngAry==0, 0,(Close- LowAry) / RngAry);
      TmeAry = 1 / ((i+1)^(0.5));
      WgtAry = TmeAry * FrcAry;
      SumWgt =SumWgt+ WgtAry;
      SumDnm =SumDnm+ TmeAry;
      }
    RawNST = Nz((200 * SumWgt / SumDnm) - 100);

    TemaNST= TEMA(RawNST,NST_SmLen); 

 
      NAvg = (abs(TemaNDX) * TemaNST + abs(TemaNST) * TemaNDX) / 2;
	   Nsign= IIf(NAvg>0,1,IIf(NAVG<0,-1,0));
 
      NXC =round(Nsign * sqrt(abs(NAvg)));


Plot(NXC,"NXC",coloryellow,styleLine|styleThick);
Back