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 could use some help with date print options and formats.
i am still working to get ts to write lines of text to files instead of generating the typical alerts every time my charts determine that a significant event has taken place.
this code below will correctly return the date of the next friday (that's the typical expiration day for options), but it uses the ts date format that is useless when i need a yyyymmdd date. ¿does anyone know how could i modify this code so that dates could be returned in the desired format? adding 19000000 to the date could help but i think these variables are being treated as strings and i'm not sure where could this step be added if that was even possible.
and also, this code prints the data to some obscure output window, if i wanted to print several dates similar to this but to have them inserted as text in a chart window for a symbol, ¿is there any command that i could use? for one month i evaluated a ts add-on called optionsx that displayed a lot of information like if the add-on was enabled or not and whether any instruments for that same symbol were owned by the user's account, all of this to the chart window where it had been applied. that is the kind of print i have in mind. ¿does anyone know if that could be possible using easylanguage?
on a related matter, one notable expert who has been assisting me in creating an automated options trading system has some visual basic tools that could process text and convert it to the appropriate orders but a very specific format is necessary, something like this:
i would need to use this same format in multiple different cases so i don't think that the recordevent(" uptrend has started "); command would be very useful in this case. i would have to include multiple variables, spaces, line breaks and troublesome characters like / inside every instance recordevent. ¿maybe it could be possible to define a number of different string variables for example - case1a - that would include all the text and variables i pasted above and when an event occurred i would use a simple command like recordevent( case1a ); ¿is that possible, would that be of any help?
take a look at the various format codes for the datetime class. The built-in help file covers that and gives good examples. If you the format you desire is not possible you can always modify your method and change the string that is returned (for example by getting the EasyLanguage date for nextexpdat and converting this to YYYYMMDD format and return this as a string).