Programming help with an easy EA

 

Hello guys,

that's a nice forum you have here - just found it through google. Please excuse spelling mistakes, my mother tongue is not english.

I'm am trying to learn how to code my own EA but i'm not a good coder yet. I managed it to set up an easy strategy with a forex EA generator and MQL4 Code Base: expert advisors, custom indicators, scripts and libraries

That is my current code:

test170213.mq4

Now i want to add two more things:

- The EA buys if a certain indicator has the value 0 and sells if the indicator has the value 100. How can i tell Metatrader to buy/sell just once per signal. For example if the Indicator stays at 100 for a longer time it should buy just once.

- The other thing that i want to realize is that the script should wait for x minutes if it gets a signal from the indicator before entering the trade.

It would be great if one of you guys could help me. Thanks in advance.

nothin

Files:
test170213.mq4  11 kb