how to write a code in which a position will be increased compared with the last opened order and it's lotsize

 

Hi together,

 

I've got a question regarding trades already existing and therefore open new positions.

I have two open trades...one long and one short with Lotsize 0,01...Now I want the EA to open 2 new positions when the underlyings direction is 30 Pips higher than from the first trades. The EA opens 1 new position in "trend"-direction with a factor of x and another 1 position as hegded position with half of the lotsize which was used for the new "trend"-direction..in this case factor/2 or Lotsize of Trendposition divided with 2.

 Anyone who can help me?

 

Thank you

 

Marc 

 
nirvanamac: 

I've got a question regarding trades already existing and therefore open new positions.

I have two open trades...one long and one short with Lotsize 0,01...Now I want the EA to open 2 new positions when the underlyings direction is 30 Pips higher than from the first trades. The EA opens 1 new position in "trend"-direction with a factor of x and another 1 position as hegded position with half of the lotsize which was used for the new "trend"-direction..in this case factor/2 or Lotsize of Trendposition divided with 2.

 Anyone who can help me?

  1. You've got a question but never asked one. "I want" is not a question.
  2. Why would you want to hedge. Your loosing two spreads and making no money?
  3. Since there are no slaves here, there are 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 and the nature of your problem.
 
WHRoeder:
  1. You've got a question but never asked one. "I want" is not a question.
  2. Why would you want to hedge. Your loosing two spreads and making no money?
  3. Since there are no slaves here, there are 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 and the nature of your problem.


1. Sry for my "wrong" explanation.

2. I'd like to open the initial trade with a hedge. My aim is to have a system which "independent" from any trend. After reaching a given quote 2 new positions will be opened. You are right...I'll loose spread, but I gain safety.

3. My Problem in this case is that I've searched through this and other forums, but I didn't find any answer which solve my case.

 Regards

 Marc 

Reason: