need help making my first EA.

 

Helo.

I want to make my first EA. but I have a problem here.

my EA work basicly at the price market. not using any indicators. heres the problem.

first strategy :

at first run my ea will do a buy order. then if the first order reach stoploss, how to make a sell order at stoploss price at the same time?

second strategy :

at first run my ea will do 2 order. first, do buy order, then place a sellstop order at first order stoploss. if the price reach first order stoploss and reach the sellstop order, how to make a buystop order?


and If my order reach take profit I want to back to my first order or stop EA.. but I dont know the code...

logicly like this...



would u guys help me?

sorry, I'm not good speaking english..

Thanks.

Sifor

Files:
sfea_1.mq4  3 kb
 

Yeah your ea is no-where close to what you're looking for. I don't even know where to start explaining how you could code something like that. You'll need to spend some real time learning to code; learning an ea builder or paying someone.

 

I have a lot of time to learning to code. I really want to learn to code this EA. I know I did wrong to make this code. but I don't know the way to fix it. or someone can teach me step by step coding EA?

 

there are a lot learning material on here..

 
thanks albert. Im still reading one by one material on this forum.. hope i can finish my EA.