Amibroker - Learning how to use

mindgames

Well-Known Member
#2
Ref function

This function is helpful to refer to past / future elements of an array

# SYNTAX: Ref (Array, period)
# Array could be pre-defined fields like Price, Volume etc.
# Period: If the no. is +ve, it refers to future. If it is -ve, refers to past period
# Period can either be a no. or a variable already defined in the AFL

Eg. Ref ( Close, -20) would return closing price from 20 bars ago.
 

mindgames

Well-Known Member
#3
Stock splits

1. Select your scrip
2. Symbol > Split
3. Enter ex-date
4. Enter ratio (New shares : Old Shares)

Eg. if 2 shares are issued for 5 shares held, ratio will be 7:5 [New : Old]
 

vijkris

Learner and Follower
#4
Stock splits

1. Select your scrip
2. Symbol > Split
3. Enter ex-date
4. Enter ratio (New shares : Old Shares)

Eg. if 2 shares are issued for 5 shares held, ratio will be 7:5 [New : Old]
Sorry to interrupt , if u select split it will detect automatically the date as well as the ratio.
u can use find next button to scan for any other probable date also.
usually there will be a large gap on the split day, so it detects that location automatically.
Btw the method u mentioned is also correct.
 

mindgames

Well-Known Member
#5
Sorry to interrupt , if u select split it will detect automatically the date as well as the ratio.
u can use find next button to scan for any other probable date also.
usually there will be a large gap on the split day, so it detects that location automatically.
Btw the method u mentioned is also correct.
No need to be apologetic.

Yes, only issue is sometimes I have found that amibroker incorrectly notices a split (eg. Huge price swing).

Also, better to confirm with another source before giving effect to split.
 

amitrandive

Well-Known Member
#6
Stock splits

1. Select your scrip
2. Symbol > Split
3. Enter ex-date
4. Enter ratio (New shares : Old Shares)

Eg. if 2 shares are issued for 5 shares held, ratio will be 7:5 [New : Old]
From Amibroker manual

Split
Allows you to perform stock split. AmiBroker provides easy way of handling stock splits. Program will try to guess split date and ratio by analyzing quotations. If there is just a single quotation after split this should work, if not you will be asked for split date and ratio. You can specify a split using following expression: x->y which means that x shares before split become y after it. For example 2->3 means that 2 shares become 3 after the split. It is also possible to perform reverse-split, for example 2->1, which means that 2 shares are joined together into 1 share.
 

amitrandive

Well-Known Member
#7
Sorry to interrupt , if u select split it will detect automatically the date as well as the ratio.
u can use find next button to scan for any other probable date also.
usually there will be a large gap on the split day, so it detects that location automatically.
Btw the method u mentioned is also correct.
Absolutely right.

You need to check if a stock has really split or is there a huge gap down in price action.

:thumb:
 

mindgames

Well-Known Member
#8
PlotGrid function

# Syntax: PlotGrid(level,color=colorDefault,pattern=1,width=1,Label=True)
# This function helps to plot a horizontal grid-line on the chart at desired level.
# Level is the no./level where you want to place the line
# Color refers to the line's color - need not use "color=colorRed" (refer eg. below)
# Pattern refers to line type (dotted, dashed etc)
# Width is for line thickness
# Label = true/false determines whether that level should be named on the chart.

Eg. Suppose, in the ADX formula you want to place a constant line at a reading of 25, we will insert the following in the formula.

PlotGrid(25,colorBlack,9,1,False);
Here: 9,1 and False are pattern, width and label respectively - this is a shortcut for using the syntax
 

mindgames

Well-Known Member
#9
SetChartOptions function

# Syntax: SetChartOptions(Mode=0, Flags=0, gridFlags=chartGridMiddle, ymin=0, ymax=0, blankbars=0 )
# Helps to make many modifications to the chart:
# Eg. The default ichimoku chart in Amibroker does not show the period. Can use the following code to show dates on any of your charts it it is missing.

SetChartOptions(0,chartShowDates);
 

mindgames

Well-Known Member
#10
Want to add some bar-space to the right of your chart?

1. Temporary: Click on your chart, press End key - 10 bars are added every time you press it OR
2. Permanent: Tools > Preferences > Charting > Blank Bars in Right > Change OR
3. Formula: Use SetChartOptions function (refer post # 11 - Credits: Trash)
 
Last edited:

Similar threads

Zerodha – Open Paperless Account

Open online account with Zerodha. Free delivery trading and Max Rs 20 for Intraday, F&O, Currency and Commodity Trading. Intraday High leverage with MIS, CO and BO.

Name:Phone:
Email:City:
State:
Are you a day trader?