nope, I still get an invalid symbol message.
symbol-exchange-type
symbol-exchange-type-currency
bhp-asx-stk
bhp-asx-stk-aud
nope, I still get an invalid symbol message.
ApplyStop(0,2,Ref(C,-1),1)
Ref(C,-1)
G'day fellahs,
I'm trying to use the ApplyStop function. What I want to do is set a stop on yesterday's close and keep it there. This is what I'm using at the moment:
Code:ApplyStop(0,2,Ref(C,-1),1)
I have a feeling that it has something to do with. I think that this value is re-evaluated for each new bar that appears, hence the stop always moves. How do I keep it fixed?Code:Ref(C,-1)
Thanks.
Nizar,
See here:
http://www.amibroker.com/guide/h_ib.html
Once you have it setup, you can backfill about 2 weeks of 1 min data.
Actually my set up is a bit different than in the user manual (your link).
Under File ---> Database Settings ---> Configure
I only get 2 checkboxes under "Backfill settings",
1. Regular Trading hours only
2. Automatic backfill on first data access (causes additional traffic)
IDEALPRO price field: Midpoint/Bid/Ask
I'm not getting Base Interval and all the other settings shown in the link above.
Any ideas?
GraveStone = iif ((O < (L + (L*0.01))) AND (C < (L + (L*0.01))), 1, 0);
GraveStone = iif (O == C AND ((H + L) > (O + C)) AND (C == H), 1, 0);
Hi Guys,
I am hoping one of the Amibroker AFL experts here might be able to offer some assistance.
I am trying to get my head around AFL by coding up some candlestick indicators. I am having some real trouble with the gravestone Doji. When the open and close are exactly the same as the low for the day is easy but I noticed it was missing some that where really close. I want to add a 1% leeway buffer so that if the open and close both finish within the bottom 1% of the total range for the day it still triggers.
I have tried this many ways but none are working. These are a couple that I have tried:
Code:GraveStone = iif ((O < (L + (L*0.01))) AND (C < (L + (L*0.01))), 1, 0); GraveStone = iif (O == C AND ((H + L) > (O + C)) AND (C == H), 1, 0);
What am I doing wrong???
On a side note: I have only just purchased AmiBroker and had an issue straight away. I sent an email to support@amibroker.com and received a confirmation saying that they usually respond within 24 hrs.
Its been almost a week and I haven't heard anything. Is this normal for them?
Depends whether you want number of bars (ie. days the stock traded) or number of calendar days.
Number of bars is easy. If your bar indices are called "first" and "last":
bi = BarIndex();
count = bi[last] - bi[first];
Calendar days is trickier. See this AmiBroker knowledge base article.
GP
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.4f, %.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, C-Ref(C,-1), SelectedValue( ROC( C, 1 )) ));Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?