Hi,
Just wondering if there is anyway to access the equivalent of "openpositionprofit" from within Custom Criteria?
Thanks!
Accessing "openpositionprofit" from within Custom Criteria?
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Accessing "openpositionprofit" from within Custom Criteria?
Thanks Henry.
Will have a play with "SetCustomFitnessValue"
In the meantime is there anyway of using any of these Jscript words to access openpositionprofit:
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.
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.
But I can't see how one uses them in the jscript custom criteria section.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Accessing "openpositionprofit" from within Custom Criteria?
wilkinsw, these are regular PowerLanguage commands. You can access their values in the custom criterion only via SetCustomFitnessValue,