How to code? - page 37

 

There really is no need to use a custom indicator for this. Just use:

DayHigh = iHigh(NULL,Period_D1,x); // x being the days back

DayLow = iLow(NULL,Period_D1,x); // ditto

 

Fantastic - You made my week!!!!!!!!!!! Thanks a Bunch!!!

Dave

 
omelette:
There really is no need to use a custom indicator for this. Just use:

DayHigh = iHigh(NULL,Period_D1,x); // x being the days back

DayLow = iLow(NULL,Period_D1,x); // ditto

Question my friend. How do I define Period_D1?

Meta editor is asking this. Period_D1=?? Figured out the answer -- Period_D1=1440;

Dave

 

@coz;

It sounds to me like you may be using the qoutes from one currency to set your entry prices on another. So if GBP hits 2.0500 and you place a EUR order with Ask and EUR is trading at 1.xxxx you are trying to get a price that is WAY off qoutes. What you have to do is get the proper quotes for different symbols using the MarketInfo() function.

double eur_ask=MarketInfo("EURUSD",MODE_ASK);

coz:
Hi all,

I'm new to MQL and I am trying to write a program that will open an order on two different pairs at one time. For example, when GBP/USD ask hits 2.0500, open a short on both GBP/USD and EUR/USD. I can only get the position to open correctly on the pair that has the EA attached to it. On the other pair I receive Error 129 (outdated prices). I have tried to use RefreshRates() and it doesn't seem to help, but I could be doing it wrong (I've read the documentation, but didn't get much from it). Can anyone point me to some information that can help me out or post some basic code to get this to work?

I posted this question over at MQL4.com and haven't gotten a response yet so I thought I would try the good group here. I'm sure there's something posted already on this but I just can't find it.

Thanks!
 
1Dave7:
Question my friend. How do I define Period_D1?

Meta editor is asking this. Period_D1=?? Figured out the answer -- Period_D1=1440;

Dave

You do not need to define Period_D1 - it is a pre-defined MT variable. Just typing 'Per...' will trigger MT's auto-menu. Just scroll up/down and you will see Period_M1, Period_M15 etc.

 

Line with multiple colors

Is it possible to draw an indicator with different colors?

I'd like to have my indicator red when greater than 0 and blue when under thus 0.

Thanxx by advance.

 

Cool Background

Hey guys...

would someone PLEASE make an indicator that shows a picture of the background of a chart, instead of a regular color, but a picture with the price on it?

THAT WOULD BE SO COOL!!!

YOU WOULD EVEN MAKE YOURSELF RELAX MORE!!!

Thanks!!!

Dan.!!!

 

That is really crazy.

What for? If you want some price model, you can simply attach all lines/figures on the chart and save as template.

If you just want a background picture... get a second monitor and watch a movie!

 

For some reason this works for 1 indicator I have but does not work for two others. Is there an alternative way of doing this?

 

Help with Crossed Alerts "SendMail" code?

Hi:

Would someone be willing to add "SendMail" code for trend reversal alerts to this indicator?

I would like to receive an email to my cell phone when the ema's cross so I don't have to sit in front of the computer all day long waitng for the next trend reversal (4 hr. charts).

I tried to do it myself but it sent repeated mass emails/text messages (very costly)

Thanks and Cheers!

Reason: