Ask! - page 67

 

Heiken email alert

Hello all,

Funny I was looking for an email alert added to this indicator. Maybe the code Guru can help me modify this indicator to send emails? Thank you.

 

How do I easily find what value a variable is in an indicator

Is there a script or something to use, or do I use a comment statement??

Dave

<<<

 
iscuba11:
Is there a script or something to use, or do I use a comment statement??

Dave

<<<

You could try creating a global variable with the indicator and then reading it with your EA. Or you have to make the indicator output the variable via one of its buffers.

 
basza:
Now it can not enter again untill it turns red and the back to blue.

bool CheckHeikenAshi(int cmd)

{

haOpen = iCustom(NULL,0,"Heiken_Ashi_Smoothed",MaMetod,MaPeriod,2,1);

haClose = iCustom(NULL,0,"Heiken_Ashi_Smoothed",MaMetod,MaPeriod,3,1);

switch (cmd)

{

case OP_BUY : if (haOpen < haClose) return(true);

break;

case OP_SELL : if (haOpen > haClose) return(true);

}

return(false);

}

Thanks in advance.

basza

To resolve this issue would require a more complicated function than what you have presented here. The EA would have to "remember" what the indicator is doing by either (1) scanning multiple bars of the indicator (2) storing recent data for the past few bars for what the indicator has done, or what color it was.

 
nyachty:
Hello all, Funny I was looking for an email alert added to this indicator. Maybe the code Guru can help me modify this indicator to send emails? Thank you.

I believe this will work.

 

Retrieving open price to variable

Hi....

I want to retrieve the price and type of order of the current opened position to a variable.

Thank you in advance.....

 

i need help to get this indicator fix

i'm a beginner in mql4 i made this simple indicator to draw midpoint line on chart to help me counting basic elliot wave .

i hope some one help me to fix the angle of the line.

midpoint = (dhigh+dlow)/2

thanks in advance .

//+------------------------------------------------------------------+

//| Mid_Point.mq4 |

//| ashnou |

//| http://finance.groups.yahoo.com/group/ashnou2002/ |

//+------------------------------------------------------------------+

#property copyright "ashnou"

#property link "http://finance.groups.yahoo.com/group/ashnou2002/"

#property indicator_chart_window

#property indicator_buffers 1

#property indicator_color1 Red

//---- buffers

double ExtMapBuffer1[];

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicators

SetIndexStyle(0,DRAW_LINE);

SetIndexBuffer(0,ExtMapBuffer1);

string short_name = "Your first indicator is running!";

IndicatorShortName(short_name);

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator deinitialization function |

//+------------------------------------------------------------------+

int deinit()

{

//----

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator iteration function |

//+------------------------------------------------------------------+

int start()

{

int counted_bars=IndicatorCounted();

//----

if (counted_bars<0) return(-1);

//----

if (counted_bars>0) counted_bars--;

int pos=Bars-counted_bars;

double dHigh , dLow , dResult;

Comment("Hi! good luck in EW! ashnou");

while(pos>=0)

{

dHigh = High[pos];

dLow = Low[pos];

dResult = (dHigh + dLow)/2 ;

ExtMapBuffer1[pos]= dResult ;

pos--;

}

return(0);

}

//+------------------------------------------------------------------+
 
s4325:
Hi....

I want to retrieve the price and type of order of the current opened position to a variable.

Thank you in advance.....

Create a loop that scans through your open orders. When you find the order that you are looking for, check its OrderType() and its OrderOpenPrice() and store those in variables, int and double, respectively.

 

Hi coder guru,

i 'm learning to program in mtq4 language using your lessons and it's a very interesting but long long way for me.

waiting to produce my own EAs (that's the ultime purpose), i test and use EA thats other talentus programmers make.

I am also a fan of the turtle method.

I found on this forum a programmer who made a very good job on an EA dedicated to the turtle method. The EA is very promising but need to be developed again but by some one who has good knowledge in programming. My problem is that the person who made this EA seem to have given up the project because he does not answer any more on the thread he initiated himelf about his EA.

So i would like you to read the thread and to have a look on the EA and tell me if you could be interested to continue the development and testing or not.

I'm currently testing it in a demo account and it's very promising in opening positions but not very good in closing them. this is the point to work on

here is the link of the said above thread: https://www.mql5.com/en/forum/175833

thanks for reading me

Regards,

Jonathan

 

Hi Folks

I am writing rules for an E A before I give it to a programmer to compile.

What indicator could I use to confirm a trend has broken out.

I am looking for an indicator who information can be input into an E A

regards

El cID