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.
GetRTUnrealizedPL(Account) for a Rithmic Apex account [SOLVED]
- Polly MultiCharts
- Posts: 220
- Joined: 20 Jul 2022
- Has thanked: 1 time
- Been thanked: 59 times
Re: GetRTUnrealizedPL(Account) for a Rithmic Apex account
Hello gpw797,
The ‘GetRTUnrealizedPL(Account)’ function uses string variables so you need to use quotes.
Please try the following code sample:
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"));
Re: GetRTUnrealizedPL(Account) for a Rithmic Apex account
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.
- Polly MultiCharts
- Posts: 220
- Joined: 20 Jul 2022
- Has thanked: 1 time
- Been thanked: 59 times
Re: GetRTUnrealizedPL(Account) for a Rithmic Apex account
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:
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.
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;
Live Chat is accessible from our web site.