ADE and intrabarpersist question?  [SOLVED]

Questions about MultiCharts and user contributed studies.
nuno-online
Posts: 174
Joined: 31 Jan 2006
Has thanked: 74 times
Been thanked: 5 times

ADE and intrabarpersist question?

Postby nuno-online » 01 Oct 2012

Hi,
I am using ADE to transfer an indicator information from a daily chart to an intraday chart. That's ok for this

In my 5min Chart, i have the information (the value of my indicator) for the last daily bar closed.
Is it possible to have the information for this last bar even if the bar isn't closed?

for exemple, today (01 Oct 2012) i have the daily indicator value for the last bar closed (28 Setp 2012)
I would like to have the daily indicator value for the last bar even if this bar isn't closed (01 Oct 2012)

is it possible?
Do i have tu use IntrabarPersist? ... How ?
here is the indicator

// NR_ADE_Sender indicator

Code: Select all

Vars:
Class("DailyAvg") , AvgMap(MapSN.New), MA(0);

// CACULATE MOVING AVERAGE
MA = AverageFc(c,50);

//Store the data we are interested in into AvgMap
Value1 = MapSN.Put(AvgMap,"DailyAvg", MA);

//Use ADE to store for current symbol and bar interval
Value1 = ADE.PutBarinfo(class, GetsymbolName, ADE.Barinterval, ADE.BarID, AvgMap);

//Plot daily average on daily chart
Plot1(MA, "Av", DarkBlue);
// NR_ADE_Reciver indicator

Code: Select all

Vars:
Interval(0), Class("DailyAvg"), AvgMap(Mapsn.new),
value1(0), value2(0);

value1 = Ade.GetBarInfo(Class, GetSymbolName, Interval, Ade.BarID, AvgMap);
value2 = MapSN.Get(AvgMap, "DailyAvg");

Plot1(value2, "DailyAvg", Darkblue);

thank you for your help
Attachments
MultiCharts1.png
(147.86 KiB) Downloaded 276 times
ade_test.pla
(84.87 KiB) Downloaded 453 times

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: ADE and intrabarpersist question?  [SOLVED]

Postby Henry MultiСharts » 01 Oct 2012

Is it possible to have the information for this last bar even if the bar isn't closed?
Hello Nuno-online,

There is no way to know the bar close time until the bar closes.
If the bar is still open then "Close" will return the bar's current close price.


Return to “MultiCharts”