Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

Detect if stoploss hit
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=65&t=54201
Page 1 of 1

Author:  holoverse [ Tue 19 Jul, 2016, 16:07 ]
Post subject:  Detect if stoploss hit

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

Author:  scotpip [ Thu 21 Jul, 2016, 16:30 ]
Post subject:  Re: Detect if stoploss hit

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.

  Page 1 of 1