Trading Articles
Article Categories
Article Tools
EL PriceSeriesProvider
Updated August 12, 2019
trending_up
548 views
thumb_up
0 thanks given
group
20 followers
forum
1 posts
attach_file
0 attachments
Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free and simple.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
(login for full post details)
#1 (permalink )
la, usa
Posts: 1 since Jul 2019
Thanks: 0 given,
0
received
I'm really struggling with PSP. I got it to work at first. wanted to fetch data and everything worked smoothly. then, all of the sudden it's not loading any data even though it's stating that the state is loaded:
CODE :
method void on_Update( elsystem.Object sender, tsdata.marketdata.PriceSeriesUpdatedEventArgs args )
begin
print("updateee -- ", args.Reason.ToString());
end;
method void on_StateChanged( elsystem.Object sender, tsdata.common.StateChangedEventArgs args )
variables:
PriceSeriesProvider PPEvent;
begin
PPEvent = sender astype PriceSeriesProvider;
print("State: ", PPEvent.State.ToString());
switch PPEvent.State
begin
case DataState.loading:
break;
case DataState.unloaded:
break;
case DataState.failed:
break;
case DataState.loaded:
print("count :", PPEvent.Count);
total_volume_shares = 0;
total_volume_ticks = 0;
high_of_period = 0;
time_of_high = null;
low_of_period = 0;
time_of_low = null;
test = test + 1;
For x = PSP.Count - 1 DownTo 0 begin
//Print(PSP.Time[x].ToString(), " , ",PSP.Open[x], " , ",PSP.High[x], " , ",PSP.Low[x], " , ",PSP.Close[x]);
total_volume_shares = total_volume_shares + PSP.Volume[x];
total_volume_ticks = total_volume_ticks + PSP.Ticks[x];
If high_of_period < PSP.High[x] then begin
high_of_period = PSP.High[x];
time_of_high = PSP.Time[x];
time_of_high.AddMinutes(-1);
end;
If low_of_period > PSP.Low[x] or low_of_period = 0 then begin
low_of_period = PSP.Low[x];
time_of_low = PSP.Time[x];
time_of_low.AddMinutes(-1);
end;
end;
Print(PSP.Symbol, ", HIGH : ", high_of_period, ", HIGH_TIME : ", time_of_high.Format("%m/%d/%Y %H:%M:%S"),
", LOW : ", low_of_period, ", LOW_TIME : ", time_of_low.Format("%m/%d/%Y %H:%M:%S"), ", Volume (shares) - ", total_volume_shares, ", Volume (shares) - ", total_volume_ticks);
DataSheet.Cells[1, 3] = "erwerwerew";
DataSheet.Cells[1, 5] = 2222222;
DataSheet.Cells[3, 9] = time;
DataSheet.Cells[3, 10] = high_of_period;
//---------------------------------------------------------------------------------------------------
// With OP loaded then this could be an appropriate spot to initiate the setup of another provider,
// such as an Historical or a Realtime Orders Provider
//---------------------------------------------------------------------------------------------------
PSP = new tsdata.marketdata.PriceSeriesProvider;
//---------------------------
//psp
//---------------------------
Print(current_row, lastRow);
If current_row <= lastRow then begin
Print("ffff");
current_row = current_row + 1;
PSP.Symbol = DataSheet.Cells[2, current_row].ToString();
Value1 = ListS.PopFront(SymbolList111);
PSP.Interval.ChartType = tsdata.marketdata.DataChartType.Bars;
PSP.Interval.IntervalType = tsdata.marketdata.DataIntervalType.Minutes;
PSP.Interval.IntervalSpan = 1;
PSP.Interval.Name = "(Unknown name)";
PSP.Range .Type = tsdata.marketdata.DataRangeType.bars;
PSP.Range.FirstDate = DateTime.Parse("7/25/2019");
PSP.Range.LastDate = DateTime.Parse("7/25/2019");
PSP.Range.Name = "(Unknown name)";
PSP.IncludeVolumeInfo = true;
PSP.IncludeTicksInfo = true;
PSP.SessionName = "only Pre Market";
PSP.UseNaturalHours = false;
PSP.Realtime = true;
PSP.TimeZone = tsdata.common.TimeZone.exchange;
PSP.Name = "PSP";
PSP.Load = true;
//--------------------------------------------
// Events
//--------------------------------------------
PSP.updated += on_Update;
PSP.StateChanged += on_StateChanged;
Print("ffff444444");
end;
break;
end;
end;
Once Begin
ClearPrintLog;
Print("Log Header");
Value1 = ListS.PushBack(SymbolList111, "abil");
Value1 = ListS.PushBack(SymbolList111, "GOOG");
Value1 = ListS.PushBack(SymbolList111, "AMZN");
current_row = firstRow;
//---------------------------
//Workbook WB
//---------------------------
WB = new Workbook;
WB.FileName = ExcelFileNameWithPath;
WB.Shared = true;
WB.Visible = true;
WB.Load = true;
WB.SaveOnClose = true;
WB.Name = "Workbook1";
//---------------------------
//Sheet Sheet1
//---------------------------
DataSheet = WB.Sheets[ ExcelSheetName ];
PSP = new tsdata.marketdata.PriceSeriesProvider;
//---------------------------
//psp
//---------------------------
PSP.Symbol = DataSheet.Cells[2, current_row].ToString();
PSP.Interval.ChartType = tsdata.marketdata.DataChartType.Bars;
PSP.Interval.IntervalType = tsdata.marketdata.DataIntervalType.Minutes;
PSP.Interval.IntervalSpan = 1;
PSP.Interval.Name = "(Unknown name)";
PSP.Range.Type = tsdata.marketdata.DataRangeType.bars;
PSP.Range.FirstDate = DateTime.Parse("7/18/2019");
PSP.Range.LastDate = DateTime.Parse("7/18/2019");
PSP.Range.Name = "(Unknown name)";
PSP.IncludeVolumeInfo = true;
PSP.IncludeTicksInfo = true;
PSP.SessionName = "only Pre Market";
PSP.UseNaturalHours = false;
PSP.Realtime = true;
PSP.TimeZone = tsdata.common.TimeZone.exchange;
PSP.Name = "PSP";
PSP.Load = true;
//--------------------------------------------
// Events
//--------------------------------------------
PSP.updated += on_Update;
PSP.StateChanged += on_StateChanged;
End;
is there anyway for you to help ?
Can you help answer these questions from other members on futures io?
Best Threads (Most Thanked) in the last 7 days on futures io
Last Updated on August 12, 2019
Right now
Ongoing
Right now
March
Register to Attend
Elite only
Coming soon
April