Easylanguage Print to File Problem - TradeStation | futures.io
futures.io futures trading

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation

Easylanguage Print to File Problem
Started:August 13th, 2012 (09:51 AM) by jalea148 Views / Replies:1,871 / 1
Last Reply:August 13th, 2012 (12:07 PM) Attachments:0

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Easylanguage Print to File Problem

Old August 13th, 2012, 09:51 AM   #1 (permalink)
Trading Apprentice
Futures Experience: Advanced
Platform: OMEGA
Favorite Futures: OPTIONS
Posts: 1 since Aug 2012
Thanks: 1 given, 0 received

Easylanguage Print to File Problem

I need to print to multiple files within a Signal. For example, if the trade is long, I want to write to ABC if the trade is long and to DEF if it is short. Furthermore, the file names depend on the symbol itself. Ex., if the symbol is SPX, I might want to print to C:\DATA\SPXL.csv for long trades and C:\DATA\SPXS.csv for short trades. If the strategy is applied to a different symbol, the name would change.

The documentation indicates the file name is a string expression. However, it appears it is a string constant. If I build a string variable, FILENAME, and use it in the print expression:
print(File(FILENAME), ElDatetoString(Date));
this results in Error(#287)
File name expected here.
It appears Easylanguage is looking for quotation marks, but I'm not sure [and I don't know how to append them.]

Reply With Quote

Old August 13th, 2012, 12:07 PM   #2 (permalink)
Elite Member
Cary, NC
Futures Experience: Advanced
Platform: MultiCharts, NinjaTrader, MetaTrader, R
Broker/Data: Interactive Brokers, IQFeed, Oanda
Favorite Futures: 6E, CL, EUR/USD
Fu510n's Avatar
Posts: 85 since Oct 2009
Thanks: 709 given, 71 received

I don't believe dynamic filenames are currently supported (re: Print - MultiCharts) by Easy/PowerLanguage.


The parameter inside the square brackets is optional.


OutputTarget- an optional parameter; specifies an output target other then the PowerLanguage Editor Output Log; the parameter must be followed by a comma.

There are two optional output targets:

Printer - Specifies the default printer as the output target.
File("PathFilename") - Specifies an ASCII file as the output target; if the specified file does not exist, the file will be created.

PathFilename - a string expression specifying the path and filename.
If OutputTarget is not specified, the output will be sent to the PowerLanguage Editor Output Log.

You can always request that they enhance the Print API call to support dynamic filenames though there's no guarantee they'll do that or "soon" (plus it would make it a superset of functionality of TS EasyLanguage, but that's fine). You could also write a DLL yourself and do whatever you want in the external module - quite a bit more involved, but definitely doable.

My .02,

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


futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > Easylanguage Print to File Problem

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Easylanguage problem mengelbrecht MultiCharts 10 January 27th, 2012 07:14 AM
Print, Rally, Then What? Quick Summary News and Current Events 0 November 17th, 2011 08:30 AM
problem with reading data from txt file Altas NinjaTrader Programming 2 May 11th, 2011 04:29 PM
Easylanguage : Decimal problem Ozons EasyLanguage Programming 3 February 13th, 2011 12:28 AM
Anyone using Print+ from moneyflowbars.com? Need your help Chipmunk Vendors and Product Reviews 5 October 20th, 2010 04:30 AM

All times are GMT -4. The time now is 02:56 PM.

Copyright © 2016 by 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

Page generated 2016-10-27 in 0.07 seconds with 19 queries on phoenix via your IP