Total mql4 newbie seeking guidance

Back to topics list To post a new topic, please log in or register
avatar
3
yarek37 2015.07.15 09:16
 

Hi mql4 community!

As the subject says, I am an mql4 newbie and I would appreciate a lot if someone could point me in the right direction.

This is what I want to accomplish:

- An EA that opens position in EurUsd when one of many conditions is true and then closes this position after X amount of time.

- The condition/conditions is not a Custom Indicator (at least not that I know) and is something like this:

- Every minute check for closing price. If closing price is higher than -1 minute closing price, and -1 minute closing price is lower than -2 minutes closing price, and -2 minutes closing price is higher than -3 minutes... (this up to -5 minutes and higher or lower are just examples here) the trigger EA.

 

The question is how do I do this and where do I start?

Many thanks. 

avatar
Moderator
3411
GumRai 2015.07.15 09:56 #
 

The Book, linked at the top of the page will help you get started with the basics.

You will need to learn the basics before attempting to code such an EA.

Reading old topics here can help a lot as probably all questions have been answered at least once.

If you don't want to learn how to code an EA, the link at the top of the page, Freelance will take you to where you can order an EA to be coded for you. 

avatar
3
yarek37 2015.07.15 09:59 #
 
GumRai:

The Book, linked at the top of the page will help you get started with the basics.

You will need to learn the basics before attempting to code such an EA.

Reading old topics here can help a lot as probably all questions have been answered at least once.

If you don't want to learn how to code an EA, the link at the top of the page, Freelance will take you to where you can order an EA to be coded for you. 

Thanks for the input.

In particular I would like to know how to get the price at the end of each minute. I didn't find such predefined variable in the documentation. 

avatar
Moderator
3411
GumRai 2015.07.15 10:22 #
 
yarek37:

Thanks for the input.

In particular I would like to know how to get the price at the end of each minute. I didn't find such predefined variable in the documentation. 

If you mean the bar closes on the M1 chart, then you can use Close[] if you have the M1 chart open

If you have the chart open in another timeframe, then you can use iClose() 

 

avatar
3
yarek37 2015.07.15 11:29 #
 
GumRai:

If you mean the bar closes on the M1 chart, then you can use Close[] if you have the M1 chart open

If you have the chart open in another timeframe, then you can use iClose() 

 

Thanks! I will look into close[]
Back to topics list  

To add comments, please log in or register