How to code? - page 251

 

EA debugging Please - MaxTrades

Hi!

Can somebody point me out what is wrong with the attached code?

It works on Tester, but either stops trading after 1 open order or it trades more than MaxTrades on Demo accounts. Using Alpari UK. Does it matter?

I tried everything... I could think of.

Thank you for your help,

Have fun,

Simon

Files:
 

PriceAction Indicator

Gidday

I would like to know how to use the array and the bar setup in an ea.

with out calling the indicator how keep the arrows etc.

Cheers

Beno

Files:
 

Problem with indicator programming

Hi,

I have problems with programming an indicator. How can I code it, that the indicator shows a special value from 8 to 9 o'clock every day?

I only can code it from the time I start the indicator with the

"iBarShift(NULL,TimeFrame,startzeit);" - function.

But how can I do it for the past?!

At the time it put the indicator on the chart it calculates the old values in reference to the actuall time.

I would be very, very grateful if anybody can give me a hint!

 

I have answered my question and used this functions:

if( TimeHour(Time)== TimeHour(endzeit) && TimeMinute(Time)== TimeMinute(endzeit))

 

Period() isn't working right

Hi,

I am programming an indicator and using the function Period().

But it doesn't work really.

On the Timeframe M1 the Period()-Functions gives 1 ...or...60 back.

On the Timeframe M15 the Period()-Functions gives 15...or...60 back.

On the Timeframe H1 the Period()-Functions gives 60 ...or...60 back.

On the Timeframe H4 the Period()-Functions gives 240 ...or...60 back.

...

Why?? What can I do against that?!

 

bar of the cross?

new to coding...

Will someone please post how to designate the bar during which two moving averages cross?

Thanks

 

array code

can anyone help me with a bit of code to put my orders into an array so i can choose by array position whitch to modify ifyou have a bit of code i can figure it out i am new been coding almost a week now and i got i little ea already formed

Files:
 
Files:
a4.mq4  3 kb
 

Take out:

Sleep(1000);

RefreshRates();

With US brokers u can not have open buy and sell on the same pair (Hedging).

To be sure, u will need Orders Calculator.

 

Required Help for MQL4 Programing

Hi Everybody,

Wishing you a Happy New Year.

Actually I am New to Metatrader 4 Programing. And also I don't have any experience in Programing. I just trying to learn from the basics. When I tried to make a EA, I failed to calculate the "Average". This is because of, as i told you before, I am new to this.

I request you to, if anybody can solve this problem, this will be very helpful for me.

Here is the problem which I am Facing.

-------------------------------------------------

double myhigh,myhighavg;

myhigh=High[1] - Close[2];

---------------------------------------------------------

myhighavg= 14 days average of "myhigh"

--------------------------------------------------------------

this is what i want to learn for you, how we can code for 14 days or 7 days or 21 days average of "myhigh"

still if you can't understand, plz reply to this.

I waiting for you replies with help

Reason: