wrong syntax

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10540 quote
    Elsborgtrading
    Participant
    Veteran

    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

    Screenshot_92.png Screenshot_92.png
    #10543 quote
    Elsborgtrading
    Participant
    Veteran

    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 quote
    camaleo
    Participant
    Junior

    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 quote
    Elsborgtrading
    Participant
    Veteran

    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)
  • You must be logged in to reply to this topic.

wrong syntax


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Elsborgtrading
9 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/17/2016
Status: Active
Attachments: No files
Logo Logo
Loading...