Discussion of article "LifeHack for trader: "Quiet" optimization or Plotting trade distributions"
Well, a separate plug-in is also good)
Thanks!
It is not clear why it was necessary to recalculate positions from deals.
Add up the results of all deals for each instrument - in the end we will get profit/loss distribution for it.
How is counting by deals more convenient? For example, a position was held for a week, and there were 100 deals during this time. Distribution by days and hours will be better filled in.
1. It is not clear why it was necessary to recalculate from trades - positions.
...
...
2. How is counting by trades more convenient? For example, a position was held for a week, and there were 100 deals during this time. Distribution by days and hours will be better filled.
A position is a holistic characteristic, while an order and a transaction are a piece of it.
In the final report we do not see individual positions, we see their sum. And adding up the results by deals or the results by positions, we will get the same sum at the end of calculations. But adding up just deals is easier and as I mentioned earlier - the distribution by days and hours will be better filled in.
In fact, very often a position consists of just two trades - the first one is an entry and the second one is an exit.
In the same multicurrency, which you have taken for an example, when profit on a position grows, additional trades are added to it. And only if the position is unsuccessful - closing and reopening. Or there can be such a variant - it was successful, a couple of fills were made, but the price went the wrong way and only then closed and reversed the position. So the variant with only 2 trades is a special case.
Couldn't you add calculation by trades as an option? I, for example, would use it. Or can't articles be changed after publication?
Thank you for your contribution,
Excellent material.
This is where zero division sometimes occurs :
temp=(m_arr_struct_positions[j].prev_volume*m_arr_struct_positions[j].prev_price+volume*price)/
(m_arr_struct_positions[j].prev_volume+volume);

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article LifeHack for trader: "Quiet" optimization or Plotting trade distributions has been published:
Analysis of the trade history and plotting distribution charts of trading results in HTML depending on position entry time. The charts are displayed in three sections - by hours, by days of the week and by months.
This article offers a slightly different look at the process of creating a trading robot. Before running the optimization of input parameters, you can simply look at the distribution of profits and losses depending on the time of entry. After all, many strategies have "favorable" and "unfavorable" moments for entering the market. This article considers plotting distribution charts of position profitability (please note, not deals, but the exactly positions!) depending on their opening times. After studying these charts, it will be possible to look at the strategy from a slightly different point of view.
The charts are plotted by calling the Google Charts. And for their visual representation, the HTML has been selected. Schematically, the distribution charts are displayed on the page as a table:
Fig. 1. The appearance of the HTML report
Author: Karputov Vladimir