Another bug! in back testing this time
Forums › ProRealTime English forum › ProBuilder support › Another bug! in back testing this time
- This topic has 15 replies, 4 voices, and was last updated 4 months ago by druby.
-
-
06/21/2024 at 10:25 AM #234173
Again I think this is related to timeframe switching.
I cannot run a back test using the indicators I have developed. If I call my indicators it says “Back test cannot start because of a parsing error in the code line 4 column 0”, I assume this relates to line 4 in my indicator #T1, which is “timeframe(1 hour,updateonclose)”
Please advise, I specifically want to back test my strategy using multiple time frames.
T1=call “#T1″[1]
//Entanglment=call “#Entanglement”signal=0
//sig=CALL “#T1”
// Conditions to enter long positionsIF signal >0 THEN
buy at market
ENDIFif signal <0 THEN
sellshort at market
endif06/21/2024 at 10:42 AM #234175When I get, line and column indication in error message, I take it to refer to main code.
If that line happens to be a ‘call’ instruction, then error may be in called file.
Its hard to say without all code and variables to run and test.
06/21/2024 at 10:43 AM #23417606/21/2024 at 10:52 AM #234178parsing error in the code line 4 column 0”
In addition to above, in the same eror message, do you also get words like … ‘begin and end in same entity’??
06/21/2024 at 10:54 AM #234179Nope just that message with a “Send report” dialogue, which I did, so it will go to my broker IG.com and then to ProRealtime.
I love the platform for manual trading, but for code… hmmm somewhat flaky frankly.
1 user thanked author for this post.
06/21/2024 at 11:01 AM #234181The best way to proceed, if you don’t want to share your code here in the forum, is send a thicket to PRT.
Have you tried to copy and paste you indicator inside the system code. In this way you will not use the call function. Sometimes it works.1 user thanked author for this post.
06/21/2024 at 11:04 AM #23418306/21/2024 at 11:11 AM #23418406/21/2024 at 11:25 AM #234185This is a very long shot but, try setting your timeframes to the same time units.
instead of 1 hour and 5 minutes etc, change to 60 minutes and 5 minutes.
One problem I looked into in the past, that helped.
1 user thanked author for this post.
06/21/2024 at 11:27 AM #23418606/21/2024 at 11:33 AM #23418706/21/2024 at 11:38 AM #23418806/21/2024 at 12:20 PM #23419006/21/2024 at 12:34 PM #234191I noticed that, in your other post, you called ‘#HourlyBollinger’, and I wondered, why not call it ‘#Bollinger’ since you were calling it from an hourly timeframe in main file.
To me, that could infer that you used the ‘Timeframe’ instruction in a/the called file.
Doing a bit of testing, it appears that, when back testing, if you call a file with a’timeframe’ statement included in it , you get the ‘Parsing error’ message.
The line/column, does, point to the line in the called file, where the ‘Timeframe’ statement sits.
Image shows bare minimum to get error message up.
Solution appears, used generic, no timeframe specific called files and use timeframe in main.
Not checked every possible combination, but error appears repeatable.
06/21/2024 at 1:00 PM #234193It’s true that in principle I could set the timeframe outside of Hourly Bollinger, however I have other custom built indicators that require access to more than one time frame.
While waiting hopefully for the fix for the problem I have pasted all of my indicators into the back testing script, it’s not very elegant but it does at least work
-
AuthorPosts
Find exclusive trading pro-tools on