Monitoring if Any trades reached SL or TP.

Section for all discussions related to development using Indicore API/SDK.

Moderator: admin

Monitoring if Any trades reached SL or TP.

Postby mojoeshock » Sun Mar 01, 2015 1:34 am

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.
mojoeshock
 
Posts: 2
Joined: Sun Mar 01, 2015 1:15 am

Re: Monitoring if Any trades reached SL or TP.

Postby p_maltsev » Tue Mar 03, 2015 1:19 am

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
p_maltsev
 

Re: Monitoring if Any trades reached SL or TP.

Postby mojoeshock » Wed Mar 04, 2015 1:37 am

Hi p_maltsev,

Thanks for this link. I believe it has everything I need to know. thanks :)
mojoeshock
 
Posts: 2
Joined: Sun Mar 01, 2015 1:15 am


Return to Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron