Try RESET button in parameter dialog box
  ----- Original Message ----- 
  From: Bob Pit 
  To: [email protected] 
  Sent: Sunday, May 09, 2010 10:11 PM
  Subject: [amibroker] bug in parameters? [2 Attachments]


  [Attachment(s) from Bob Pit included below] 


  Hello

  I copied the MA code (shown below) into a custom indicator that I have named
  "bob1".  The default periods in both indicators is 15.  BUT, when I place
  bob1 on the chart, the default periods are 25.  When I place the original
  MA, it is correctly 15.  I am puzled.

  It seems that this is caused by the "sincr" parameter, which is set to 10.
  But in BOTH indicators the sincr parameter is set to 10.   Param( ''name'',
  defaultval, min, max, step, sincr = 0 )

  Is this a bug?  Maybe because the bob1 is placed in the CUSTOM folder?  Can
  you please explain why this is happening?

  code of both indicators:

  >>>

  P = ParamField("Price field",-1);

  Periods = Param("Periods", 15, 2, 300, 1, 10 );

  Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ),
  ParamStyle("Style") );

  <<<

  Bob




  Attachment(s) from Bob Pit 

  2 of 2 Photo(s) 

  bob1-periods.jpgma-periods.jpg

  

Reply via email to