Amibroker:Base Index,Composite: Help Needed!

AceX

Active Member
#1
Hi All,

I needed some very serious help on Amibroker. And I couldnt find anything of significance on net.

My questions are:

1. When you make a new market, in SYMBOL> Categories>Markets, what is the "Base Index for Relative Strength, Composites ad Beta mean"???

2. If I want to make a personal composite, mirroring a basket of stocks I follow, then how to do it?

3. How to find its risk yield map[the composite?]


Please, gurus, please show me this... I had been literally banging my head[and see, its bleeding now!]:D

AceX
 
#2
Hi All,

I needed some very serious help on Amibroker. And I couldnt find anything of significance on net.

My questions are:

1. When you make a new market, in SYMBOL> Categories>Markets, what is the "Base Index for Relative Strength, Composites ad Beta mean"???

2. If I want to make a personal composite, mirroring a basket of stocks I follow, then how to do it?

3. How to find its risk yield map[the composite?]


Please, gurus, please show me this... I had been literally banging my head[and see, its bleeding now!]:D

AceX
Dear AceX,

I will answer your questions with an example which should clear your doubts faster.

Suppose you are getting quotes for all stocks from NSE which are reflected in Market called 'NSE'. Now you are also getting quote for Nifty (index) but you want to know
1. what was the volume of Nifty,
2. how many issues in Nifty inclined / declined today
3. How was the performance of any particular stock of NIFTY w.r.t. its index

To do this :
1. First thing to do is declare the ticker which acts as index to be INDEX in AmiBroker. To do this : Symbol>>Information which opens up Information window and then under General tab, mark YES to the question, 'Is Index'. In our example, we will call this ticker as NSENIFTY. You may will have to restart AmiBroker to see it appearing under Index in Symbol window.
2. Then go to Symbol>>Categories and under market tab, create a new tab called NIFTY. Then for Relative Strength and Composites, you can select NSENIFTY from dropdown box. So far what we have done is, defined a ticker as index and created a special market whose base index for composites and RS is this ticker (NSENIFTY). Now we have to fill this new market NIFTY with appropriate tickers which make the index.
3. To do this, go to Symbol>>Organise assignments and select market radio button. Now from left side, select the market which is showing all quotes from NSE and on right hand side, select NIFTY (it will be empty now). Now select those stocks which comprise of nifty index from left hand side and move them to right hand side. You can select individual stocks by clicking on those stocks while CTRL button pressed and then pressing > button from 'Selected Section'. Once done close the window.
4. Now you are ready to see ADLine and other composites if any for NSENIFTY. Select ADLine Indicator from Charts Window under Drag-Drop section (View>>Charts if not already open) and insert the same into AmiBroker. It may be empty first time.
5. Now go to Symbol>>Calculate Composites and select 'number of advancing / declining issues' and 'volume for base index' from 'Calculate', 'all quotes' from 'apply to', NIFTY market from 'this market' and press Calculate button. ADLine should now be visible under the NSENIFTY chart. Close this. You have to do it first time and it follows everyday.



I hope this helps.

With regards,

AmiBroker-India
 
#3
Dear seniors,
in amibroker if keep the curser on the bar we can see open,high , low,close.but i can able to see value and close kindly guide me how to change to see O,H,L,C IN EACH BAR,
Thanx..
siva2005
 

AceX

Active Member
#4
Man... Amirbroker!

Thou rocketh!

Pranams and thank yous to you :)

Darn, I couldnt spot 'Thanks' button but be please be assured that you have helped me a lot.

Now coming to the second point. How to design an index[or in other words a portfolio] and do the appropriate in Amibroker.

Thanks for all the help!
AceX
 
#6
Dear Acex
If keep the cursor on the price bar or candlesticks we can check each 5minute bar open value,high,low,close value but in my system date,time and only close value.I coudn't see the open,high,low,close values for each bar.
siva2005
 

AceX

Active Member
#7
Do you know AFL, then it will be helpful.

Right click in the price window and edit formula.

Edit the part of the code which looks like this if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) ) to the code below:

if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));
}

!!!!Caution save it as a different formula, so that you can revert back to the old formula if anything goes wrong.

