Scripts: ClosePosition

 

ClosePosition:

The script is designed for closing open positions.

Author: Nikolay Kositsin

 
Thank you verymuch
 

If the OpenBuyPosition script opens two times in a row, the ClosePosition script does not close the whole position.

 

hi;


it does not work for me ,  double click on it but don't happend any thing.

what is wrong for me?

 

I just checked - it works.

I open the trade for USDCHF, after that - to close it - I attached the script to USDCHF chart. And the trade was closed.

 
newdigital:
don't work for me on 2 different metatrader 5 terminal broker , ( demo and real ) ?!
 
TIMisthebest:
don't work for me on 2 different metatrader 5 terminal broker , ( demo and real ) ?!
Do you got some messages in the logs ? What is your open positions when you run the script and did you change the default settings ?
 
angevoyageur:
Do you got some messages in the logs ? What is your open positions when you run the script and did you change the default settings ?

hi angevoyageur

i don't change default.

i have several position. ( even run it on all chart i have position on it )




 

ah, i  must do this


thank you

 
TIMisthebest:

hi angevoyageur

i don't change default.

i have several position. ( even run it on all chart i have position on it )

As you can see in your screenshot, autotrading is disabled in your terminal. You have to enable AutoTrading for this script to work.
 
TIMisthebest:

ah, i  must do this


thank you

You are welcome