How can I use in a exploration the beginning value of the total history, if I use explorer range 1recent bar to get the start price.
I use following 9999= should be the first day of the data historic. But this is not working.
period = BarCount-1;
Filter = Status("lastbarinrange");
// or
//Filter = 1;
// Output only at last row of result list
AddColumn( ROC(C, period), "ROC of total history", 1.2);
// or for output in all rows of result list e.g. if Filter = 1
//AddColumn( LastValue(ROC(C, period)), "ROC of total history", 1.2);
Unfortunally I get the close today instead of the beginning Startprice of the history if the explore range is 1 recent bars.
For my exploration I need this range 1 recent bars. Is there a possibilty
to get the startprice of the history if the range is 1 recent bars?
Listen, I am using AmiBroker for I do not know how many years already.
I am advanced user. You clearly are still beginner (BTW, being beginner is a state that may change to "not being beginner (anymore)").
But in general... a beginner trying to be smarter than an advanced more experienced guy is not a good idea.
Things I post do work in 99% of cases and are valid.
You are not much detailed so I am not much detailed too.
I just responded to your last post not using proper true/false condition within ValueWhen function's 1st argument and have posted valid correct code. Nothing more nothing less.
Another hint... look at my code in my 2nd post. I have clearly used (uncommented)
Filter = Status( "lastbarinrange" );
Now pretty please do yourself a favour and set Range to All quotes but not to 1 recent bars to make use of Status("firstbarinrange") (and upper Filter) and to get first bar of overall history but still outputting just last row.
Multiple roads lead to Rome! This is especially true for software such as AmiBroker.
Startprice = Ref(C, -(BarCount-1));
But again if you use Flter -> lastbarinrange and tool bar's Range -> All quotes and my previous post's code then you will get same value and single row output.