if AFL is known, it will be helpful
AceX
 
#8
Dear AceX,

I will answer your questions with an example which should clear your doubts faster.

Suppose you are getting quotes for all stocks from NSE which are reflected in Market called 'NSE'. Now you are also getting quote for Nifty (index) but you want to know
1. what was the volume of Nifty,
2. how many issues in Nifty inclined / declined today
3. How was the performance of any particular stock of NIFTY w.r.t. its index

To do this :
1. First thing to do is declare the ticker which acts as index to be INDEX in AmiBroker. To do this : Symbol>>Information which opens up Information window and then under General tab, mark YES to the question, 'Is Index'. In our example, we will call this ticker as NSENIFTY. You may will have to restart AmiBroker to see it appearing under Index in Symbol window.
2. Then go to Symbol>>Categories and under market tab, create a new tab called NIFTY. Then for Relative Strength and Composites, you can select NSENIFTY from dropdown box. So far what we have done is, defined a ticker as index and created a special market whose base index for composites and RS is this ticker (NSENIFTY). Now we have to fill this new market NIFTY with appropriate tickers which make the index.
3. To do this, go to Symbol>>Organise assignments and select market radio button. Now from left side, select the market which is showing all quotes from NSE and on right hand side, select NIFTY (it will be empty now). Now select those stocks which comprise of nifty index from left hand side and move them to right hand side. You can select individual stocks by clicking on those stocks while CTRL button pressed and then pressing > button from 'Selected Section'. Once done close the window.
4. Now you are ready to see ADLine and other composites if any for NSENIFTY. Select ADLine Indicator from Charts Window under Drag-Drop section (View>>Charts if not already open) and insert the same into AmiBroker. It may be empty first time.
5. Now go to Symbol>>Calculate Composites and select 'number of advancing / declining issues' and 'volume for base index' from 'Calculate', 'all quotes' from 'apply to', NIFTY market from 'this market' and press Calculate button. ADLine should now be visible under the NSENIFTY chart. Close this. You have to do it first time and it follows everyday.



I hope this helps.

With regards,

AmiBroker-India
dear friend,
i follwed all the steps for plotting ad line for nifty still no sucess everthing goes fine till step 4 on step 5 my ad line is still blank
i am new and i learning things
can u help to plot ad line
the forumla for ad line in my ami is shown below
i can veiw it by right clicking and edit formulae
is there anthing wrong in the formula
if so can u tell me to rectify it

_SECTION_BEGIN("ADLine");
Plot( ADLine(), _DEFAULT_NAME(), ParamColor("Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

thank u
exp ur help
 
#9
dear friend,
i follwed all the steps for plotting ad line for nifty still no sucess everthing goes fine till step 4 on step 5 my ad line is still blank
i am new and i learning things
can u help to plot ad line
the forumla for ad line in my ami is shown below
i can veiw it by right clicking and edit formulae
is there anthing wrong in the formula
if so can u tell me to rectify it

_SECTION_BEGIN("ADLine");
Plot( ADLine(), _DEFAULT_NAME(), ParamColor("Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

thank u
exp ur help
Hello,

Sorry for replying late as I do not log in to traderji very often.

The process given above works. I do not know how you did it. If you want, I can take control of your PC and show how to do it online to you. So in case you are interested, send me a pm of your email id and I will do the needful for you.

Regards,

AmiBroker-India
 
Last edited:
#10
Hello,

I am a newbie on this forum and also at amibroker.
I would like to backtest a strategy on the us sock which is the following:

entries:
enter long when a 52 week high (260 trading days) is reached min price per share=$15
enter short when a 52 week low(260 trading days) is reached min price per share=$8

exits:
exit long when the price closes below the EMA 100
exit short when the price closes above the EMA 50

stops

2atr (20 days) above entry price for long
2 atr (20 days) below entry price for short

position sizing:
risk 1% per trade of total equity with quantity= (risk in dollars)/(2atr(20))

The heat of total portfolio cannot exceed 20% for long 20% for short and 30 for both.


I have started to write dowon the basic entry and exit rules but cannot manage to code position sizing parameters.

Thank you very much for you help

Florian

Versailles

France
 

Similar threads