Notification of T/P or S/L

Created at 09 Oct 2013, 22:05
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!
supafly's avatar

supafly

Joined 26.12.2012

Notification of T/P or S/L
09 Oct 2013, 22:05


Is there a simple way to create a notification email when a take profit or stop loss has been hit?

Thanks


@supafly
Replies

Spotware
10 Oct 2013, 12:19

RE:

supafly said:

Is there a simple way to create a notification email when a take profit or stop loss has been hit?

Thanks

We plan to implement a completely new API which will include methods for stop loss and take profit hit.


@Spotware

Cerunnos
10 Oct 2013, 14:58

RE:

supafly said:

Is there a simple way to create a notification email when a take profit or stop loss has been hit?

Thanks

Maybe something like that:

protected override void OnPositionClosed(Position closedPosition)
        {  
            if (closedPosition.TradeType == TradeType.Buy && closedPosition.Pips >= TakeProfit)                       
               Notifications.SendEmail("xy@domain.com", "xy@domain.com", "TP hit", "TP hit - buy order closed"); 
            else if ...
         }


            


@Cerunnos

supafly
10 Oct 2013, 19:20 ( Updated at: 15 Jan 2024, 14:51 )

RE: RE:

Cerunnos, thanks for the reply, seems legit!

The method that I used stored is similar, where the stoploss and takeprofit is stored in variables and if there was a buy trade to compare the Symbol.Ask to the take profit/stop loss and vice versa if there is a sell trade.

 

 

  • [Sign out]

 

Cerunnos said:

supafly said:

Is there a simple way to create a notification email when a take profit or stop loss has been hit?

Thanks

Maybe something like that:

protected override void OnPositionClosed(Position closedPosition)
        {  
            if (closedPosition.TradeType == TradeType.Buy && closedPosition.Pips >= TakeProfit)                       
               Notifications.SendEmail("xy@domain.com", "xy@domain.com", "TP hit", "TP hit - buy order closed"); 
            else if ...
         }


            

 


@supafly

Cerunnos
28 Nov 2013, 12:07

RE: RE:

Spotware said:

supafly said:

Is there a simple way to create a notification email when a take profit or stop loss has been hit?

Thanks

We plan to implement a completely new API which will include methods for stop loss and take profit hit.

Hi Spotware-Team!

Which methods for SL / TP hits are now available? I need them for my semi-automatic system...

Thanks


@Cerunnos

Spotware
28 Nov 2013, 16:28

These methods are not available yet. We will include them in a future version.


@Spotware