NexusFi: Find Your Edge


Home Menu

 





PriceSeriesProvider testing error


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #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?
Bookmap Global Plus Lifetime + Lifetime Addons For Sale
Platforms and Indicators
April FOMC Minutes: Most Divided Fed Since 1992 -- Many …
Traders Hideout
Trump Lands in Beijing on CPI Day: Iran Peace Expires To …
Prediction Markets & Event Contracts
Warsh Opens Today, Hormuz June 19 -- WTI Below $80, Fran …
Prediction Markets & Event Contracts
Six Days to Kickoff: World Cup Prediction Markets Hit $1 …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
196 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
BERN ALGOS algo trading journal
8 thanks
  #2 (permalink)
Carlera
Colombia
 
Posts: 14 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


© 2026 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 - Downloads - Top
no new posts