Forex Tester Forum (Professional Training Software for Traders) Forum Index Forex Tester Forum (Professional Training Software for Traders)

Back to main site   Risk disclosure
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DIGIT AFTER POINT for external parameter

 
Post new topic   Reply to topic    Forex Tester Forum (Professional Training Software for Traders) Forum Index -> FT API
View previous topic :: View next topic  
Author Message
Phil_Trade



Joined: 31 Jan 2012
Posts: 74

PostPosted: Tue Feb 28, 2012 7:35 am    Post subject: DIGIT AFTER POINT for external parameter Reply with quote

Hello

I need external parameter with 3 ou 4 digit after point. But when I set them in the parameter window 0.995 give 0.99 and 0.996 give 1.00 ?
it seems to be rounded to 2 digits !

Is there a way to specify the number of digit ?

This an example with strategy builder.

//--------------------------------------------------------------------------
// Some info
//--------------------------------------------------------------------------
library DemoStrategy;

uses
StrategyInterfaceUnit, TechnicalFunctions;

var
// external parameters
AZERTY: double = 0.998;

// internal variables


{-----Init strategy----------------------------------------------------------}
procedure InitStrategy; stdcall;
begin
StrategyShortName('Demo strategy');
StrategyDescription('This strategy does something');

RegOption('AZERTY', ot_Double, AZERTY);
end;

{-----Done strategy----------------------------------------------------------}
procedure DoneStrategy; stdcall;
begin
//
end;

{-----Reset strategy---------------------------------------------------------}
procedure ResetStrategy; stdcall;
begin
//
end;

{-----Process single tick----------------------------------------------------}
procedure GetSingleTick; stdcall;
begin
//
end;

exports
InitStrategy, DoneStrategy, ResetStrategy, GetSingleTick;

end.

_________________
Philippe
Back to top
View user's profile Send private message
FxMax



Joined: 28 Nov 2011
Posts: 9

PostPosted: Tue Feb 28, 2012 8:46 am    Post subject: Reply with quote

please use this:
Code:

RegOption('AZERTY', ot_Double, AZERTY);
SetOptionDigits('AZERTY', 4);
Back to top
View user's profile Send private message
Phil_Trade



Joined: 31 Jan 2012
Posts: 74

PostPosted: Tue Feb 28, 2012 1:03 pm    Post subject: Reply with quote

FxMax wrote:
please use this:
Code:

RegOption('AZERTY', ot_Double, AZERTY);
SetOptionDigits('AZERTY', 4);


thks ! the tools strategy builder need to be updated !

_________________
Philippe
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Forex Tester Forum (Professional Training Software for Traders) Forum Index -> FT API All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group