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)
EasyLanguage Daily Profit and Daily Loss limit in strategy
I want to see a indicator show me by a line the Current day P/L, so when the P/L take the max profit limit or take the max loss limit, this can be with a green line when the P/L is between the max profit and max loss, else with a red line.
Regards
Can you help answer these questions from other members on NexusFi?
Mike - Is this code applicable to one strategy or all 2+ open at that time? If I have 2 workspaces open and I have a profit in one workspace of $200 and $300 in another, will it close down both charts at market at a $500 target? Thanks.
John
PS - I am not sure if your old post from 2010 is linked.
I'm trying to do exactly the same thing you are, and found a clue that maybe someone here might be able to resolve.
I’m trading Russell Futures (RTY) in Tradestation. I wish to build a Stand-Alone strategy for Daily Profit/Loss Limit. Strategy needs to reference my Beginning-of-Day Account Balance while I’m in a trade; and exit the trade when / if my [user defined] Daily Profit or Loss target is achieved. It would also prohibit any further trades that day, after Profit or Loss target has been achieved.
My 2017 EasyLanguage Essentials Programmers Guide states the following:
• “EasyLanguage allows you to access brokerage account information within your strategies so you can more accurately tie your account money management to your real-time strategy trading.”
and
• “TradeManager reserved words allow you to access fields from the TradeManager’s Balance and Positions tabs. There are specific reserved words for both your equity and futures accounts.”
Further down the page I find reserved words and specific discussion of my strategy goals:
• GetBDAccountNetWorth retrieves the beginning Day Account Net Worth amount from the TradeManager’s Balances tab for the given equity/stock account. Zero will be returned for a futures account or an invalid account.
• GetRTAccountNetWorth retrieves the real-time Account Net Worth amount from the TradeManager’s Balances tab for the given equity account. Zero will be returned for a futures account or an invalid account.
Usage Example (TradeManager account balances):
Vars: NetProf(0);
NetProf = GetRTAccountNetWorth – GetBDAccountNetWorth;
In this example, we can calculate the real-time net profit for an account.
The above ‘Usage example’ is exactly what I want to do (I think), but Zero will be returned for a futures account or an invalid account. What am I supposed to make of that?
Any suggestions for this as a Futures Account strategy?
I am in a similar situation with the same questions. I am going by trial and error now and will post if I have good results. Please update the same if you guys learn more.