Australian (ASX) Stock Market Forum

Amibroker FAQ

Hi guys, I've been trading currency futures with AmiBroker, but having problem displaying JPY quotes on the axis, as it is currently limited to 4 decimal places, so I just get 0.0092 0.0092 0.0092...etc :(

Anyone know how I can change this so it either displays the full 0.009250 or display as 92.50?

Thanks
 
Hi guys, I've been trading currency futures with AmiBroker, but having problem displaying JPY quotes on the axis, as it is currently limited to 4 decimal places, so I just get 0.0092 0.0092 0.0092...etc :(

Anyone know how I can change this so it either displays the full 0.009250 or display as 92.50?

Thanks

Plot this as an indicator and close the main price pane:

Code:
GraphXSpace = 10;
Plot(C*10000,"",colorBlack,styleNoLine|styleNoLabel);
PlotOHLC(O*10000,H*10000,L*10000,C*10000,"Yen Futures",colorBlack,styleBar|styleNoRescale);
 

Attachments

  • 1pic.jpg
    1pic.jpg
    60.9 KB · Views: 9
Wayne, perhaps you might have an idea with this question I posted a few pages before...

Currently I use IB with AB, have been attempting to run multiple instances of AB, sometimes successful sometimes not, by not I mean that it just wouldn't connect to IB. The times when it works (with same database) I can have up to 4 instances open which is great so I don't have to change layouts all the time.

Any idea to configure this to allow more than 4 instances at the one time with IB?

Thanks
 
No ideas there NAsX,

I only ever have 2 instances open but with different data sources.
 
Here is the title code from the default price chart,

Code:
_N(Title = StrFormat("{{NAME}} - {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));

So right now it displays the percentage change, is it possible to change this to display points change? eg. 0.0005, 0.25...etc.

Thanks.
 
You mean the % change in closing price?

To change it to a fraction, divide the last value by 100:

SelectedValue( ROC( C, 1 )) / 100

You'll also want to change the format to display more digits and remove the % sign:

Close %g (%.3f)

GP
 
You mean the % change in closing price?

To change it to a fraction, divide the last value by 100:

SelectedValue( ROC( C, 1 )) / 100

You'll also want to change the format to display more digits and remove the % sign:

Close %g (%.3f)

GP

Thanks for the reply GreatPig, sorry I wasn't clear in my original post. What I meant is a code that would allow me to get actual changes, for instance, the previous bar was5000, next bar goes to 5100, instead of the displaying 10%, I would like it to show 500, preferably still keep the percentage also.

The code I posted previously was from a modified version I copied from AB site, this is the generic one,
Code:
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

Further assistance would be greatly appreciated :)
 
the previous bar was5000, next bar goes to 5100, instead of the displaying 10%, I would like it to show 500
You mean to 5000 to 5500?

If you just want the close difference in actual dollars, then add another field something like this:

Close %g (%.2f, %.1f%%)

and then down the end:

L, C, C-Ref(C,-1), SelectedValue(ROC( C, 1 ))

GP
 
Calculating Volume based on Lower Timeframe

Hello All,

I've posted this question on another forum but wanted to ask it here as well in case someone can offer any help !!

When looking at a WEEKLY Timeframe, the volume line plotted is obviously the total volume made up from the corresponding 5 Days taken from the lower timeframe (Daily).

However, what I would like to do is plot 3 lines for Volume on the WEEKLY Timeframe as follows:

The 1st line would be the total volume over the last 5 Days (taken from Daily Timeframe) where the Close for each of the Daily Bars was HIGHER or EQUAL to its Open.

The 2nd line would be the total volume over the last 5 Days (taken from Daily Timeframe) where the Close for each of the Daily Bars was LOWER than the Open.

The 3rd line would simply be the total of the values from Lines 1 & 2. In otherwords, it would simply be the same value as the normal Weekly Volume.

The 3 lines would be plotted on the Weekly Timeframe.


I've been playing around with the TimeFrameSet and other Time based functions in AB in an attempt to achieve this but with little success.

Here is the code I have so far: I have commented out 2 lines as I just want to get the overall Volume indicator working !!!!!!

TimeFrameSet(inDaily);
upvolume = IIf(C>=O,V,0);
downvolume = IIf(C<O,V,0);
upvolume = Sum(upvolume,5);
downvolume = Sum(downvolume,5);
TotalV = upvolume + downvolume ;
TimeFrameRestore();
//Plot( upvolume " Up Volume", colorred, ParamStyle("Style", styleHistogram | styleThick, maskHistogram ) );
//Plot( downvolume " Down Volume", colorBlue, ParamStyle("Style", styleHistogram | styleThick, maskHistogram ) );
Plot( TotalV, " Total Volume", colorgreen, ParamStyle("Style", styleHistogram | styleThick, maskHistogram ) );

When the above code is plotted, the result for the most recent volume bar on a DAILY timeframe is the SAME value as the value for the most recent standard Volume Bar on a WEEKLY timeframe !!!

However, what I need to do is transfer/plot the result from the Daily timeframe onto the Weekly Timeframe, so both volume values are the same.


Consequently, any help would be appreciated,

Many Thanks in advance,

Chorlton
 
Hi all,

I need some help to write an indicator for amibroker and I'm absoultely clueless with writing the code - giving me a serious headache.

It is a pretty basic formula but it's not mine so I don't want to post it on here.

So if anyone interested could please pm me, I will be willing to pay a fee for it if any professional programers are interested or if anyone knows any that do this sort of work.

Thanks
 
Hi

I'm wondering if it's possible to remove the horizontal dotted lines that appear in my Amibroker charts?

(ie the lines that are arrowed in this (hopefully) attached image.

I've been scratching my head trying to figure out how to do this hopefully simple things.

Cheers
deve
 

Attachments

  • amibroker.jpg
    amibroker.jpg
    133.7 KB · Views: 8
To remove them right click on the chart > click parameters > click no on "show middle lines"

or

click tools > preferences > colors and make the "grid" color the same as the background.
 
Hi Deve,
Not entirely sure what you mean here, but if your chart is based on daily data in a daily display then the number of days would simply be a count of the number of bars in between.
 
Top