Announcement

Collapse
No announcement yet.

Cutting Losses

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

  • Cutting Losses

    Hi,

    Can anyone tell me how to program instructions to cut losses in efs? The script runs itself every unit of time, and the variables are reset (I think). I cannot think of anyway to record the price i bought or sold in a trade, so as to compare with the current price in order to determine whether to cut losses. Please help. Thank you.
    BC

  • #2
    Hello Apisa,

    We can help you write an efs formula using the back testing features so you can analyze your strategy on a trade-by-trade basis. Please submit your formula request by clicking the link at the bottom of this message. Please give us some detailed instructions to create your entry and exit points.

    Thank you,
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Apsia

      If I were you I would take Jason K (from eSignal) up on his offer to help.

      Jason can probably do some of the 'heavy lifting' real quick (1-2 weeks is my experieince) and you can probably fill in the gaps, if any, from the intial work he produces.

      Comment


      • #4
        Well,

        I tried to maybe write the closing price of the trade when it was done into a file. But the I/O example from sample file doesn't work. When I run the efs, the file doesn't exist in my computer. Any other help?
        BC

        Comment


        • #5
          Hi,

          If what you are trying to do is keep information between iterations of main (ie: when each new tick comes in) then just declare the variable outside of main() and PreMain() thus:

          Function PreMain() {
          }

          var PleaseKeepThis = 0; // This variable will be saved through interations of main

          Function Main() {
          }

          If you are trying to keep a variable through restarts of eSignal, saving to a file is the right answer. Remember that files created in efs have a root that exists under the default eSIgnal install directiory. The default name is: FormulaOutput. So usually they will be found in C:\Program Files\eSignal\FormulaOutput. You can verify this setting by clicking on tools->EFS settings and looking at the Formula Output Root setting. You could also change the root directory - but I wouldn't recommend it.

          If you still can't find the file, post your efs and I will look it over. I have file I/O working very well.
          Garth

          Comment

          Working...
          X