Plotting Data Points - futures io
futures io futures trading



Plotting Data Points


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Quick Summary with 1 posts (0 thanks)
    2. looks_two ABCTG with 1 posts (1 thanks)
    3. looks_3 BobF with 1 posts (1 thanks)
    4. looks_4 golb0016 with 1 posts (0 thanks)
    1. trending_up 1,250 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 3 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
 

Plotting Data Points

(login for full post details)
  #1 (permalink)
Minneapolis Minnesota
 
 
Posts: 3 since Jan 2014
Thanks: 3 given, 0 received

I'm trying to plot some data generated in an Excel spreadsheet against futures prices. I remove 1000000 from the date because for some reason an extra 1 is added on the front of every date. Then the date is run through a bunch of logic statements to find the data point that matches the date and sets the Diff variable to the value and plotpoint to True. At the end it checks to see if should add a point. Right now I'm only able to get it to either plot no points or the very last point (i.e. 3026). Any suggestions are much appreciated!

Vars: Diff(0), plotpoint(False);

Value1 = date - 1000000;

If Value1= 130108 then Diff= 136497 and plotpoint=True;
If Value1= 130115 then Diff= 140085 and plotpoint=True;
If Value1= 130122 then Diff= 133681 and plotpoint=True;
//More data points here removed for this post
If Value1= 140107 then Diff= 60070 and plotpoint=True;
If Value1= 140114 then Diff= 16131 and plotpoint=True;
If Value1= 140121 then Diff= 3026 and plotpoint=True;

If plotpoint = True then begin
Value2 = Round(Diff/1000,0);
Plot7(Value2,"COT",Red);
Plotpoint = False;
End;

Reply With Quote

Can you help answer these questions
from other members on futures io?
Which kind of Blockvolume is visible? - order processing
Emini and Emicro Index
Webinar: Finding your own way in trading w/Adam Grimes
The Elite Circle
What blockvolume is visible? - order processing
NinjaTrader
Short Interest Ratio indicator?
ThinkOrSwim
Automatic pattern research with NT
Elite Algorithmic NinjaTrader Trading
 
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
 
(login for full post details)
  #3 (permalink)
 
 
Posts: 2,230 since Apr 2013
Thanks: 409 given, 1,471 received


golb0016,

your code did not verify for me as with a simple "if...then" statement you can only
execute code statement and you can't combine them with "and".
Changing the "if...then" to "if...then begin...end" makes the code compile and plot more than one data point.

In EasyLanguage date returns a numerical value indicating the closing date of a bar. The date is indicated in the YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is the day of the month.
That's why starting with 2000 all date values have the 1 as first number.

Regards,
ABCTG



 
Code
Vars: Diff(0), plotpoint(False);

Value1 = date - 1000000;

If Value1= 130108 then 
begin
	Diff= 136497;
	plotpoint=True;
end
else
If Value1= 130115 then 
begin
	Diff= 140085;
	plotpoint=True;
end
else
If Value1= 130122 then 
begin
	Diff= 133681;
	plotpoint=True;
end
//More data points here removed for this post
else
If Value1= 140107 then 
begin
	Diff= 60070;
	plotpoint=True;
end
else
If Value1= 140114 then 
begin
	Diff= 16131;
	plotpoint=True;
end
else
If Value1= 140121 then
begin
	Diff= 3026;
	plotpoint=True;
end;

If plotpoint = True then begin
Value2 = Round(Diff/1000,0);
Plot7(Value2,"COT",Red);
Plotpoint = False;
End;

Follow me on Twitter Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #4 (permalink)
Hyannis, MA
 
Experience: Advanced
Platform: TradeStation
Trading: ES
 
Posts: 3 since Nov 2011
Thanks: 0 given, 2 received

Here is a little simpler solution:

---

Vars: Diff(0), plotpoint(False);

Value1 = date - 1000000;

Diff = -999999;

If Value1= 130108 then Diff= 136497;
If Value1= 130115 then Diff= 140085;
If Value1= 130122 then Diff= 133681;
//More data points here removed for this post
If Value1= 140107 then Diff= 60070;
If Value1= 140114 then Diff= 16131;
If Value1= 140121 then Diff= 3026;

If Diff <> -999999 then begin
Value2 = Round(Diff/1000,0);
Plot7(Value2,"COT",Red);
End;

---

This presets Diff to a weird number (-999999) on each bar then plots only if it is changed from that weird number.

Reply With Quote
The following user says Thank You to BobF for this post:


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Plotting Data Points


Last Updated on February 17, 2014


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