Reply

HOW TO SET EA TO OPEN ORDER IN OPPOSITE DIRECTION

4 replies

msophe

Subscriber, bbp_participant, community, 124 replies.

Visit profile

9 years ago #113598

HI

 

I have buy new stragey E.A, i try to set some method in E.A but i have fail one thing, i want to set in E.A to open trade in opposite

 

direction if will close in loss,

 

 example, if the first positon open is long position and close at loss, so I want E.A after see that it close

 

with loss to open immediately in opposite direction in order to copersate loss.

So please help me how to set this strategy in Quanty E.A Wizard

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

9 years ago #129820

so this EA is an external strategy?

Maybe something like this:

 

IF    

Last Order was Long

and

Closed PL (your order magic number, 0) < 0     <— this returns PL of the very last order

 

THEN

Enter at market(Short, etc.)

Mark
StrategyQuant architect

0

msophe

Subscriber, bbp_participant, community, 124 replies.

Visit profile

9 years ago #129824

thanks for your explanation,

 

but can do a favour for me to shows step by step, be couse am new customer, so if i was set is long and buy with loss, so where i will put strategy that if will

 

close with loss, open short with profit ? but one thing am use bollinger band to set my strategy in long and short, but i have experience that both long and short

 

have some loss, so i want if one of the position is open may be long and close with loss i want E.A to open possition immediatelly in opposite direction in order to

 

compansate,

 

and the same to short position,

 

Am wait for your help ? thanks

0

msophe

Subscriber, bbp_participant, community, 124 replies.

Visit profile

9 years ago #129838

HI

Please there any one can answer my question

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

8 years ago #130151

Hi msophe,

 

from what I understand I tried to make an example of how EA rules could work for you.

  1. Go long – if last candle closes above upper Bollinger band
  2. Go short – if last candle closes below lower Bollinger band
  3. Revers short – if Long position closed with loss, go short
  4. Revers long – if Short position closed with loss, go long

For the simplicity I added profit-target 20 pips and stop-loss 10 pips for each order.

Notice magic numbers marked with arrows. It needs to be set correctly.

 

 

1

Viewing 4 replies - 1 through 4 (of 4 total)