Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Detect if stoploss hit
 Post subject: Detect if stoploss hit Post rating: 0   New post Posted: Tue 19 Jul, 2016, 16:07 
User avatar

User rating: 0
Joined: Sat 02 Mar, 2013, 09:43
Posts: 12
Location: Canada, Vancouver
How can I detect if stoploss is hit in a strategy?

In Visual JFOREX you can use trade event, but in Java how do I do this?

I need to see if stoploss is hit. And if so, stop trading for the day.

Thanks


 
 Post subject: Re: Detect if stoploss hit Post rating: 0   New post Posted: Thu 21 Jul, 2016, 16:30 

User rating: 2
Joined: Thu 07 Nov, 2013, 12:15
Posts: 121
A simple way is to use the ORDER_CLOSE_OK message in the onMessage() listener.

You can simply look for a specific order to close, and message yourself.


 

Jump to:  

cron
  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com