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

How to insert comments on the platform?
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=200&t=56833
Page 1 of 1

Author:  cosma [ Thu 22 Nov, 2018, 11:26 ]
Post subject:  How to insert comments on the platform?

Good morning;

someone explains to me how to insert comments of the positions and orders on the platform? :?:

Thank you.

Author:  cosma [ Thu 22 Nov, 2018, 11:31 ]
Post subject:  Re: How to insert comments on the platform?

Image

Attachments:
File comment: Comments
asd.PNG [27.69 KiB]
Downloaded 305 times

Author:  mtnfx [ Thu 22 Nov, 2018, 20:54 ]
Post subject:  Re: How to insert comments on the platform?

According to my observations - comment can be assigned to an "order" in one of the "pending" states:
1. BUY/SELL LIMIT or STOP
2. TP or SL orders for open positions

Position generated from LIMIT or STOP order, when filled, gets comment from source order.
Already filled position having not comment can be "commented" by assigning comment to TP or SL order.

But:
- when you assign "TP comment" to filled position already having comment received from LIMIT/STOP order - none of them is displayed
- when you assign comment to both "TP" and "SL" orders - position also displays nothing and keeps displaying nothing after removing comments from "TP" and "SL" orders

You can set that comment in "Orders" tab.
All this behavior is very strange to me. You may try asking for "API Support" to explain reasons behind all this.

PS: Here is what I see described in API for development of strategies and plugins.

    /**
     * Sets comment for pending orders.
     *
     * <p>By default, may not be called on the same order more often than once per second
     * (exact value of max order update per second is sent by server).
     *
     * <pre>{@code
     *  if (order.getState() == IOrder.State.OPENED && order.getOrderCommand() != BUY && order.getOrderCommand() != SELL) {
     *      order.setComment("new_"+order.getComment());
     *  }
     * }</pre>
     *
     * @param comment comment text
     * @throws JFException if order is not in {@link State#OPENED} state
     */
    void setComment(String comment) throws JFException;

Author:  cosma [ Sat 24 Nov, 2018, 09:16 ]
Post subject:  Re: How to insert comments on the platform?

Thank you 'n good weekend.

  Page 1 of 1