Errors, bugs, questions - page 2318

 
pantural:

Hello dear MT developers, I want to report an error in the algorithm for calculating the Sharpe Ratio. The attachment contains a report by Mr.Aleksey Vyazmikin where SR=0.29 however according to my calculations it is about 3.7-3.8 (depending on whether zero PnL is considered). I think that the error is in the lack of scaling factor for the standard deviation (sqrt(length)) because the average retour does not depend on the series length, it converges and the RMS increases as sqrt(length)

C++

double SharpRatio(vector<double> pnl)

{

double avret = 0;

for (int i = 0; i < pnl.size(); ++i) avret += pnl[i];

avret /= pnl.size();


double var = 0;

for (int i = 0; i < pnl.size(); ++i) var += pow(pnl[i] - avret, 2);

var = sqrt(var / pnl.size()) / sqrt(pnl.size());


return  avret / var;

}

1.What data are contained in the pnl array? How are they calculated and what are you comparing your version of the Sharpe Ratio calculation to?

2. What does this entry mean? Highlighting your

var = sqrt(var / pnl.size()) / sqrt(pnl.size());

 

Why is it that optimisation does not always round correctly, I understand that this is probably the same effect as printing doublets, but to the user's eye this is not pleasant in the optimiser window - the information is difficult to perceive visually.

double ret=Balans_Delta*1000+NormalizeDouble(PF,2);
 

POSITION_REASON does not change in this case. For example, I opened a BUY position of 1 lot with a magic 5 and then made a SELL of 1.2 lots with my hands. As the result we have SELL position at 0.2 lots, magic is reset to zero, but POSITION_REASON remains POSITION_REASON_EXPERT instead of POSITION_REASON_CLIENT.

Please correct this error.

 
pantural:

Hello dear MT developers, I want to report an error in the algorithm for calculating the Sharpe Ratio. In the attached report by Mr.Aleksey Vyazmikin where SR=0.29 but according to my calculations it is about 3.7-3.8(depending on whether zero PnL)

Answered where the question arose initially

Forum on trading, automated trading systems and testing trading strategies

I am using machine learning in trading: theory and practice (trading and not only)

Rashid Umarov, 2018.11.05 15:15

Generally, it is advisable to understand the meaning of parameters before taking them for granted. Having received such a value you should have thought about it and started looking for an error in your calculations.

Because the Sharpe Ratio is more than 3 says that we are facing a 100% earning strategy, and the probability of making a profit on it is more than 99.99%. If the distribution of PnL is normal, of course.


 

"The chart has shut up" (see screenshot). Prices have gone far away and everything is still on the chart. The new chart is loaded in a "shut up" state.

Bild 1940, 02.11.2018

 
Igor Semyonov:

"The chart has shut up" (see screenshot). Prices have gone far away and everything is still on the chart. The new chart is loaded in a "shut up" state.

Bild 1940, 02.11.2018

Show me the EURUSD symbol settings. Interested in how it is built, by fins or by bids

 
Slava:

Show me the EURUSD symbol settings. I want to know if it is based on flippers or on bids.

Slava:

Please show me the EURUSD symbol settings. I want to know if it is based on flippers or beads

 

Forum on trading, automated trading systems and trading strategy testing

Features of mql5 language, subtleties and tricks

fxsaber, 2018.11.05 14:46

Please developers to clarify the situation. When PositionID is changed, after five flips, the Trading History tab will show five positions in the "Positions" display mode.

Now (the PositionID does not change during a flip) only one position is always shown. This is, to put it mildly, a strange solution.

 
Rashid Umarov:

1.What data is contained in the pnl array? How are they calculated and what are you comparing your version of the Sharpe Ratio calculation to?

2. What does this notation mean? Highlight your

Obviously this means to divide the RMS by the root of the sample length, or the ratio of mean return to RMS multiplied by the root of the sample length. Learn the math as they say)))

 
Igor Semyonov:

Symbol settings, not graphics.

In market overview, select "symbol specification" from the symbol context menu

Reason: