Page 1 of 1

Monitoring if Any trades reached SL or TP.

PostPosted: Sun Mar 01, 2015 1:34 am
by mojoeshock
Hi, can anyone help me out how to monitor if any trades closes(doesnt matter if loss of profit). I have a background in programming(c#) but I am pretty new to Lua programming. So I want to know how to handle this. Is there any specific method/function in the indicore sdk that does this? if so can you give me some link. Or if you know any custom indicators that has this kind of behaviour can provide me the link?

I need to do some action when a trade closes(it reaches the SL or the TP). A sample of this action would be opening a market order or creating a pending order. Or clrearing any pending orders.

I also need to monitor if any pending order was triggered and do some action too when it happens.

This is for the Hedging strategy that Im working on. So if anyone can help me, I will really appreciate it. Also once Im done creating the stratigy, I will post it here. Thanks.

Re: Monitoring if Any trades reached SL or TP.

PostPosted: Tue Mar 03, 2015 1:19 am
by p_maltsev
Hi mojoeshock,

mojoeshock wrote:Hi, can anyone help me out how to monitor if any trades closes(doesnt matter if loss of profit). I have a background in programming(c#) but I am pretty new to Lua programming. So I want to know how to handle this. Is there any specific method/function in the indicore sdk that does this? if so can you give me some link. Or if you know any custom indicators that has this kind of behaviour can provide me the link?

I need to do some action when a trade closes(it reaches the SL or the TP). A sample of this action would be opening a market order or creating a pending order. Or clrearing any pending orders.

I also need to monitor if any pending order was triggered and do some action too when it happens.

This is for the Hedging strategy that Im working on. So if anyone can help me, I will really appreciate it. Also once Im done creating the stratigy, I will post it here. Thanks.


You can find a good example that will help you understand how to monitor the closing of the trade in this article

Re: Monitoring if Any trades reached SL or TP.

PostPosted: Wed Mar 04, 2015 1:37 am
by mojoeshock
Hi p_maltsev,

Thanks for this link. I believe it has everything I need to know. thanks :)