Newbie First Steps Syntax query
Forums › ProRealTime English forum › ProOrder support › Newbie First Steps Syntax query
- This topic has 6 replies, 3 voices, and was last updated 4 hours ago by
Mellstock.
-
-
09/22/2025 at 4:07 PM #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
09/22/2025 at 4:25 PM #251269Hi,
“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?
09/22/2025 at 4:28 PM #251270Try 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/
09/22/2025 at 5:02 PM #251272Thank 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.
09/22/2025 at 5:05 PM #25127309/22/2025 at 5:29 PM #251275When 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)
09/25/2025 at 10:06 AM #251772 -
AuthorPosts