Try this one. Maybe it is possible to work.
Line 111 to 133
//ArrayResize(topProfits, DisplayTopCount); ArrayResize(DashKeys, DisplayTopCount); ArrayResize(DashValues, DisplayTopCount); //ArrayFill(topProfits, 0, 0, -999999999); //int lastIndex = -1; //int thisIndex = 0; double TempDouble; string TempString; for(int i = 0; i < DisplayTopCount; i++) { //topProfits[i] = -999999; for(int j = i + 1; j < ArraySize(comments); j++) //for(int j = 0; j < ArraySize(comments); j++) { //if(commentProfits[j] > topProfits[i] && (i == 0 || commentProfits[j] < topProfits[i - 1]) && (j != lastIndex)) if (commentProfits[j] >= commentProfits[i]) { TempDouble = commentProfits[i]; commentProfits[i] = commentProfits[j]; commentProfits[j] = TempDouble; TempDouble = commentLots[i]; commentLots[i] = commentLots[j]; commentLots[j] = TempDouble; TempString = comments[i]; comments[i] = comments[j]; comments[j] = TempString; //thisIndex = j; //topProfits[i] = commentProfits[j]; //DashKeys[i] = "" + comments[j] + " : profit "; //DashValues[i] = "$" + DoubleToStr(topProfits[i], 2) + " / " + "lots : " + DoubleToStr((commentLots[j] + 1), 2); } } DashKeys[i] = "" + comments[i] + " : profit "; DashValues[i] = "$" + DoubleToStr(commentProfits[i], 2) + " / " + "lots : " + DoubleToStr((commentLots[i] + 1), 2); //lastIndex = thisIndex; } }
Nagisa Unada:
Try this one. Maybe it is possible to work.
Line 111 to 133
I tried this and It just made the indicator disappear.
Thank you for trying.
Isn't the "DisplayTopCount" set to 5 in your indicator's settings panel?
Increase it.
Aditional change from line 30 ~
string DashKeys[]; //string DashKeys[8]; string DashValues[]; //string DashValues[8]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping ArrayResize(DashKeys, DisplayTopCount); ArrayResize(DashValues, DisplayTopCount); //--- return(INIT_SUCCEEDED); }
Nagisa Unada:
Aditional change from line 30 ~
If I set it to 7 or less(the number of comments available) it shows right. But at greater than 7 it still disappears.
You can complete the rest on your own.
Nagisa Unada:
You can complete the rest on your own.
You can complete the rest on your own.
Thank you very much for the help, I do believe I can complete the rest.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have a leader-board style indicator that shows the most profitable comments from order history. The problem is if there's a tie it overwrites one of the values instead of showing both tied comments in order.
This is how it looks normally.
This is after I tried to fix it.
I've tried every way I can think of, any help is much appreciated.