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.

String management in JForex
 Post subject: String management in JForex Post rating: 0   Post Posted: Wed 06 Mar, 2013, 01:04 

User rating: 0
Joined: Tue 05 Mar, 2013, 22:08
Posts: 4
I'm trying to read the label of an order and then divide it into two strings: one contains the name of order and the second contains a serial number (the index).

I'm using this code to split the string:

myLabel = order.getLabel().slice(0,8);

but I get this error:

"The method slice(int, int) is undefined for the type String"

How can I use the "slice" command in JForex?

At the beginning of the strategy I have the following imports:

import com.dukascopy.api.*;
import com.dukascopy.api.IEngine.OrderCommand;
import com.dukascopy.api.IIndicators.AppliedPrice;
import java.awt.*;
import java.text.*;
import java.text.DateFormat;
import java.util.Date;
import java.util.TimeZone;
import java.io.*;
import java.lang.*;

Thanks in advance for your help.


 
 Post subject: Re: String management in JForex Post rating: 0   Post Posted: Wed 06 Mar, 2013, 08:30 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
For available java.lang.String methods see:
https://docs.oracle.com/javase/6/docs/api/java/lang/String.html
For working with strings see the Oracle Java tutorial:
https://docs.oracle.com/javase/tutorial/java/data/strings.html


 

Jump to:  

cron
  © 1998-2025 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