Jump to content

Need help writing a simple ea for mt4


candyman

Recommended Posts

i need someone to help write a simple previous bar breakout ea.

 

any help would be greatly appreciated.

 

basically the ea would be like this.

 

only opens one order per currency at a time.

if the previous bars body (open and close) is greater than 10 and lower than 30 the ea should open buy stops at the previous days open and close. if the open is higher than the buystop/limit would be there and the sell would be on the close and visa versa if the close is higher.

 

the take profit would be the size of the previous bars body. open[1]-close[1] or however it can be determined.

 

the stop loss on a buy is the open or close of the previous bar whatever is lower and the stoploss on a sell would be the previous open or close whatever is higher.

 

if the stoploss is taken out then the lot size doubles (martingale type trading)

if the take profit is triggered the lot size returns to the original lot size.

 

i hope all is clear.

thanks and blessings.

peace

Link to comment
Share on other sites

  • 10 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...