Coding help - page 717

 
 

Hi,

I have only ex4 file. I would like loaded a data with indicator (function iCustom). I don't know what i should write on input in "Stratman Trend Mode". Maybe you know? :) I send indicator in attach.

Files:
xExt.ex4  41 kb
 
alozard:

hi mladen

               Please correct indicator as shown below.

                                                                          thanks




BB macd does not show "touches" but crosses - since there are no errors, no need for a correction
 

mr mladen:

which one code must be add or remove on indicator to run it several time on chart?

i can only run it for one time. i need run it for several time on chart

best regard

 
bilbao:

mr mladen:

which one code must be add or remove on indicator to run it several time on chart?

i can only run it for one time. i need run it for several time on chart

best regard

Every indicator can run several times

But if it handles objects, then it has to be changed accordingly (to handle objects that belong only to the instance it is created from)

 

regard

i modify it

could you check it

sorry me. i can't do it 

i need run it for several time on chart 

best regard 

Files:
 
bilbao:

regard

i modify it

could you check it

sorry me. i can't do it 

i need run it for several time on chart 

best regard 

I would need an original (non-decompiled) code to check it. Please, if you have the original source code, post it
 
mladen:
I would need an original (non-decompiled) code to check it. Please, if you have the original source code, post it

having it

best regard 

 
bilbao:

having it

best regard 

Sorry, but those are both decompiled too
 

Has anyone had any experience with finding the highest high and lowest low, between two points in time.  I'm trying to draw a

line at the highest high and lowest low from 3:00 p.m. to 5:00 p.m. est.  ( 19:00 - 0:00 )  I can draw a line between these two

points of time, but only at the high and low of the day.  I can find the high and low between a certain number of candles, but

becomes a problem as time moves forward the candle numbers keep changing.  If I start with the candle at 19:00 ( 228 ) and

count backwards towards the current ( 168 = 0:00 ) 60 candles ( 5 minute chart )  I can get the high and low of each candle, but

I need the highest of the high and lowest of the low.

Below is the code I've been working on.  Maybe someone can tell me what I'm missing or doing wrong.


Thanks!


Yellowbeard


//+--------------------------------------------------------------------------+
//|                                                   Daily High and Low.mq4 |
//|                                                                       me |
//|                                                                          |
//+--------------------------------------------------------------------------+

#property indicator_chart_window

extern int Hour_Num = 19;
extern int Hour_Num_A = 0;

extern int Minute_Num = 0;


    
    
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
   return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
{
//----

    

    
//----
   return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+

int start()
   {

    datetime BeginTime, EndTime;
    int ph;
    int Counted_bars=IndicatorCounted();                                                        
    int p=Bars-Counted_bars-1;                                                                  
                                                                                                
    while(p>=0)                                                                                        
    {    
     if(TimeHour(Time[p]) == Hour_Num && TimeMinute(Time[p]) == Minute_Num)
    
    { ph=ph+1;
    
      double pvH =  iHigh(NULL, 0, iHighest(NULL, 0, MODE_HIGH, 60, 168));  
      
        
    if(p > 0)
    {
    BeginTime = iTime( NULL, PERIOD_D1, pvH );                                                      
    EndTime   = BeginTime - 18000;                                                                
    }
                                                                                              
    //double pvH=iHigh(NULL, PERIOD_D1,ph);
    
   //  double pvH=iHighest(NULL,0,MODE_HIGH,60,-168);
        
     /*  ObjectDelete("DnSymbolBz");
       ObjectCreate("DnSymbolBz", OBJ_ARROW, 0, Time[p],pvH);                  
       ObjectSet("DnSymbolBz", OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN);
       ObjectSet("DnSymbolBz", OBJPROP_WIDTH,2);      
       ObjectSet("DnSymbolBz", OBJPROP_COLOR,Red);
       ObjectSet("DnSymbolBz", OBJPROP_ANCHOR, ANCHOR_BOTTOM);*/

    
        ObjectDelete("OpenTtA");
        ObjectCreate("OpenTtA",OBJ_HLINE,0,Time[p],pvH);
        ObjectSet("OpenTtA", OBJPROP_COLOR, LightGreen);
                                                    
                                                                                                    
  // Alert("pvH =  ",pvH);
    
    ObjectDelete("pHg_Line"+ph);  
    ObjectCreate("pHg_Line"+ph, OBJ_TREND, 0, BeginTime, pvH, EndTime, pvH );                          
    ObjectSet("pHg_Line"+ph, OBJPROP_COLOR, MediumSeaGreen);
    ObjectSet("pHg_Line"+ph, OBJPROP_STYLE, STYLE_DASH);
    ObjectSet("pHg_Line"+ph, OBJPROP_WIDTH, 1);
    ObjectSet("pHg_Line"+ph, OBJPROP_RAY, False);  
    
    }
    p--;  
   ObjectSet("pHg_Line"+ph,OBJ_TREND,EndTime);
    
    
    ChartRedraw(ChartID());

    
    
  
    
     }

//----
   return(0);
}
//+------------------------------------------------------------------+
Reason: