Need help with EA

Back to topics list To post a new topic, please log in or register
slusarczyk 2016.02.11 13:24

Hi, I'm going to make my own EA, but, I have to be honest, I dont know where to start :P

Its pretty simple:

-I have 5% of my acc for lose - my risk

-Every time I open a position, EA checks, how much I have free margin ( this 5% ) 

-no positions- It sets SL at 5% of all acc

-there are positions - It sets SL of piece of this "margin" ( for example: I have one position with moved sl by me at 2% of all acc - It sets sl at 3% )

-It has to be at least, 1% free "margin"

-Every time I open position, EA sets TP at 3% of all acc


1000 on acc - one position with sl at -20 -> I open new one, with SL at -30 and TP at +30 


Is this even possible to make? And sorry for my english :P  How I can make this EA? 

GumRai 2016.02.11 13:48 #

Hi, I'm going to make my own EA, but, I have to be honest, I dont know where to start :P

The rest of your post is too difficult for a newbie coder.

Although "The book" at the top of the page is pretty basic nowadays, it will help you to learn to code. You cannot expect to jump in and write an EA without spending some time studying first. 

WHRoeder 2016.02.11 14:07 #
  1. You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
  2. As for margin:
    • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
    • Account Balance * percent = RISK = |OrderOpenPrice - OrderStopLoss| * OrderLots * DeltaPerlot (Note OOP-OSL includes the SPREAD)
    • Do NOT use TickValue by itself - DeltaPerlot
    • You must normalize lots properly and check against min and max.
    • You must also check FreeMargin to avoid stop out
Back to topics list  

To add comments, please log in or register