The most efficient way to calculate if a session profit threshold has been achieved?

Questions about MultiCharts .NET and user contributed studies.
FuturesTrader
Posts: 7
Joined: 12 Jun 2016
Has thanked: 2 times

The most efficient way to calculate if a session profit threshold has been achieved?

Postby FuturesTrader » 12 Feb 2017

Hi All,

What is the most efficient way to calculate if a predefined daily profit threshold for a single trading session has been exceeded in MultiCharts.NET?

The purpose of this requirement is to pause trading temporarily once a specific profit target has been achieved for the session. When a new session starts, the daily profit threshold resets to zero.

Is it necessary to iterate through previously closed trades and perform a calculation based on the difference between entry and exit values for a particular date (factoring in slippage and commission) or is there a more elegant way to achieve this?

Thanks,

FuturesTrader

User avatar
Angelina MultiСharts
Posts: 260
Joined: 28 Dec 2016
Has thanked: 28 times
Been thanked: 66 times

Re: The most efficient way to calculate if a session profit threshold has been achieved?

Postby Angelina MultiСharts » 17 Feb 2017

Hello FuturesTrader,

What we can suggest in this case is to sum up profit values in a variable and then reset it when the target is reached.


Return to “MultiCharts .NET”