NexusFi: Find Your Edge


Home Menu

 





StreamWriter (and/or ReadWrite File)


Discussion in Traders Hideout

Updated
    1. trending_up 1,062 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 1 attachments




 
Search this Thread

StreamWriter (and/or ReadWrite File)

  #1 (permalink)
 Patkum101 
Plano TX
 
Experience: Beginner
Platform: NinjaTrader
Trading: Futures
Posts: 6 since Jan 2013
Thanks Given: 4
Thanks Received: 3

Hello

For a fixed fee, I seek help to modify the NinjaTrader 7 general StreamWriter file/script (as attached) that would allow me to write and save bar-by-bar data of the desired time series(indicators). The format of the file/script should have clear segments that shows and allows me to Edit the file/script to:

i) Define/add/remove ANY private labels of any chosen indicator to be used in a 'string' format
eg:
double emaiT = EMA(14)[0]; (Calculate on Bar Close = TRUE)
double emaiiT = EMA(??)[0]; (Calculate on Bar Close = TRUE)
double stochdiT= Stochastics(7, 14, 30).D[0]; (Calculate on Bar Close = TRUE)
string onbarclosetrue = emaiT + "," + emaiiT + "," + stochdiT;

string barprice = Open[0] + "," + High[0] + "," + Low[0] + "," + Close[0]; (Calculate on Bar Close = TRUE)
etc, etc

ii) (define private labels for indicators) where the Data can be/is set to either:
a) Calculate on Bar Close = True, and
b) Calculate on Bar Close = False >> BUT in this case, to ONLY write to the file when the bar closes (eg possibly using if (FirstTickOfBar) to determine that a bar has closed (ie NOT for every tick by tick))
double emaiF = EMA(14)[0]; (Calculate on Bar Close = FALSE)
double emaiiF = EMA(??)[0]; (Calculate on Bar Close = FALSE)
double stochdiF= Stochastics(7, 14, 30).D[0]; (Calculate on Bar Close = FALSE)
string onbarclosefalse = emaiF + "," + emaiiF + "," + stochdiF; (Calculate on Bar Close = FALSE)

[>> IN SUMMARY - the script must allow for writing and saving data for where the indicator is set for BOTH Bar Close = True &/OR False]

iii) write & save the bar-by-bar data in the order preferred.
eg
sw.WriteLine(thetime + "," + barprice + " " + onbarclosetrue + " " + onbarclosefalse);

Once the data is saved (in CSV format), i intend to either email the file or export it to excel.

Please advise of your cost for this.

Thanks

Attached Files
Elite Membership required to download: SampleStreamWriter.cs
Started this thread Reply With Quote
The following user says Thank You to Patkum101 for this post:





Last Updated on May 17, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts