foreach var (positions in Positions) with Symbol allocation...

Created at 19 Apr 2015, 22:34
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
97

9718853

Joined 14.10.2014

foreach var (positions in Positions) with Symbol allocation...
19 Apr 2015, 22:34


hi all,

I'm about to start forward testing my cBot with 4 currency pairs in one account. However my robot is counting all positions to make decisions upon an overall take profit / stop loss...

How do I ensure that the positions being counted belong to a single Symbol rather than all positions within the account?

Thank you kindly in advance...


@9718853
Replies

WhiteSage
19 Apr 2015, 22:44

if(thePosition.SymbolCode == this.Symbol)

@WhiteSage