doubt to understand how this indicator

 
Hello people
I'm new to the area of programming
I'm wanting to learn how indicator standard candle.
I'm in doubt type in these commands
Open [N1)
Open [N2)
Open [N3)

Close [N1]
Close [N2]
Close [N3]

High [N1)
High [N2)
High [N3)

Low [N1]
Low [N2]
Low [N3]


which would command the sail today?, the penultimate sailing
or third candle

ta written as the indicator of the standard hammer

/ Check for Hammer
   if (High [N3]> High [N2] && Low [N3]> Low [N2] && High [N2]> High [N1] && Low [N2]> Low [N1] && Open [N1]> Close [N1 ] && (High [N1]-Open [N1]) <= (High [N1]-Low [N1]) / 6 && (Open [N1]-Close [N1]) <= (High [N1]-Low [N1]) / 3) {
       ExtMapBuffer2 [N1] = Low [N1];
       ObjectCreate (PatternText [N1], OBJ_TEXT, 0, Time [N1], Low [N1] - Point);
       ObjectSetText (PatternText [N1], "Hammer," 9, "Times New Roman", Blue);

    }
   
   if (High [N3]> High [N2] && Low [N3]> Low [N2] && High [N2]> High [N1] && Low [N2]> Low [N1] && Open [N1] <Close [N1 ] && (High [N1]-Close [N1]) <= (High [N1]-Low [N1]) / 6 && (Close [N1]-Open [N1]) <= (High [N1]-Low [N1]) / 3) {
       ExtMapBuffer2 [N1] = Low [N1];
       ObjectCreate (PatternText [N1], OBJ_TEXT, 0, Time [N1], Low [N1] - Point);
       ObjectSetText (PatternText [N1], "Hammer," 9, "Times New Roman", Blue);
    }
I can not imagine an indicator of standard of sailing send signal to buy or sell for a robot

how would this command?
when you find the default indicator hammer example
send command to robot buy

the indicator that I am studying is called candel sticks.mql

http://www.forexfactory.com/attachment.php?attachmentid=23526&d=1172427619

sorry if I typed a word wrong is pq'm using google translator

I'm from Brazil and do not understand English law


 

This indicator is not going to give you a signal it's going to mark the chart with the pattern. What you can do is create a function in you EA with pattern code that you want to find and open trades that way. You can also display the graphics if you want from your EA. Then you will not need he indicator. When I look for patterns, doji, hammer, engulfing etc.. I put the code in my EA, for me it's less of a hassle.

This is not the pattern you are looking for but it should give you the general idea of how to do it in a EA. ( it's not going to compile because some of the object variables are not in this function.

if(CheckLongPattern())  //<--- check for pattern
 {  
   ... open a trade     
 }

//<---- check for buy pattern in a function

bool CheckLongPattern()
{ 
    shift1 = shift + 1;
    shift2 = shift + 2;
    shift3 = shift + 3;      
    O = Open[shift1];
    O1 = Open[shift2];
    O2 = Open[shift3];
    H = High[shift1];
    H1 = High[shift2];
    H2 = High[shift3];
    L = Low[shift1];
    L1 = Low[shift2];
    L2 = Low[shift3];
    C = Close[shift1];
    C1 = Close[shift2];
    C2 = Close[shift3];         

    if((O1 > C1) && (C > O) && (C >= O1) && (C1 >= O) && ((C - O) > (O1 - C1))) //<---- long engulfing pattern
    {
        if(DisplayGraphics == true) 
        { 
            if(!IsOptimization()) 
            { 
                ObjectCreate("BullEng" + cntLong, OBJ_TEXT, 0, Time[shift1], Low[shift1] - TextOffset * Pips);
                ObjectSetText("BullEng" + cntLong, "LONG", 10, "Times New Roman", White);
                ObjectCreate("upArrow" + cntLong, OBJ_ARROW, 0, Time[shift1], Low[shift1]- ArrowOffset * Pips); 
                ObjectSet("upArrow" + cntLong, OBJPROP_ARROWCODE,SYMBOL_ARROWUP);
                ObjectSet("upArrow" + cntLong,OBJPROP_COLOR,Green);       
                cntLong++;
            }
       }
        return(true);   
     }
    return(false);
}
 

so let me get this straight

instead of creating an indicator that finds standard candle

experd advisor find the pattern, so do not need the indicator, because the own experd will find the standard

now I'm wondering how do I know which command the opening and closing of the current candle

now I'm wondering how do I know which command the opening and closing of the last candle

now I'm wondering how do I know which command the opening and closing of the third candle

for example

(O1> C1)

try to get to understand so I can create several standard

Thank you for helping me

 
mmm1:

so let me get this straight

instead of creating an indicator that finds standard candle

experd advisor find the pattern, so do not need the indicator, because the own experd will find the standard

now I'm wondering how do I know which command the opening and closing of the current candle

now I'm wondering how do I know which command the opening and closing of the last candle

now I'm wondering how do I know which command the opening and closing of the third candle

Read the Book and read the Documentation . . .

Specifically what you are looking for is this: Predefined Variables or maybe even TimeSeries Access

 
mmm1:

so let me get this straight

instead of creating an indicator that finds standard candle

experd advisor find the pattern, so do not need the indicator, because the own experd will find the standard

now I'm wondering how do I know which command the opening and closing of the current candle

now I'm wondering how do I know which command the opening and closing of the last candle

now I'm wondering how do I know which command the opening and closing of the third candle

for example

(O1> C1)

try to get to understand so I can create several standard

Thank you for helping me

Yes, put it in the EA and then you do not need an indicator. There are examples of finding candle patterns all over the web and this site like this one https://www.mql5.com/en/code/8621 . Read the book and pay attention to the areas that Raptor pointed out. I think you will find the pattern search will be the easy part of creating an EA.
Reason: