NexusFi: Find Your Edge


Home Menu

 





PriceSeriesProvider testing error


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,389 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?
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
Trump Media to sell instant access to market-moving soci …
Traders Hideout
Datafeed for Atas
Platforms and Indicators
My Rant with AMP Futures
Trading Reviews and Vendors
No book, only a stair: journaling fills where price move …
Cryptocurrency
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
Johnnys Journal
2 thanks
TopStep Trader disappointment
2 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