Porting Code from 10.3v to 11.1v
Forums › ProRealTime English forum › ProRealTime platform support › Porting Code from 10.3v to 11.1v
- This topic has 9 replies, 2 voices, and was last updated 4 years ago by ashehzi.
-
-
11/26/2020 at 12:40 PM #151735
Hi,
I have started using version 11.1 (thanks to Ale mentioning to me) on IG Demo account. I am migrating my code from production 10.3v to demo account so that when 11.1 goes to live on IG, i shall be able to take advantage of it.
I’ve been able to import all of my indicators without any issue.
All indicators are working except one. The code is OK, there is no error, it works fine on 10.3 but somehow not showing results on 11.1 while same shows results on 10.3 on same time frame and instrument (stock/index).
There is no error in the code. It saves and gets added without any syntax error. What could be the issue?
11/26/2020 at 12:52 PM #151736Difficult to know exactly why without the code.
But try to embed your indicator’s code into a test about sufficient barindex. If your indicator is using periods, use the biggest one in the test:
12345if barindex > biggestPeriod then//your indicator codeendifRETURN var1, var2 //return line is outside the test11/26/2020 at 1:06 PM #151741Hi,
I am using e.g.
1234DEFPARAM CalculateOnLastBars = 1000hEst = highest[highLen](close)lEst = lowest[lowLen](close)where highLen and lowLen are passed as input variables (e.g. highLen=5 and lowLen=5)
I will try adding yours also.
11/26/2020 at 1:11 PM #151745I did like below:
1234567891011121314151617DEFPARAM CalculateOnLastBars = 1000alpha = 255longConditions = 0shortConditions = 0r= 75//75g= 75//75b= 75//75if barindex > 1000 then<rest of my code here>endifreturn myvar1, myvar2No errors but no results.
11/26/2020 at 1:52 PM #15175911/26/2020 at 2:15 PM #15177211/26/2020 at 3:23 PM #151774Hi,
I found the issue. I will highlight here as it would be useful to others.
PRT 10.3v
=======
PRT 10.3v12345678910// e.g. for daxmyValue = 13033Condition1 = 1Condition2 = 1if (close[1] = myValue AND Condition1 AND Condition2) then<do something>endif// Above myValue AND Condition1 AND Condition2 meant 13033PRT 11
=====
PRT 11v12345678910// e.g. for daxmyValue = 13033Condition1 = 1Condition2 = 1if (close[1] = myValue AND Condition1 AND Condition2) then<do something>endif// Above myValue AND Condition1 AND Condition2 meant 1So I did like this then
Modified code in v11123456789101112// e.g. for daxmyValue = 13033Condition1 = 1Condition2 = 1if (Condition1 AND Condition2) thenif (close[1] = myValue) then<do something>endifendif// Above myValue AND Condition1 AND Condition2 meant 1303311/26/2020 at 3:24 PM #15177511/27/2020 at 9:35 AM #15187112/08/2020 at 11:12 AM #152950 -
AuthorPosts
Find exclusive trading pro-tools on