help with Setoptiondigits()

Examples step by step how to make your own automated strategy or user indicator
Message
Author
forextester
Posts: 33
Joined: Thu Feb 19, 2009 8:40 am

help with Setoptiondigits()

#1 Postby forextester » Mon Aug 15, 2011 3:02 pm

Hye,

I am working with external double parameters where I have to manually put in pivots (four digits after decimal). But after I press enter after putting in four digits after decimal, forextester rounds'em off to just 2.

I've tried setoptiondigits but no use. setting to 2 or 4 makes no difference.


Code: Select all

RegOption('PP', ot_double, pp);
SetOptionDigits('pp',4);                 // doesn't do me any good; the figure 
                                                  // rounds off to 2 decimal points.


Please help.

Best regards.

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am
Contact:

#2 Postby FT Support » Tue Aug 16, 2011 8:00 am

Hello,

how many digits after point are displayed in the indicators parameters window? what Forex Tester version do you use?
Check our other products here:
www.fx-metropolis.com
www.forexcopier.com

forextester
Posts: 33
Joined: Thu Feb 19, 2009 8:40 am

#3 Postby forextester » Tue Aug 16, 2011 8:18 am

Hye,

Its a strategy; I have used regoption / ot_double to obtain float input in initstrategy.

At the input, it shows only 2 digits after decimal point; If I enter 2.4096, it rounds off to 2.41.

I'm using FT1.12.

regards.

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am
Contact:

#4 Postby FT Support » Tue Aug 16, 2011 12:17 pm

Hmm, please try to compile your strategy with the help of our new API (from Forex Tester 2.8). Probably that was an old bug and it was already fixed. As far as i know in Forex Tester 2.8. SetOptionDigits works fine.
You can download latest program version here: http://www.forextester.com/download.html
Check our other products here:

www.fx-metropolis.com

www.forexcopier.com

dackjaniels
Posts: 151
Joined: Tue Feb 24, 2009 1:03 pm

#5 Postby dackjaniels » Wed Aug 17, 2011 5:37 am

FTSupport,

Why are you referring to ForexTester V2.8 when the latest version available for download is V2.77?

Steve

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am
Contact:

#6 Postby FT Support » Wed Aug 17, 2011 1:31 pm

Forex Tester 2.8 will be issued in a few days so we can treat it as a latest version
Check our other products here:

www.fx-metropolis.com

www.forexcopier.com

dackjaniels
Posts: 151
Joined: Tue Feb 24, 2009 1:03 pm

#7 Postby dackjaniels » Wed Aug 17, 2011 1:52 pm

Good news, thanks.

pthomas82
Posts: 60
Joined: Tue Aug 10, 2010 8:39 pm

#8 Postby pthomas82 » Tue Nov 15, 2011 7:03 pm

I am still having issues with this:

Code: Select all


RegOption('Psar 2 value', ot_double , PSAR2);
Setoptiondigits('PSAR2',4);
PSAR2 := 0.001;



Will round the option window back to 0.00

is this fixed?

Roddy
Posts: 1
Joined: Mon Jan 26, 2015 12:42 am

Re: help with Setoptiondigits()

#9 Postby Roddy » Mon Jan 26, 2015 12:43 am

I have created a dll file using MS Visual Studio 2005 based on example #1. When I start the application I get an error message (see attachment). The application will load only if I press "retry". Also even though I can see the strategy under the Install->New Strategy option the strategy does not appear in the strategies list box.
_____________
Unlock the key of your success by ccnp exams and a+ book By using our latest cisco ccna book - pass4-sure and ju study material, you can easily pass www.rasmussen.edu
Last edited by Roddy on Wed Feb 11, 2015 12:25 am, edited 1 time in total.

FX Helper
Posts: 957
Joined: Mon Apr 01, 2013 3:55 am

Re: help with Setoptiondigits()

#10 Postby FX Helper » Tue Jan 27, 2015 8:05 am

Hello,

Can you please attach a screenshot of error message one more time?

Do you use debug version or release release version of your EA?


Return to “Programming lessons”

Who is online

Users browsing this forum: No registered users and 3 guests