how to write the ea?

 

I want to write a EA, I hope it can buy or sell every 100 point, and takeProfit every 100 point, will you please give me a ideal how to write it?

another question, if I buy 0.01 lot every 50 point, if market no retune, lose 10000 point means how much I will loss? if I can afford it, I think i find a way to earn,

 
jxll:

another question, if I buy 0.01 lot every 50 point, if market no retune, lose 10000 point means how much I will loss? if I can afford it, I think i find a way to earn,


every 50 point or every 50 pips ? lose 10000 point means about at least 10000 $ (Depends on each pair) loss (This does not include the margin u need)
 
jxll:

I want to write a EA, I hope it can buy or sell every 100 point, and takeProfit every 100 point, will you please give me a ideal how to write it?

another question, if I buy 0.01 lot every 50 point, if market no retune, lose 10000 point means how much I will loss? if I can afford it, I think i find a way to earn,


Hi,

I guess you are beginner since you asked such a thing. well, if you need such an easy EA, then you need to setup your conditions like when to buy or sell where and why??? things like that.

Also, if you place 1 buy order say EURUSD at 1.40000 and got -50 pips, which is 1.39500. In this case, you loss around $5 because most good brokers give 0.1 cent value for each pipe.

You can check out this site that offer free pipe calculator: http://global.fxdd.com/en/forex-trading-tools/pip-calculator.html

Best wishes,

SF

 
scarface:


Hi,

I guess you are beginner since you asked such a thing. well, if you need such an easy EA, then you need to setup your conditions like when to buy or sell where and why??? things like that.

Also, if you place 1 buy order say EURUSD at 1.40000 and got -50 pips, which is 1.39500. In this case, you loss around $5 because most good brokers give 0.1 cent value for each pipe.

You can check out this site that offer free pipe calculator: https://www.mql5.com/go?link=http://www.fxdd.com/mt/en/

Best wishes,

SF


thank you sir:

I want to know the code how to buy and sell every 50 pipe, I think OrderOpenPrice function is needed, the latest OrderOpenPrice plus 50 is the price I want to sell.am I right? how can i get the last close price?

 
jxll:

how can i get the last close price?


OrderClosePrice() or Bid, Ask
 

thank you, I buy every 50 pipe, so soon I will have several buying positions, if price go up, i will sell them every 50 pipe, OrderClosePrice() will retune the latest closeprice? and also, if i have several buying positions, the OrderOpenPrice() will retune the latest openprice?

 

and also how can I get the cheapest one's open price?

Reason: