this indi displays digits when zoomed in the numbers are unreadable
i think the fix is here
but i am not sure what to change 'digits' too
any help would be appreciated
I would like to change it so it will display as a solid box or even points Re: Cluster box fix
3That would not change the displaysociety wrote: Mon Aug 07, 2017 2:29 am this indi displays digits when zoomed in the numbers are unreadable
digits.GIF
I would like to change it so it will display as a solid box or even points
i think the fix is here
Capture.GIF
but i am not sure what to change 'digits' too
any help would be appreciated
Check the ShowText() function and change it to show objects you need there
Re: Cluster box fix
4Did you make it? I am trying to code a signal in it but I do not know about Indicators' coding yet.
I have tried giving it 2 buffers and getting the signal from:
I have tried giving it 2 buffers and getting the signal from:
Code: Select all
void PreviousBarTotals(int limit,double &lowPrice,int &arraySize)
{
//--- Opening a tick history file
bool fileClose = false;
int hTicksFile = FileOpen(Symbol() + ".tks", FILE_BIN | FILE_READ | FILE_SHARE_READ | FILE_SHARE_WRITE);
if(hTicksFile<1)
fileClose=true;
//--- Search for the first tick belonging to the limit bar or any later bar
TickStruct tick;
tick.time= Time[limit];
tick.bid = Open[limit];
while(!IsStopped() && !fileClose)
{
if(!IsReadTimeAndBidAskOfTick(hTicksFile,tick))
return;
if(tick.time>=Time[limit])
break;
}
//--- Displaying data
datetime extremeTime=Time[0]+PeriodSeconds();
while(tick.time<extremeTime && tick.time!=0)
{
int barIndex=iBarShift(NULL,0,tick.time);
SumDataForOneBar(hTicksFile,tick,lowPrice,arraySize,fileClose);
SumDataFirstHalf(hTicksFile,tick,lowPrice,arraySize,fileClose);
SumDataSecondHalf(hTicksFile,tick,lowPrice,arraySize,fileClose);
//ShowBarHistogramms(barIndex,lowPrice,arraySize);
}
if(!fileClose)
FileClose(hTicksFile);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void SumDataForOneBar(int hTicksFile,TickStruct &tick,double &lowPrice,int &arraySize,bool &fileClose)
{
//--- Reading ticks belonging to one candlestick
int ticksCount=1;
g_ticksPrice[0]=CastPriceToCluster(tick.bid);
if(!fileClose)
ReadTicksFromFile(hTicksFile,PeriodSeconds(),tick,ticksCount,fileClose);
if(fileClose) // This is not an error - else is not needed, because after ReadTicksFromFile execution, fileClose may change
AddDataFromBuffer(PeriodSeconds(),tick,ticksCount);
ArrayMaximum(g_ticksPrice,ticksCount);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void SumDataFirstHalf(int hTicksFile,TickStruct &tick,double &lowPrice,int &arraySize,bool &fileClose)
{
//--- Reading ticks belonging to one candlestick
int ticksCount=1;
g_ticksPrice[0]=CastPriceToCluster(tick.bid);
if(!fileClose)
ReadTicksFromFile(hTicksFile,(PeriodSeconds()/2),tick,ticksCount,fileClose);
if(fileClose) // This is not an error - else is not needed, because after ReadTicksFromFile execution, fileClose may change
AddDataFromBuffer((PeriodSeconds()/2),tick,ticksCount);
ArrayMaximum(g_ticksPrice,ticksCount);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void SumDataSecondHalf(int hTicksFile,TickStruct &tick,double &lowPrice,int &arraySize,bool &fileClose)
{
//--- Reading ticks belonging to one candlestick
int ticksCount=1;
g_ticksPrice[0]=CastPriceToCluster(tick.bid);
if(!fileClose)
ReadTicksFromFile(hTicksFile,(PeriodSeconds()-(PeriodSeconds()/2)),tick,ticksCount,fileClose);
if(fileClose) // This is not an error - else is not needed, because after ReadTicksFromFile execution, fileClose may change
AddDataFromBuffer((PeriodSeconds()-(PeriodSeconds()/2)),tick,ticksCount);
ArrayMaximum(g_ticksPrice,ticksCount);
}