Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
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)
how to print time in my EL script?
Updated April 16, 2022
Top Posters
looks_one
kevinkdog
with 1 posts (0 thanks)
looks_two
powder
with 1 posts (0 thanks)
looks_3
swingbatter
with 1 posts (0 thanks)
looks_4
ABCTG
with 1 posts (0 thanks)
trending_up
3,387 views
thumb_up
0 thanks given
group
4 followers
forum
3 posts
attach_file
0 attachments
how to print time in my EL script?
April 2nd, 2022, 12:41 PM
Washington DC
Posts: 6 since Jan 2015
Thanks Given: 3
Thanks Received: 0
Hi all, I have a EL script that grabs time and price data from some drawing objects and prints them to the print log so I can grab the data for a spreadsheet.
Currently it only prints date and price, but there is are variables "xtm" "ytm" and "ztm" that should grab time, but I can't figure out how to print it. The script uses "formatdate" to print each item, both dates and prices.
Here is the code that prints the output to the log. I can provide more of the code if needed.
Once print("Triangle_Number ", "Xdate ", "Xprice ", "Ydate ", "Yprice ", "Zdate ", "Zprice ");
print(count, " ", //Triangle number
formatdate("MMddyyyy", xdt[lnum]), //xdate
formatdate("MMddyyyy", xpt[lnum]), " ", //xprice
formatdate("MMddyyyy", ydt[tnum]), //ydate
formatdate("MMddyyyy", ypt[tnum]), " ", //yprice
formatdate("MMddyyyy", zdt[lnum]), //Zdate
formatdate("MMddyyyy", zpt[lnum]), " ",//Zprice
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
April 3rd, 2022, 02:41 PM
Boca Raton, FL
Posts: 260 since Nov 2018
Thanks Given: 81
Thanks Received: 182
powder
Hi all, I have a EL script that grabs time and price data from some drawing objects and prints them to the print log so I can grab the data for a spreadsheet.
Currently it only prints date and price, but there is are variables "xtm" "ytm" and "ztm" that should grab time, but I can't figure out how to print it. The script uses "formatdate" to print each item, both dates and prices.
Here is the code that prints the output to the log. I can provide more of the code if needed.
Once print("Triangle_Number ", "Xdate ", "Xprice ", "Ydate ", "Yprice ", "Zdate ", "Zprice ");
print(count, " ", //Triangle number
formatdate("MMddyyyy", xdt[lnum]), //xdate
formatdate("MMddyyyy", xpt[lnum]), " ", //xprice
formatdate("MMddyyyy", ydt[tnum]), //ydate
formatdate("MMddyyyy", ypt[tnum]), " ", //yprice
formatdate("MMddyyyy", zdt[lnum]), //Zdate
formatdate("MMddyyyy", zpt[lnum]), " ",//Zprice
My suggestion is to see TradeStation Forum topic# 156229 regarding StreamWriter.
April 4th, 2022, 03:57 AM
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629
powder,
what is the time format you are storing in "xtm" "ytm" and "ztm"? What is the rational for using formatdate to format price data for example?
Regards,
ABCTG
powder
Hi all, I have a EL script that grabs time and price data from some drawing objects and prints them to the print log so I can grab the data for a spreadsheet.
Currently it only prints date and price, but there is are variables "xtm" "ytm" and "ztm" that should grab time, but I can't figure out how to print it. The script uses "formatdate" to print each item, both dates and prices.
Here is the code that prints the output to the log. I can provide more of the code if needed.
Once print("Triangle_Number ", "Xdate ", "Xprice ", "Ydate ", "Yprice ", "Zdate ", "Zprice ");
print(count, " ", //Triangle number
formatdate("MMddyyyy", xdt[lnum]), //xdate
formatdate("MMddyyyy", xpt[lnum]), " ", //xprice
formatdate("MMddyyyy", ydt[tnum]), //ydate
formatdate("MMddyyyy", ypt[tnum]), " ", //yprice
formatdate("MMddyyyy", zdt[lnum]), //Zdate
formatdate("MMddyyyy", zpt[lnum]), " ",//Zprice
April 16th, 2022, 12:55 AM
Arlington
Posts: 18 since Feb 2020
Thanks Given: 6
Thanks Received: 3
powder
Hi all, I have a EL script that grabs time and price data from some drawing objects and prints them to the print log so I can grab the data for a spreadsheet.
Currently it only prints date and price, but there is are variables "xtm" "ytm" and "ztm" that should grab time, but I can't figure out how to print it. The script uses "formatdate" to print each item, both dates and prices.
Here is the code that prints the output to the log. I can provide more of the code if needed.
Once print("Triangle_Number ", "Xdate ", "Xprice ", "Ydate ", "Yprice ", "Zdate ", "Zprice ");
print(count, " ", //Triangle number
formatdate("MMddyyyy", xdt[lnum]), //xdate
formatdate("MMddyyyy", xpt[lnum]), " ", //xprice
formatdate("MMddyyyy", ydt[tnum]), //ydate
formatdate("MMddyyyy", ypt[tnum]), " ", //yprice
formatdate("MMddyyyy", zdt[lnum]), //Zdate
formatdate("MMddyyyy", zpt[lnum]), " ",//Zprice
Do you have the code that makes the drawing objects in the first place? If so, couldn't you make some time variables in that code, and combine that code for making drawing objects with your new EL script that grabs price data?
Last Updated on April 16, 2022