Hello all, new to this forum so if any rules/customs are violated then apologies in advance.
I have been looking around for a code that allows me to dump OHLC prices into a CSV format. In the past I only required one or two at a time so I just used the data window and saved it that way. However recently there has been an increase so I figured I'd try and find a quicker solution.
My current idea is to run an indicator through a scanner to output a list of ticker's data.
I have attached an .ELD file for a code that I found however it does not output the current "active" bar until the session is closed. If you could advise me as to how to tell tradestation to output the current bar as well regardless of it being officially closed or not then that would be greatly appreciated!
the solution to your problem lies within the FastFileAppend function. In the code you provided it is limited to print bar values at the end of the bar only. You can change this, but probably have to make sure that it doesn't append the last bar multiple times.
You can find all the information you need plus rules for advanced modifications of FastFileAppend in the original thread here: https://community.tradestation.com/Discussions/Topic.aspx?Topic_ID=31616
The following 2 users say Thank You to ABCTG for this post:
Many thanks for your reply, I had a look at the Trade station forum and it seems that this problem was raised but never resolved. It appears to be a problem/issue with LastBarOnChart for the FastFileAppend.
I have raised the question again over there and if I get a response I'll post it up here.
you are welcome and thanks for the update. You can use something else like the simple print command or EasyLanguage Collections to collect and print the values. Then limit the output for the last bar to one time only.