Reply

determining current position size when using predefined MM

3 replies

huangwh88

Customer, bbp_participant, community, 113 replies.

Visit profile

7 years ago #116431

I have a strategy that has profit taking that goes something like this:

 

-If in profit and price crosses below 20MA, close 1/3 of original position

 

-If price crosses below 20MA again, close another 1/3 of original position

 

-Trail the last 1/3

 

I am using predefined MM risking % of equity so my original position size is determined automatically. I cannot set a specific number of lots to close each time because I do not know the original position size. I also cannot set % position to close each time because it is first 33%, then 50%.

 

How can I make the EA recognize the current position size?

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #141924

Hello,

 

you can easily calculate the entire position sizing with your EA and use the value for other calculations. See the example attached

0

huangwh88

Customer, bbp_participant, community, 113 replies.

Visit profile

7 years ago #141950

Hello,

 

you can easily calculate the entire position sizing with your EA and use the value for other calculations. See the example attached

 Thanks Tomas. 

 

I have 2 questions regarding the example. 

 

1) You use SLPips=ConvertToPips(ATRvalue). This means you are using the ATR value as your SL correct? Then how come for the market order condition, a SL of 20 pips is specified?

 

EDIT: I believe SLPips is just used to calculate position sizing. It need not be the actual SL used in the order. 

 

2) No global money management is used, and to determine position size you create a variable for pip value. If instead I use the risk % equity global MM, do I need to enter the pip value anywhere?

 

Thank you!

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #141989

Hello,

 

the ATR is used to define SL distance. Then the defined SL size is used to calculated the lot size

 

Yes, you can use the predefined MM “risk % of equity…” It should do the same job. I showed the process of determining MM values manually if you’d need to do some additional calculations later 

0

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