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)
Hello everyone, i'm not very expert with Easylanguage. I have difficulty in coding how to print a txt file where i'd like to write in the name of strategy, symbol, date and profit-loss of the day.
I have difflcult to find the reserved words for the strategy name and the profit/loss of the day.
Anyone have any suggestions?
Thank you in advance
Gioak
print(File("C:\Users\utente\Desktop\outputMulticharts\test.txt"),"strategyname",xxxxxxxxx," SYMBOL ",symbol," date ",date:7:0,spaces(2), "P/L",xxxxxxxxxxxxxxx);
Can you help answer these questions from other members on NexusFi?
you have two option:
1. try use: GetStrategyName reserved word
2. u can create a variable at the top of the file and use it whenever u want in the files (it called: constant in programmin language perspective)
Hi chenrvn, thank you for your suggestions... i've solved the first problem (strategy name) but not the second, how to insert in a end of day txt file the profit/loss of the day.
print(File("C:\Users\utente\Desktop\outputMulticharts\test.txt"),"strategyname",spaces(2),getstrategyname," SYMBOL ",symbol," date ",date:7:0,spaces(2), "P/L",XXXXXXXXXXXXXX);
one way to accomplish what you have in mind would be to store the value of the reserved word NetProfit in a variable at the beginning of each day. Then you can compare the current value for NetProfit at the end of the day to that variable and compute the daily profit and loss.