Accessing "openpositionprofit" from within Custom Criteria?

Questions about MultiCharts and user contributed studies.
wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Accessing "openpositionprofit" from within Custom Criteria?

Postby wilkinsw » 12 Jul 2018

Hi,

Just wondering if there is anyway to access the equivalent of "openpositionprofit" from within Custom Criteria?

Thanks!


wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: Accessing "openpositionprofit" from within Custom Criteria?

Postby wilkinsw » 13 Jul 2018

Thanks Henry.

Will have a play with "SetCustomFitnessValue"

In the meantime is there anyway of using any of these Jscript words to access openpositionprofit:

Code: Select all

Numeric OpenEntriesCount- number of open entries

Numeric OpenEntryDate(Numeric entry_index=0) - date of entry order execution. entry_index - entry number.

Numeric OpenEntryTime(Numeric entry_index=0) - time of entry order execution. entry_index - entry number.

Numeric OpenEntryPrice(Numeric entry_index=0) - price of entry order execution. entry_index - entry number.

Numeric OpenEntryContracts(Numeric entry_index=0) - number of entry order contracts. entry_index - entry number.

Numeric OpenEntryProfit(Numeric entry_index=0) - current entry profit. entry_index - entry number.

Numeric OpenEntryMaxProfit(Numeric entry_index=0) - maximum potential entry profit which was achieved. entry_index - entry number.

Numeric OpenEntryMinProfit(Numeric entry_index=0) - minimum potential entry profit which was achieved. entry_index - entry number.

Numeric OpenEntryProfitPerContract(Numeric entry_index=0) - current entry profit per contract. entry_index - entry number.

Numeric OpenEntryMaxProfitPerContract(Numeric entry_index=0) - maximum potential entry profit per contract which was achieved. entry_index - entry number.

Numeric OpenEntryMinProfitPerContract(Numeric entry_index=0) - minimum potential entry profit per contract which was achieved. entry_index - entry number.

Numeric OpenEntryComission(Numeric entry_index=0) - value of entry comission. entry_index - entry number.
I found them here: viewtopic.php?f=1&t=7532&p=41592#p34407

But I can't see how one uses them in the jscript custom criteria section.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Accessing "openpositionprofit" from within Custom Criteria?

Postby Henry MultiСharts » 13 Jul 2018

wilkinsw, these are regular PowerLanguage commands. You can access their values in the custom criterion only via SetCustomFitnessValue,


Return to “MultiCharts”