fxcodebase-backup

Close ALL Strategy

Source: https://fxcodebase.com/code/viewtopic.php?f=31&t=64053
Forum: 31 · Topic 64053 · 10 post(s)


Close ALL Strategy

Apprentice · Thu Nov 03, 2016 8:03 am

Strategy will automatically close ALL open positions and cancel all pending orders when the target P/L in PIPs is reached. Profit is based on all open positions.

Close ALL Strategy.lua

The Strategy was revised and updated on January 18, 2019.


Re: Close ALL Strategy

marcolivorno · Thu Nov 03, 2016 1:14 pm

Good evening, I would, however, need to be able to close based on the total of open positions and not individually. For example, if the total of 10 pair arrives to +50 pips (5 pair +150 and - 5 pair -100), all positions are closed. Many thanks


Re: Close ALL Strategy

Apprentice · Thu Nov 03, 2016 3:46 pm

Profit is calculated based on all open positions.


Re: Close ALL Strategy

marcolivorno · Thu Nov 03, 2016 4:54 pm

Good evening, I’m sorry, I did not understand. thank you so much.


Re: Close ALL Strategy

panos59 · Fri Nov 04, 2016 7:11 am

Is it possible to add the option to choose between pips and grossp/l ?


Re: Close ALL Strategy

Kilgharrah · Sun Nov 13, 2016 5:17 am

Hi, Is it possible to add the option to choose add or not to the calculation the daily benefit reached ?

Thanks


Re: Close ALL Strategy

Apprentice · Sun Nov 13, 2016 9:33 am

daily benefit?


Re: Close ALL Strategy

Kilgharrah · Sun Nov 13, 2016 10:00 am

I mean, for example beginning a strategy and start the day with $ 1,000 then closed x orders and I have benefited $ 40 and the target is 50 $, then for the strategy to stop note for your calculations not only currently open positions but also take into account is the benefit previously ($ 40) obtained. I explain ?. Sorry for my English.


Re: Close ALL Strategy

Kilgharrah · Sun Nov 13, 2016 12:34 pm

the misunderstanding is because I use the word inappropriately benefitrather than profit, thanks and apology.


Re: Close ALL Strategy

Apprentice · Sun Dec 18, 2016 8:28 am

Strategy was revised and updated.