Es will einfach nicht
Jetzt hab ich zwar keine Fehler mehr beim kompilieren, aber jetzt werden auch keine Kerzen mehr angezeigt???
Nochmal.
Schnipsel 1
bool JUST_ONCE = false;
string SYM = Symbol();
int PER = Period();
bool START_TIMER = false;
int START_TICKS = 0;
sollte richtig sein
Schnipsel 2
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicator line
IndicatorBuffers(3);
SetIndexStyle(0,DRAW_HISTOGRAM,0,2);
SetIndexStyle(1,DRAW_NONE);
SetIndexBuffer(0,val1);
SetIndexBuffer(1,val2);
//----
return(0);
//Kingbar 2.4 update begin
EventSetTimer(3);
//Kingbar 2.4 update end
}
Schnipsel 3
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
//Kingbar 2.4. begin
START_TICKS++;
if(START_TICKS < 3 || !START_TIMER)
return 0;
//Kingbar 2.4. end
if(JUST_ONCE)
{
for(int i=0; i<Signal_Count; i++)
{
if(Signal_State[i] != -1)
{
switch(GetSignalState(i))
{
case -1: break;
und Schnipsel 4 (außerhalb)
else
CheckNewBars(0);
return(0);
}
// Kingbar 2.4 begin
void OnTimer()
{
START_TIMER = true;
EventKillTimer();
}
// Kingbar 2.4 end
//+------------------------------------------------------------------+ script ende