Need help

1 replies

Thomastiger

Subscriber, bbp_participant, community, 5 replies.

Visit profile

10 years ago #111926

Hi can any one help me i need to create

1- rule say if the total loss of trades exceed $100 close all losing trades and start again
2- i need to create one uniq number for ea to be able to put it in more than one chart at the moment i create uniq number for every long and short trade and that is hard i need to create only one for the ea

Thanks

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #123543

Hi,

 

1) to get current open profit/loss you can use function Strategy Control -> Open P/L (in money).

If you’ll set its magic number parameter to 0 it will count open PL of all active orders.

 

So your rule could be like:

IF Open P/L In Money (0) < 100

THEN Close All Positions

 

2) you can create a new strategy parameter(s) for your magic number(s).

Then you also have to use these parameters in Enter at market/stop/limit orders instead of writing there the fixed value.

Just click on the […] button in Magic Number field and you’ll be able to choose from the defined parameters.

 

Then you can set the magic number value in these parameters as you attach your EA to the chart.

 

Mark

Mark
StrategyQuant architect

0

Viewing 1 replies (of 1 total)