|
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.
about the period of 1 pip code.... |
wenchao35
|
Post subject: about the period of 1 pip code.... |
Post rating: 0
|
Posted: Wed 27 Mar, 2013, 16:05
|
|
User rating: 0
Joined: Sun 03 Mar, 2013, 15:45 Posts: 34 Location: China, guangdong
|
As shown,I want to know how to write the period of 1 pip. pls help me.
This is 1 minute code,how to write 1 pip。
@Configurable(value = "Period",readOnly = true,description = "This period can not be edited")public Period selectedPeriod = Period.ONE_MIN;
Attachments: |
Period.jpg [10.06 KiB]
Downloaded 357 times
|
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on
this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control
on their content. Anyone accessing this webpage and downloading or otherwise making use of any document,
data or information found on this webpage shall do it on his/her own risks without any recourse against
Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from
the use and/or reliance on any document, data or information found on this webpage.
|
|
|
|
|
 |
API Support
|
Post subject: Re: about the period of 1 pip code.... |
Post rating: 0
|
Posted: Thu 28 Mar, 2013, 11:24
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
wenchao35
|
Post subject: Re: about the period of 1 pip code.... |
Post rating: 0
|
Posted: Sun 31 Mar, 2013, 18:19
|
|
User rating: 0
Joined: Sun 03 Mar, 2013, 15:45 Posts: 34 Location: China, guangdong
|
|
|
|
 |
API Support
|
Post subject: Re: about the period of 1 pip code.... |
Post rating: 0
|
Posted: Tue 02 Apr, 2013, 08:33
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Please provide your example strategy of how far you have got. Please describe which place you can't figure out how to implement.
|
|
|
|
 |
wenchao35
|
Post subject: Re: about the period of 1 pip code.... |
Post rating: 0
|
Posted: Tue 02 Apr, 2013, 13:59
|
|
User rating: 0
Joined: Sun 03 Mar, 2013, 15:45 Posts: 34 Location: China, guangdong
|
API Support wrote: Please provide your example strategy of how far you have got. Please describe which place you can't figure out how to implement. My code is import com.dukascopy.api.PriceRange; .... @Configurable(value="Period")public Period myPeriod = Period.ONE_PIP; then the system messages is "12:55:36 Period.ONE_PIP cannot be resolved"... how to fix it??
|
|
|
|
 |
API Support
|
Post subject: Re: about the period of 1 pip code.... |
Post rating: 0
|
Posted: Tue 02 Apr, 2013, 14:25
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
wenchao35
|
Post subject: Re: about the period of 1 pip code.... |
Post rating: 0
|
Posted: Tue 02 Apr, 2013, 16:03
|
|
User rating: 0
Joined: Sun 03 Mar, 2013, 15:45 Posts: 34 Location: China, guangdong
|
API Support wrote: use: PriceRangeinstead of Period. I edited the new code is @Configurable(value="Period")public PriceRange myPeriod = PriceRange.ONE_PIP; is successful!But when I run the code,it says "!UNSUPPORTED TYPE!" what's that mean? And,is the new code run the 1PIP right?
|
|
|
|
 |
API Support
|
Post subject: Re: about the period of 1 pip code.... |
Post rating: 0
|
Posted: Tue 02 Apr, 2013, 16:07
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
No it means that you will have to go with the int data type and then use PriceRange.valueOf.
|
|
|
|
 |
wenchao35
|
Post subject: Re: about the period of 1 pip code.... |
Post rating: 0
|
Posted: Tue 02 Apr, 2013, 17:19
|
|
User rating: 0
Joined: Sun 03 Mar, 2013, 15:45 Posts: 34 Location: China, guangdong
|
API Support wrote: No it means that you will have to go with the int data type and then use PriceRange.valueOf. I writed the new code. public int A; @Configurable(value="Period")public PriceRange myPeriod = PriceRange.valueOf(A); is it right?
|
|
|
|
 |
API Support
|
 |
Post subject: Re: about the period of 1 pip code.... |
Post rating: 1
|
Posted: Wed 03 Apr, 2013, 07:27
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
No it's not right, you should use int as @Configurable and use PriceRange.valueOf in the onStart.
|
|
|
|
 |
wenchao35
|
Post subject: Re: about the period of 1 pip code.... |
Post rating: 0
|
Posted: Wed 03 Apr, 2013, 11:28
|
|
User rating: 0
Joined: Sun 03 Mar, 2013, 15:45 Posts: 34 Location: China, guangdong
|
API Support wrote: No it's not right, you should use int as @Configurable and use PriceRange.valueOf in the onStart. I write the new code,and it runs successful. but is it right? public class MyEa implements IStrategy { .....; @Configurable(value="周期")public int myPeriod; public void onStart(IContext context) throws JFException { ....; PriceRange.valueOf(myPeriod); } }
|
|
|
|
 |
API Support
|
Post subject: Re: about the period of 1 pip code.... |
Post rating: 0
|
Posted: Wed 03 Apr, 2013, 12:02
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Yes, the idea is right. Now you can define a IFeedDescriptor, assuming that you intend to work with range bars, see the PRICE_RANGE_AGGREGATION row in the Feed type table.
|
|
|
|
 |
wenchao35
|
Post subject: Re: about the period of 1 pip code.... |
Post rating: 0
|
Posted: Wed 03 Apr, 2013, 12:17
|
|
User rating: 0
Joined: Sun 03 Mar, 2013, 15:45 Posts: 34 Location: China, guangdong
|
API Support wrote: Yes, the idea is right. Now you can define a IFeedDescriptor, assuming that you intend to work with range bars, see the PRICE_RANGE_AGGREGATION row in the Feed type table. This problem bothering me for a long time, thank you help me to solve!! thank you very much!!
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|