Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

dezerter

Members
  • Content Count

    2
  • Joined

  • Last visited

Personal Information

  • First Name
    Tom
  • Last Name
    Jop
  • Country
    Poland

Trading Information

  • Vendor
    No
  1. Yes indeed. I made a mistake by putting subtraction instead of addition. Thank you for pointing this out. The proper code; VALUE1 = (CLOSE[COUNTER ] * CLOSE[COUNTER+1]);
  2. Hi, I'm pertty much new to coding and it seems I've got stuck with this issue. What I'm trying to make is an indicator that counts the consecutive close of a N bar and multiplys it by the n+1 close of a bar. And I want to make all the calculation through i.e. 6 last bars.In this way: (C[5] * C[6})-(C[4] *C[5)-(C[3] *C[4])-(C[2] * C[3])... Even though it is what I what I'd like to have it as an input value which I can later optimize, therefore I came up with this line; FOR COUNTER = 1 TO LEN // counter in this case is the var and len the number //of bars for consecutive counting BEGIN VALUE1 = (CLOSE[COUNTER ] * CLOSE[COUNTER-1]); END; Unfortunately the result differs. Can someone help. Much appreciation.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.