| View previous topic :: View next topic |
| Author |
Message |
Phil_Trade
Joined: 31 Jan 2012 Posts: 74
|
Posted: Tue Feb 28, 2012 7:35 am Post subject: DIGIT AFTER POINT for external parameter |
|
|
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 |
|
 |
FxMax
Joined: 28 Nov 2011 Posts: 9
|
Posted: Tue Feb 28, 2012 8:46 am Post subject: |
|
|
please use this:
| Code: |
RegOption('AZERTY', ot_Double, AZERTY);
SetOptionDigits('AZERTY', 4); |
|
|
| Back to top |
|
 |
Phil_Trade
Joined: 31 Jan 2012 Posts: 74
|
Posted: Tue Feb 28, 2012 1:03 pm Post subject: |
|
|
| 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 |
|
 |
|