READ-ONLY

The forum is now a read-only archive.

For bug reports & platform questions → [email protected]

Our community lives on Discord and YouTube — come join us!

Closing a trade AS price (bid) crosses SMA20

9 replies

onis_uk

Subscriber, bbp_participant, community, 27 replies.

Visit profile

11 years ago #114138

How do i get the EA to close a trade AS price crosses the SMA line ? currently i have this (see pic) and its a bit lagging (see other pic ) its closing after the close of the bar not as it happens ! 

File: exit.jpgexit.jpg
File: close.jpgclose.jpg

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

11 years ago #132389

Try to use bar Low/High instead … i.e. if High[0] > SMA then Close positions. This should solve this

0

onis_uk

Subscriber, bbp_participant, community, 27 replies.

Visit profile

11 years ago #132399

thanks but solved with ask crosses above SMA(20)[0] !

0

Rocksolidfx

Subscriber, bbp_participant, community, 39 replies.

Visit profile

10 years ago #137707

Having the same problem please can you attach rule. Cheers Guys  :rolleyes: .. or price level goes above 100pips close either if you can Thank you.

0

Rocksolidfx

Subscriber, bbp_participant, community, 39 replies.

Visit profile

10 years ago #137708

I tried using the the ask Price as suggested  with a magic number no joy.. 

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #137754

You have set magic numbers incorrectly it seems. You used 11111 for long then you try to close 1000 and sell short with 2001.

 

Check magic then on short tab.

Hidden SL condition should be Open PL < -50 since you want to close a position when open profit is less then -50

0

Rocksolidfx

Subscriber, bbp_participant, community, 39 replies.

Visit profile

10 years ago #137769

Thank you T

I followed your instruction  above but still does not close when negative.. 

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #137801

Ok, will check it and let you know

0

Rocksolidfx

Subscriber, bbp_participant, community, 39 replies.

Visit profile

10 years ago #137887

all good figured it out

0

Rocksolidfx

Subscriber, bbp_participant, community, 39 replies.

Visit profile

10 years ago #137888

You have to assign the varable sma -50 in you exit function

0

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