GetRTUnrealizedPL(Account) for a Rithmic Apex account  [SOLVED]

Questions about MultiCharts and user contributed studies.
gpw797
Posts: 216
Joined: 04 Mar 2006
Has thanked: 3 times
Been thanked: 7 times

GetRTUnrealizedPL(Account) for a Rithmic Apex account

Postby gpw797 » 04 Dec 2023

Tried multiple variations (see below) and couldn't get any to work. Please advise on how to get open PL on a Rithmic Apex account.

myaccountnumber is main account number just the number part
5 is the sub account

Tried..
GetRTUnrealizedPL(myaccountnumber-5);
GetRTUnrealizedPL(APEX-myaccountnumber-5);
GetRTUnrealizedPL(myaccountnumber);

None of these work. Please advise on how to access open PL on a Rithmic account with code.

User avatar
Polly MultiCharts
Posts: 203
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 56 times

Re: GetRTUnrealizedPL(Account) for a Rithmic Apex account

Postby Polly MultiCharts » 06 Dec 2023

Hello gpw797,

The ‘GetRTUnrealizedPL(Account)’ function uses string variables so you need to use quotes.
Please try the following code sample:

Code: Select all

if not LastBarOnChart then #return; Print(GetRTUnrealizedPL("myaccountnumber-5"));

gpw797
Posts: 216
Joined: 04 Mar 2006
Has thanked: 3 times
Been thanked: 7 times

Re: GetRTUnrealizedPL(Account) for a Rithmic Apex account

Postby gpw797 » 06 Dec 2023

aftersnip.png
(66.25 KiB) Not downloaded yet
I tried as a string with complete # .. Thanks. I compiled and put it on a chart now and it gives result of $0.00 when there is open PL see attached snip showing the open position and the script saying PL is $0.00 when it is $5.00.

User avatar
Polly MultiCharts
Posts: 203
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 56 times

Re: GetRTUnrealizedPL(Account) for a Rithmic Apex account

Postby Polly MultiCharts » 07 Dec 2023

gpw797,

We have checked it on our end and the issue is not reproduced, I’m afraid.
We used the following code sample. You can refer to it for more info:

Code: Select all

Input: _Account(StringSimple); // Assuming that Unrealized PL (TS) is same as Open PL (MC) GetRTUnrealizedPL = 0; for value1 = 1 to tm_accounts_count begin if _Account = tm_account_str_value(value1, 2000) then begin GetRTUnrealizedPL = tm_account_num_value(value1, 1002); break; end; end;
If the issue still persists, please come to our live chat MON-FRI from 6:00 AM till 1:00 PM EST so that we can study this behavior remotely.
Live Chat is accessible from our web site.

gpw797
Posts: 216
Joined: 04 Mar 2006
Has thanked: 3 times
Been thanked: 7 times

Re: GetRTUnrealizedPL(Account) for a Rithmic Apex account  [SOLVED]

Postby gpw797 » 18 Dec 2023

I finally got back to this and confirmed working and resolved, thank you.


Return to “MultiCharts”