sell orders losers

Created at 23 Jan 2013, 20:13
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!
TR

tradermatrix

Joined 24.07.2012

sell orders losers
23 Jan 2013, 20:13


hello

a very active scalping robot:
Is it possible to delete orders losers.
aissi and reduce "max consecutive losing trades."
eg
if total (orders losers) = -500 euros.
sell all levels losers.
but without deleting orders winners.

I think that there is a profitable equation between this solution and the adjustment of TakeProfit.

cordially

 


@tradermatrix
Replies

admin
24 Jan 2013, 15:21

Hello tradematrix,

Please clarify the logic a little so that we can better assist you.
In your first statement  "delete orders losers", do you mean close positions which have negative profit? If so, see this sample close profitable positions and adjust accordingly so that the condition checks for negative profit.
Also, "sell all levels losers" is a bit unclear.


@admin

tradermatrix
24 Jan 2013, 18:48

this formula closes all the positions (buy and sell) when the balance is negative:


if( Account.Equity - Account.Balance < - 10 )
{
foreach (var position in Account.Positions)
{
Trade.Close(position);
}
}
}
}
}

exemple

EXEMPLE RANGE ROBOT(or another robot)

ID Heure Symbole Volume Type Entrée T/P S/L Pips Swap Commissions EUR
195826 03/09/2012 14:39 EURUSD 10k Sell 1.25745     -0.3 0.00 -0.30 -0.24
195833 03/09/2012 14:42 EURUSD 10k Sell 1.25745     -0.3 0.00 -0.30 -0.24
195862 03/09/2012 15:15 EURUSD 10k Buy 1.25682     5.8 0.00 -0.30 4.61
195875 03/09/2012 15:21 EURUSD 10k Buy 1.25709     3.1 0.00 -0.30 2.47
195899 03/09/2012 15:51 EURUSD 10k Buy 1.25702     3.8 0.00 -0.30 3.02
195945 03/09/2012 16:28 EURUSD 10k Sell 1.25692     -5.6 0.00 -0.30 -9.45
195955 03/09/2012 16:36 EURUSD 20k Sell 1.25692     -5.6 0.00 -0.60 -8.91
195962 03/09/2012 16:41 EURUSD 10k Buy 1.25694     4.6 0.00 -0.30 3.66
195965 03/09/2012 16:44 EURUSD 20k Buy 1.25698     4.2 0.00 -0.60 6.68
195982 03/09/2012 16:49 EURUSD 10k Buy 1.25696     4.4 0.00 -0.30 -13.50
196035 03/09/2012 17:21 EURUSD 10k Sell 1.25742     -0.6 0.00 -0.30 -0.48

p&L= -10

when P & L =  -10, all positions are automatically sold

what I want:
a formula which adds only the negative positions.
and then, when the total (losing trade)) = - 500 euros is counted, all the losing positions are liquidated.
there thus remain the positive positions which continue to fluctuate  

thank you


@tradermatrix

cAlgo_Fanatic
13 Jun 2013, 15:22

Hello,

We are happy to anounce that very soon a new section will be included in cTDN, "Jobs", for the purpose of hiring cAlgo developers for projects such as this. 
In this section you will be able to post a description of your project and available budget so that developers will be able to contact you.  Please stay tuned!


@cAlgo_Fanatic