🔹 How to calculate Efficiency Score per Order Type ?
-
How to calculate Efficiency Score per Order Type ?Hello FXDreema community,
I'm building a multi-unit Expert Advisor (EA) with several "roles" or components and I want to track the Efficiency Score for each unit over time.
My Goal:
I want to measure Efficiency = NetProfit / TotalTimeHeld (in days) separately for each type of trade.
Example:
- Orders with comment "Group 1"
- Orders with comment "Group 2"
- Orders with comment "Group 3"
What I want to build in FXDreema:
- Loop through all closed trades
- Sum total profit and total time held for that unit
- Once per bar, calculate and display Efficiency Score (profit/day) for each unit
My Questions:
- What is the best way to loop and filter closed trades in FXDreema?
- Can you suggest the block structure to store and calculate efficiency for each group?
- Any best practices for optimizing such tracking inside FXDreema?
Thank you in advance for your help!
-
When you say 'total time held', do you mean the combined period of time each trade was open (ie total time held = open time - close time)?
-
Yes, that’s exactly what I mean.
For each trade, I want to measure how long it was held (Close Time - Open Time), and then sum that for each group (e.g., 1,2,3). Then, I want to calculate something like: Efficiency Score=Total Net Profit / Total Time Held in Days -
I don’t need it to be perfect — just good enough to compare performance.
-
@k4s4rus You can try this on the 'on trade' tab:

Ypu will need two variables and group will have to be specified on blocks 1 and 2. You will also need as many different variables as groups required to check.
-
@l-andorrĂ Thank you very much. I will try to do this.
-
You're welcome.