Announcement

Collapse
No announcement yet.

stochastic study

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

  • stochastic study

    Good Morning,

    Could somebody please tell me how can I draw the 20
    and 80 line on the stochastic study and use those values
    as var's ....

    Great day to everybody ...

    Thanks a lot

    Jaime

  • #2
    Jaime
    Here is a basic example of how to add user adjustable bands. The script was created by modifying the basicStoch.efs which is provided in the EFS2 Basic folder.
    PHP Code:
    function preMain() {
        
    setStudyTitle("Stochastic");
        
    setCursorLabelName("%K",0);
        
    setCursorLabelName("%D",1);
        
    setDefaultBarFgColor(Color.blue0);
        
    setDefaultBarFgColor(Color.red1);
    }
     
    function 
    main(Upper,Lower) {//define the user adjustable parameters
     
        
    if(Upper==nullUpper 80;//can be modified in Edit Studies
        
    if(Lower==nullLower 20;//can be modified in Edit Studies
        
    addBandUpperPS_SOLID1Color.black,"UpperBand");
        
    addBandLowerPS_SOLID1Color.black,"LowerBand");
     
        return new Array (
    stochK(14,1,3),stochD(14,1,3));

    If you also look at customStoch.efs in the EFS2 Custom folder you can see another example of how to do it using the FunctionParameter Object
    Alex

    Comment

    Working...
    X