Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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;
Can you help answer these questions from other members on NexusFi?
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.
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.