I am trying to create a chart on exploration showing the frequency distribution of a particular array. For example, I have an array(dbar) containing the barcount of each trades drawdown and i want to see the frequency distribution of it:
// This example shows the array for long positions only //
drawdown = LLV(L, Barssince(Buy) - 1);
hasdrawdown = drawdown < BuyPrice;
tbar = Barssince(Buy) - Barssince(drawdown == L);
dbar = 0;
for(i = 0; i < barcount; i++)
{
if(Sell and hasdrawdown)
dbar = tbar;
}
I've been searching online everywhere and can't seem to find a solution. Help would really be appreciated.
// This example shows the array for long positions only //
drawdown = LLV(L, Barssince(Buy) - 1);
hasdrawdown = drawdown < BuyPrice;
tbar = Barssince(Buy) - Barssince(drawdown == L);
dbar = 0;
for(i = 0; i < barcount; i++)
{
if(Sell and hasdrawdown)
dbar = tbar;
}
I've been searching online everywhere and can't seem to find a solution. Help would really be appreciated.