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

IDX Fraction Price for Amibroker (AFL)

Rating:
5 / 5 (Votes 3)
Tags:
amibroker, ihsg, Indonesia, jakarta, jse, idx, fraksi, fraction

This function to calculate Fraction Price in Amibroker for Indonesia Stock Exchange Stocks

Indicator / Formula

Copy & Paste Friendly
//This function to calculate Fraction Price in Amibroker for Indonesia Stock Exchange Stocks

function FraksiPrice(price) 
{ 
	Fraksi = IIf(Price<200,1,IIf(Price>=200 AND Price <500,2,IIf(Price>=500 AND Price<2000,5,IIf(Price>=2000 AND Price<5000,10,25))));
	Result = Price - (Price%Fraksi);
	return result;
}

function PriceAdj(price,adj) 
{ 
	Fraksi = IIf(Price<200,1,IIf(Price>=200 AND Price <500,2,IIf(Price>=500 AND Price<2000,5,IIf(Price>=2000 AND Price<5000,10,25))));
	Result = Price + (Adj*Fraksi);
	return result;
}


// Example to calculate StopLoss with 2 ticks below MA20
StopLoss = PriceAdj(FraksiPrice(MA(C,20)),-2);

1 comments

1. iamilham88

mantap

Leave Comment

Please login here to leave a comment.

Back