How to write a simple expert advisor

To add comments, please log in or register
Trader1529
156
Trader1529  
Good morning everyone, 
I want to write a simple expert advisor, but I don't know how to do it. Can someone help me?

I want that my EA do this:

  - At "Time T" it opens "Buy" or "Sell" position with "Amount z"
  - It close the position when TakeProfit is "x percentage" of "amount z"  or StopLoss is "y percentage" of "amount z"
  
 For example:
 I have 100$ on my account
 I set:
  - Time T = 14:00:00
  - Position = BUY
  - Amount z = 50$
  - TakeProfit = 10%
  - StopLoss = 15%
  
the expert advisor at time 14:00:00 it open a buy position of 50$ [Lots= ("Amount z" * "Leverage"), if the leverage of my account is 100, the lots to open are 5000].

When the profit is of 5$ or when the loss is 7.5$ the position will close.


Minions Labs
1188
Minions Labs  
Trader1529:
Good morning everyone, 
I want to write a simple expert advisor, but I don't know how to do it. Can someone help me?
Trading applications for MetaTrader 5 to order
Trading applications for MetaTrader 5 to order
  • www.mql5.com
Good morning everyone,  I want to write a simple expert advisor, but I don't know how to do it. Can someone help me? I want that my EA do this:   - At "Time T" it opens "Buy" or "Sell" position with "Amount z"   - It close the position when TakeProfit is "x percentage" of "amount z"  or StopLoss is "y percentage" of "amount z"     For example...
To add comments, please log in or register