NexusFi: Find Your Edge


Home Menu

 





PriceSeriesProvider testing error


Discussion in EasyLanguage Programming

Updated
    1. trending_up 357 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

PriceSeriesProvider testing error

  #1 (permalink)
ekpalmer
San Francisco, California
 
Posts: 2 since Oct 2022
Thanks Given: 0
Thanks Received: 0

Hello! I'm just starting to try out using objects, and my first test is to use PriceSeriesProvider. I've created the following code, and it verifies ok, but when I put it on a chart, I get the error:

Data in the 'Provider' can not be accessed until the object is 'loaded'.

Anyone know what that means?

using elsystem;
Using tsdata.marketdata;

var: PriceSeriesProvider PSP(NULL),
Intrabarpersist TimeLast(0),
Intrabarpersist Xav3(0),
Xav3Last(0);

Once
begin
PSP = new PriceSeriesProvider;

//---------------------------
//psp
//---------------------------
PSP.Symbol = Symbol;
PSP.Interval.ChartType = DataChartType.Bars;
PSP.Interval.IntervalType = DataIntervalType.Minutes;
PSP.Interval.IntervalSpan = 30;
PSP.Interval.Name = "(Unknown name)";
PSP.Range.Type = DataRangeType.Bars;
PSP.Range.FirstDate = DateTime.FromELDateAndTime(D,T);
PSP.Range.Name = "(Unknown name)";
PSP.IncludeVolumeInfo = false;
PSP.IncludeTicksInfo = false;
PSP.UseNaturalHours = false;
PSP.Realtime = true;
PSP.TimeZone = tsdata.common.TimeZone.exchange;
PSP.Name = "PSP";
PSP.Load = false;
end;

If PSP.Time[0].ELTime <> TimeLast Then
Begin
if psp.count > 2 then Xav3 = Xav3Last + (2/15 * (PSP.Close[0] - Xav3Last));
Xav3Last = Xav3;
TimeLast = PSP.Time[0].ELTime;
end;

Plot3(Xav3, "XAv3", Cyan);
If GetAppInfo(aiRealTimeCalc) = 1 then Setplotcolor(3,Yellow);

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
can i use extra computer for optimising
Traders Hideout
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #2 (permalink)
Carlera
Colombia
 
Posts: 13 since Mar 2021
Thanks Given: 1
Thanks Received: 1

Hello EdPalmer,

You have to put always
PSP.Load= True;

... The rest is ok.

Reply With Quote
  #3 (permalink)
ekpalmer
San Francisco, California
 
Posts: 2 since Oct 2022
Thanks Given: 0
Thanks Received: 0


Ok, that's easy. Thank you!

Reply With Quote




Last Updated on April 9, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts