Announcement

Collapse
No announcement yet.

draw arrow with trix

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

  • draw arrow with trix

    I downloaded amtrix.efs and have it in a subchart.

    I want to draw arrows on my price chart when trix crosses the zero line:
    down arrow for trix()<=0 and trix(-1)>0
    up arrow for trix()>=0 and trix(-1)<0

    I am new to this and am working with formula wizard and I do not see anyway to use trix.

    I am using a trix length of 5, source = close, and show parameter = false.

    Thanks in advance for any suggestions.

  • #2
    Re: draw arrow with trix

    banisua
    The Formula Wizard can only read formulas that were written using the Formula Wizard and uses only the built-in studies.
    For these reasons you cannot use the Formula Wizard to modify that efs and need to instead use the EFS Editor (Tools-> EFS-> Editor from the main menu)
    Having said that you need to be aware that an efs will output (ie plot or draw) only to the pane in which it is running so if the script is set to run as a non price study it will not be able to draw the arrows in the price pane (it can however paint the price bars)
    If you want to plot the arrows in the price window then the first thing you need to do is to set up the formula as a price study. To do this you need to set the setPriceStudy() statement which is in the preMain function to true ie



    Then modify the return statement so that the script will not plot the TRIX ie



    Lastly add the following code just above the return statement (see comments for an explanation of what this code does)



    If - as you indicate - you are new to programming in EFS you may want to review the JavaScript for EFS video series and the Core JavaScript Reference Guide. These will provide you with a thorough introduction to programming in JavaScript which is at the foundation of EFS. Then go through the EFS KnowledgeBase and study the Help Guides and Tutorials which will provide you with the specifics of EFS.
    Alex


    Originally posted by banisua
    I downloaded amtrix.efs and have it in a subchart.

    I want to draw arrows on my price chart when trix crosses the zero line:
    down arrow for trix()<=0 and trix(-1)>0
    up arrow for trix()>=0 and trix(-1)<0

    I am new to this and am working with formula wizard and I do not see anyway to use trix.

    I am using a trix length of 5, source = close, and show parameter = false.

    Thanks in advance for any suggestions.

    Comment

    Working...
    X