Announcement

Collapse
No announcement yet.

New feature request for EFS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • New feature request for EFS

    Could you add the ability to have a color selector box be one of the options for askforinput within the functionParameter settings.
    I would like to give the user the ability to select a color for a line to be drawn on a chart, and it would be great to have a color box next to the text which passes a hex color value to the functionParameter as an integer.

    Thanks

  • #2
    philli4093
    If I understand correctly what you are asking that option is already available now. See enclosed code as an example.
    Alex

    PHP Code:
    var vMA null;

    function 
    preMain() {
        
    setPriceStudy(true);
        
    setStudyTitle("MAInput-Test");
        
    setCursorLabelName("MA"0);
        
    setDefaultBarFgColor(Color.blue0);
      
        var 
    fp1 = new FunctionParameter("MALength"FunctionParameter.NUMBER);
        
    fp1.setLowerLimit(1);        
        
    fp1.setDefault(10);
        
        var 
    fp2 = new FunctionParameter("MAOffset"FunctionParameter.NUMBER);
        
    fp2.setLowerLimit(0);        
        
    fp2.setDefault(0);
        
        var 
    fp3 = new FunctionParameter("MAColor",FunctionParameter.COLOR);
        
    fp3.setDefault(Color.red);
        
        
    askForInput();
        
    }

    function 
    main(MALength,MAOffset,MAColor) {
       
        if (
    vMA == nullvMA = new MAStudy(MALengthMAOffset"Close"MAStudy.SIMPLE);
        
    setBarFgColor(MAColor,0);
        
        return 
    vMA.getValue(MAStudy.MA);

    Comment


    • #3
      well

      well I guess I've need to re-read the manual...lol!

      When did this appear?

      Thanks for the info...

      Todd

      Comment


      • #4
        Todd
        It has been available since the Function Parameters were introduced (build 564).
        Alex

        Comment

        Working...
        X