- ago
In the meantime, I have been playing with the idea of printing the metrics that I need under the Tag field of the Positions Scorecard.

However, it's not easy to sort or work with (this because I printed both the MAE and MFE together). Is there a way to programmatically add more user-defined fields to the Positions Scorecard?
4
303
15 Replies

Reply

Bookmark

Sort
- ago
#1
No, adding custom fields to the Positions tab is not supported.
0
- ago
#2
Thanks Eugene!

I was hoping this would be possible somehow. Do you see any other workaround for the issue that I raised in the topic from where this thread was taken out?

I suppose it’s possible to create another Scorecard mimicking the Positions one, but with the values that I am looking for - but that is out of my competence at the moment (no WPF knowledge); so I am thinking of then creating a class to print all Positions (and metrics) to a CSV file and then manipulating it in Excel to try to arrive at the perfect stop/profit targets (a bit cumbersome but should work).
0
- ago
#3
Please count me out on suggestions for workarounds because the topic isn't my turf. I see there's a feature request that should solve the main problem once it's accepted and ready.

As for printing out all Positions and metrics e.g. to CSV, it's easily possible. You might want to take a look at the approach suggested in post #3 below:

https://www.wealth-lab.com/Discussion/Is-there-a-way-to-save-or-export-backtest-results-8686

Hope this helps.
0
MIH8
- ago
#4
I did not read it completly. Maybe the API has everything you need. You can check it out. https://www.wealth-lab.com/Support/ExtensionApi/ScoreCard
0
- ago
#5
Although the ScoreCard API allows to build a complete solution, it implies some learning curve to master the free IDE (Visual Studio Code or Community). On the other hand, with the StrategyRunner approach it isn't necessary.
0
- ago
#6
Thank you both. It’s unlikely that the feature request will make it to the top of the list, so I’m going to study what you posted and see if I can come up with something on my own.

No matter how many different instruments I trade, I keep coming back to futures (it’s with future contracts that I am most successful and their nature definitely fit better with my trading style). And so far I couldn’t adapt to work with the way the % metrics are calculated for the futures positions since WL7/8; so I have to upgrade my knowledge of C# and make it happen somehow.

Thank you again!
1
- ago
#7
Looks like you want more performance metrics.
Did you consider Formula Scorecard from the finantic.ScoreCards extension?

There it is possible to create new metrics.

It is way simpler than writing your own ScoreCard.
1
- ago
#8
I'm under impression that topic starter wants to beef up the Positions tab, that's why I didn't suggest the Formula Scorecard.
0
- ago
#9
DrKoch: I'm familiar with the finantic.ScoreCard extension. You did a great job and there is a lot that can be done with it. I am a happy customer of it - it was money well spent!

However, Eugene is right, I was looking to have metrics added to the Positions visualizer. Actually, not so much to add, but to display some of the current ones differently. This derived from another discussion about how the percentage metrics (MFE %, MAE %, Profit %) are calculated for each position, in Futures mode - at present, they are calculated taking into account the effect of leverage based on the value set for the contract's margin in Markets and Symbols. As it is, they are of now use to me; and so I was looking into an alternative way to have the "raw" values calculated; since I then use this to do my analysis of where to place (if at all) Stops and Profit Targets.
0
- ago
#10
@alkimist: Could you please produce a screen dump with some editing to show where exactly you want to see which values and probably an explanation how these values should be calculated.

(Let's stop guessing)
0
- ago
#11
Sure, just for reference, this was the original topic:
https://www.wealth-lab.com/Discussion/Percentage-calculations-for-futures-trading-7514

As you can see, from the attached screenshot (obtained from running the "Knife Juggler" on the ES futures conttract, the values of:
- Profit %;
- MFE %; and
- MAE %
Look exaggerated. This is because in it current form, they are calculated taking into account the leverage, based on the margin set for the Futures contract.


Then, this is propagated in other places too. For example, if under "Position Metrics", I would try to use the Preset "Perfect Stop Loss" (a neat feature for stocks), I actually arrive at absurd values.
0
- ago
#12
Ok, I see. Solution:
Use the Tag column. This can hold arbitrary strings or objects or sets of values.
I'd suggest you calculate a list of values separated by semicolons and set the Tag field of a position to this string.
0
- ago
#13
Indeed: this is what I did yesterday - printing to the Tag column a string with (Profit%; MAE%; MFE%); but then quickly run into limitations while trying to sort it to do the analysis. And hence this new thread, enquiring if it was presently possible to add more columns programmatically (Eugene already confirmed that it is not).
0
Glitch8
 ( 29.20% )
- ago
#14
I’d support the request, it would be useful to see user defined columns in the Positions visualizer. Maybe in conjunction with the already defined Position Metrics?

I turned this into a #FeatureRequest.
0
- ago
#15
Great. Thank you!
0

Reply

Bookmark

Sort