Please, I need your help with my EA...

 

Hello.

This is my first EA (from a custom indicator), but I have a problem because the function ICUSTOM I think that I made the wrong programming... someone can help me???

Send two files. the indicator and the EA.

Please, help me.

Thanks.


Jarol R.



 
jarc1027:
Files

Where is your code?
 
Indicator...
Files:
 
EA...
Files:
 
Kane59:

Where is your code?
Thanks, hello, I attach the files
 

Hello,


there is a lot of error ! euh, where can we begin???

I advice you to read again your code, there is some problem like that for exemple:

         Ticket=OrderSend(Symb,OP_SELL,Lts,Bid,2,SL,TP);//Opening Sels
         if (Ticket < 0)                        // Success :)
         {
            Alert ("Opened order Sell ",Ticket);
            return;
         }
         else
           {
               (Fun_Error(GetLastError()) == true)
           }

Ticket has to be > 0

 
jarc1027:

Hello.

This is my first EA (from a custom indicator), but I have a problem because the function ICUSTOM I think that I made the wrong programming... someone can help me???

Send two files. the indicator and the EA.

How many buffers does your Indicator have ?  what buffer numbers are you using in your iCistom() calls ?
 
Kane59:

Hello,


there is a lot of error ! euh, where can we begin???

I advice you to read again your code, there is some problem like that for exemple:

Ticket has to be > 0


Thanks, please, help me because I'm begginer in this...
 
RaptorUK:
How many buffers does your Indicator have ?  what buffer numbers are you using in your iCistom() calls ?

The indicator have 4 lines and I see 7 SetIndexBuffer, But that is where I have more questions, because I do not know how to apply the union between indicator and EA.

Friend, please, help me !!! I am beginner, and i have very much doubts, Please....


 
jarc1027:

The indicator have 4 lines and I see 7 SetIndexBuffer, But that is where I have more questions, because I do not know how to apply the union between indicator and EA.

Friend, please, help me !!! I am beginner, and i have very much doubts, Please....

Read "your" code and learn . . . 

#property  indicator_buffers 4       //<-------     
#property indicator_color1 Red      
#property indicator_color2 Red
#property indicator_color3 Blue
#property indicator_color4 Blue

//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];



//---- 7 additional buffers are used for counting.   //<-------
   IndicatorBuffers(7); 
 
RaptorUK:

Read "your" code and learn . . . 

 


Ok, friend, 4 buffers, but I can not understand what is the condition to open or close positions in the EA with these four lines, because in the indicator repeats en two lines the same parameters (wt) and (lsma-ma),


how I can apply this condition indicator in EA?

            ExtMapBuffer1[shift] = wt[shift];
            ExtMapBuffer2[shift] = lsma_ma[shift];
            ExtMapBuffer3[shift] = wt[shift];
            ExtMapBuffer4[shift] = lsma_ma[shift];                       
           
            if (wt[shift]  < lsma_ma[shift])
            {
                ExtMapBuffer4[shift] = EMPTY_VALUE;
                ExtMapBuffer3[shift] = EMPTY_VALUE;
           }         

Reason: