wrong syntax

Viewing 4 posts - 1 through 4 (of 4 total)
  • #10540

    Hi guys. I hope yu can help me with this small syntax problem.

    It backtest ok, but when I try and prepair it for automatic trading it returns an error. The two lines that has ! in front are

    var1= (highest[9]+lowest[9])/2
    var1 = (highest[26]+lowest[26])/2

     

    what am I doing wrong?

    Thanks in advance for you help 🙂

    Br Elsborgtrading

    #10543

    Okay so everybody properly tried to lay in bed at night- awake- thinking about that holy grail you just are about to discover- tossing and turning- gold-struck! well that was me this night. So went up and started working on this code again, that I’m been working on since last week and the whole sunday, and it all came down to these two lines, that didn’t quite make it. well sometimes you just stare, and can’t see the forest because of the trees. Anyway I got it.

    var1= (highest[9](close)+lowest[9](close))/2

    var1 = (highest[26](close)+lowest[26](close))/2

    so before you get a good laugh, please remember that I started trading 5 weeks ago- unsuccessfully of cause, and 2 weeks since I started coding… 😀

    \elsborgtrading

    #10579

    Hello, i am noob in this, and i dont know if i am saying something stupid…

    I dont know what you want to do…

    but those 2 lines are diferente. They cant be

    =var1

    at same time… I think

    maybe….

    var1=………

    var2=……..

    Good luck

     

     

    #10580

    Ahh yes Camaleo, you are right, but that is not the issue here. I simply made a typo, it is var1 and var2, but thanks for pointing that out.

    However the syntax needed a statement for what the highest and the lowest was. it didn’t know what “highest” I wanted to operate with. so it could for example “highest(close)” or “highest(high)” etc etc.. not just the “highest”

     

     

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login