Syntax error: BUY is incorrect?

Forums ProRealTime English forum ProOrder support Syntax error: BUY is incorrect?

Viewing 3 posts - 1 through 3 (of 3 total)
  • #97050

    Hi, I am trying to code a bot and it comes up with this syntax error wherein it indicates that BUY is incorrect.  I am not sure what the problem may be and would welcome any suggestion on how to correct it.

     

    thanks

    Indicator1 = close
    Indicator2 = KS
    Indicator3 = CS
    Indicator4 = SA
    indicator5 = ExponentialAverage[5](close)
    c1=(Indicator1 > Indicator2)
    c2=(Indicator1 > CS AND SA)
    // Conditions to enter long positions
    IF (c1 AND c2)THEN Buy possize CONTRACT AT MARKET
    ENDIF

     

     

     

    #97052

    It would be so much eaiser if you use  the blue Insert PRT Code button on the far right of the message toolbar.

    What are KS, CS and SA ?

     

    #97053

    The problem was THEN, it cannot be followed by anything but comments on the same line.

    GraHal’s correction works fine.

    1 user thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)

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