How to code? - page 261

 

cant get any EA to run

Hi, I'm building my first EA. I've been trying to figure out why my advisors wouldn't run for a few days, so I decided to post my question here, in hopes someone will put an end to my frustration .

I have MT4 build 399. Every time I compile and run my EA in MT4 on a chart journal says Expert loaded successfully and expert tab says initialized but then nothing is happening.

I tried to find the bug so I created another very simple EA:

int start()

{

//----

Alert("This is an alert which demonstrates that EA is running ");

//----

return(0);

}

but the situation repeats. It seems that EA loaded successfully but no alert windows are popping up.

thank you, any thoughts appreciated

 

Shut down your MT4 or remove the EA from the chart. I have noticed the same thing occasionally. Also I see that when I do a compile and then press the terminal icon, the old version may run for a minute or so. Don't feel the recent versions are the most thoroughly tested code.

 

hi

i have some code problem,hope some one can help. how to use the JMA instead of the iMA funtion. i want to the iCustom(), but iMA has the ma_shift=-1, and iCustom() does not the ma_shift value. please help.thank you.

aa1= iMA(NULL, 0, MA, -1, MODE_LWMA, PRICE_TYPICAL,i);

 
Tzuman:
Shut down your MT4 or remove the EA from the chart. I have noticed the same thing occasionally. Also I see that when I do a compile and then press the terminal icon, the old version may run for a minute or so. Don't feel the recent versions are the most thoroughly tested code.

thank you for your reply.

The problem was actually in the options->expert advisor settings. I tinkered with it some days ago and perhaps changed the defaults. Hope this help some other newbie with EAs.

 

Total Amount Of Orders

Hi, I'm new to programming and I have created an EA (using a builder) that works but can only open 1 trade at a time. I was wondering how do I code the total amount of orders I want my EA to handle. And also, if I have a trade previously opened, how do I get the EA to open another trade?

Any help will be greatly appreciated. Thanks

 
J_Cutts:
Hi, I'm new to programming and I have created an EA (using a builder) that works but can only open 1 trade at a time. I was wondering how do I code the total amount of orders I want my EA to handle. And also, if I have a trade previously opened, how do I get the EA to open another trade? Any help will be greatly appreciated. Thanks

Should be very easy to do. You can send it to me and I will modify it for you, if your existing EA is sound enough.

Christina

PS: not sure if I can include email here, but it's contactchristinali@gmail.com

 

how to determine maximum excursion of group of currencies

Say you have the following semi-correlated hedged group of currencies each at 1 lot:

AUDUSD Long

EURUSD Short

EURAUD Long

Is there a mathematical formula to determine (or closely approximate) the maximum excursion up (profit) or down (loss) for holding this group over an extended period?

 

mirroring indicator

Dear Coders,

Any one help me, that make mirroring mode(draw indi opposite as up and down side) for this indicator ,i attached the indi,

I hope to turn it on and off (default mode and mirroring mode on inputs screen)

Files:
delta.mq4  3 kb
 

problem solved

 

Chings

hello

I have a version of ChingMaroon That gives me money outside Hot New York Session , like lots of martingales. The EA is excellent, BUT could be better if improves different lot sequence: 0.01...0.02...0.03...0.04...0.05...was not so dangerous and gives us money with more safety to account. The extern settings of EA are not obedient.

Can someone help me changing the code? Is a basic code at Ea, but couldn t change it with results....

I won Live account money with the EA...always during the markets calm...

Reason: