Newbie First Steps Syntax query

Forums ProRealTime English forum ProOrder support Newbie First Steps Syntax query

Viewing 7 posts - 1 through 7 (of 7 total)
  • #251267

    Hi I am new to PRT but not to coding.

    I want play around with the program in my IG demo account.

    I want run a simple program to open a trade to see how things work.

    This is a simple program on the S&P One minute chart. It will not run.

    What am I doing wrong? The Buy word is underlined in red in the coding window. An error message is given if I try to run it.

    I have tried Contracts, Contract, Unit, Units and just entered the number. I cannot get the syntax correct.

    If High[0] > Close[1] + 0.25 Then

    Buy 1 Contracts at market

    Endif

    Thank you

    #251269

    Hi,

    “buy” being a code keyword working only in the proorder module (for backtests and automatic strategies), it would be considered as an error when entered in the probuilder code editor window (for displaying indicators, not for buying/selling) or the proscreener window (for screeners to select assets from a list, no buying or displaying) instead of a proorder one. So in case that’s what might have happened here, it might be worth double checking the code is tested in a proorder window rather than probuilder or proscreener?

    3 users thanked author for this post.
    #251270

    Try with below as the 1st line of your code.

    DEFPARAM CUMULATEORDERS = False

    What is the error message saying?

    Also , it may due to this onging problem (not your coding)

    https://www.prorealcode.com/topic/algo-stopped-position-closed/

    3 users thanked author for this post.
    #251272

    Thank you for this.

    The error shows as Buy word is underlined in red.

    I have tried Defparam cumulate orders = False at the top of the code.

    cumulateorders gets underlined in red.

    I am in indicators and have successfully coded 2 indicators.

    Am I in the right coding window to build a system? If not where should I be?

    I am not finding the software intuitively easy to use at present.

    Yes I have seen recent messages about IG and the interface with PRT.

    Thanks again.

    1 user thanked author for this post.
    #251273

    Thank you.

    Possibly I am working at this in the wrong coding window.

    How do I get into the ProOrder coding window?

    #251275

    When you click on the “indicators” button, it opens a window called “indicators and trading systems”, where presumably you have landed on the indicators tab being the first out of 3, displaying your indicators list. Below the window title and above the list, you have the 3 tabs there, and if you are in PRT v12 the 2nd tab is the proorder one: probacktests and automatic trading (if still in PRT v11 it’s the 3rd tab)

    3 users thanked author for this post.
    #251772

    Thank you I was using the wrong coding environment. Thank you for coreectly directing me

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

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