EL PriceSeriesProvider - futures io
futures io futures trading



EL PriceSeriesProvider


Discussion in EasyLanguage Programming

Updated
    1. trending_up 548 views
    2. thumb_up 0 thanks given
    3. group 20 followers
    1. forum 1 posts
    2. 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)

 
Search this Thread
 

EL PriceSeriesProvider

(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 ?

Reply With Quote

Can you help answer these questions
from other members on futures io?
If ES tracks SPX, why do support/resistance, Level 2, vo …
Emini and Emicro Index
Second Entry Indicator (Looking for testers/feedback)
NinjaTrader
Short Interest Ratio indicator?
ThinkOrSwim
Indicators for pair trading MES and M2K
Platforms and Indicators
ZigZag with Depth and Backstep
EasyLanguage Programming
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Selling Options on Futures?
109 thanks
Battlestations: Show us your trading desks!
108 thanks
Rank your Futures vs Stocks trading priority
55 thanks
Want your NinjaTrader indicator created, free?
27 thanks
Whats this confusion with margins?
21 thanks


futures io Trading Community Platforms and Indicators EasyLanguage Programming > EL PriceSeriesProvider


Last Updated on August 12, 2019


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts