Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 907

 
Try splitting up into functions.
 
nikelodeon:
Good day!!! Guys, help me fix the indicator. When old builds worked fine, but I recompiled it with a new compiler and got a stack overflow error. How to fix it I'm not sure what to do now. I can't increase the stack in indicators :-(. I sure hope it will help. Thank you
Fixed something. There are two remarks with logic left.
Files:
 
Thank you very much!!!!!
 
Help with the code! I need to find a minute bar amongst zero to the first of this day with maximumtick volume!
 

Why don't you like the answer on the fifth forum?

You can, of course, loop through all the candles, but it's much easier that way. You copy all the volumes into an array and use the ArrayMaximum function to find the maximal value in the array.

 
AlexeyVik:

Why don't you like the answer on the fifth forum?

You can, of course, loop through all the candles, but it's much easier that way. You copy all the volumes into an array and use a mathematical function to find the maximum value in the array.

Man, I can't write such a code with an array myself.
 
sashasonik:
I can't write such a code with an array.

I'm sorry, I don't mean to be rude. Then why do you bother with programming at all?

Although, there are many of those who write chunks of code instead of explaining what for. You have to give a shit.

And I prefer to explain but not to write pieces.

 
Good afternoon all. Question, does anyone have an indicator to calculate the sharpe coefficient???? I have described an indicator that takes signals from another indicator and calculates Z-score for each signal. It is very useful at using NS, it is useful but not enough. I tried to build Sharp's coefficient, but it did not work. Maybe someone already wrote a similar, in exchange I can share the work on NS....
 
Or better yet, the coefficient of SORTINO..... That would be really cool...
 
AlexeyVik:

I'm sorry, I don't mean to be rude. Why would you want to do programming at all?

Although, there are a lot of people here who write pieces of code instead of explaining what's what for. You've got to give it to me.

I prefer to explain but not to write bits and pieces.

Got it! There you go. Thanks.

int bar1=iBarShift(Symbol(),PERIOD_M1,iTime(Symbol(),PERIOD_D1,0));//Print(bar1); //first bar
int MaxVol=0;
int i=0, n=0;
for (i=bar1; i>0; i--)
{
//if (i<bar);
//if (TimeMinute(Time[i])!=Minute()) break;
if (iVolume(Symbol(),0,i)>MaxVol)
{
MaxVol=iVolume(Symbol(),0,i);
n=i;
}
//Print(MaxVol," MaxVol ", n, " n");
}
datetime MaxVolT = iTime(NULL, PERIOD_M1, n);