Transfering code from V10.3 to V11
Forums › ProRealTime English forum › ProBuilder support › Transfering code from V10.3 to V11
- This topic has 10 replies, 2 voices, and was last updated 3 years ago by robert123.
-
-
02/04/2021 at 9:21 PM #160394
Dear Nicolas,
I am having trouble transferring the below code into V11 and would be grateful if you could have a look and give me any pointers as to why I am having difficulties. It is coded for use in a 1-hour chart with 2k units of info.
Many thanks
Robert
Deltapole123456789101112131415161718192021222324252627282930313233343536defparam CALCULATEONLASTBARS=8000//y=0//m=0//d=0//h=0if year=y and month=m and day=d and hour=ho thenonce pole=barindexpoleb=barindexpolea=high//DRAWVLINE(pole)coloured(0,255,255)endifDRAWBARCHART(open, high, low, close)//////////////////////////////////////////////high finder///////////////////////////////////////////////////dc1=(poleb[0]-barindex)/7000 //archdc=(((poleb[0]-barindex[0])))/(50+dc1)//heightdcc1=SQRT(polea)///depth of bracketdcc=SQRT(polea)+dcdccc=dcc1+(dc*dcc)+poleaup1=dccc+dcc1Drawtext ("-",barindex[pole],up1[pole],dialog,bold,12)coloured(255,255,0)centre=dcccDrawtext ("-",barindex[pole],centre[0],dialog,bold,14)coloured(255,0,255)return02/05/2021 at 9:26 AM #16040902/05/2021 at 9:28 AM #16041202/05/2021 at 9:41 AM #160415Thanks for getting back to me Nicholas- I take it the left-hand image is from V11?, I am looking to get the lines in the same place as they are on V10.3, I have contacted Prorealtime, who a) pointed me in your direction, and b)suggested that the coding of ‘barindex’ was different in V11?…
02/05/2021 at 9:45 AM #16041602/05/2021 at 10:01 AM #16041802/05/2021 at 10:07 AM #160419The picture I supplied was from V10.3 using a 1-hour timeframe and 2k units of info…for some reason V11 doesn’t seem to want to ‘paint’ the text in the same place….and produces the white trace line…I’m not sure where that comes from!
02/05/2021 at 10:51 AM #16042702/05/2021 at 10:55 AM #16043002/05/2021 at 12:41 PM #160438Ok, so that below code will fix your problem. In PRT v11, you shouldn’t use the ONCE instruction in a conditionnal block (IF/ENDIF).
123456789101112131415161718192021222324252627282930313233343536defparam CALCULATEONLASTBARS=8000//y=0//m=0//d=0//h=0pole=0if year=y and month=m and day=d and hour=ho then//once pole=barindexpoleb=barindexpolea=high//DRAWVLINE(pole)coloured(0,255,255)endifDRAWBARCHART(open, high, low, close)//////////////////////////////////////////////high finder///////////////////////////////////////////////////dc1=(poleb[0]-barindex)/7000 //archdc=(((poleb[0]-barindex[0])))/(50+dc1)//heightdcc1=SQRT(polea)///depth of bracketdcc=SQRT(polea)+dcdccc=dcc1+(dc*dcc)+poleaup1=dccc+dcc1Drawtext ("-",barindex[pole],up1[pole],dialog,bold,12)coloured(255,255,0)centre=dcccDrawtext ("-",barindex[pole],centre[0],dialog,bold,14)coloured(255,0,255)return02/05/2021 at 1:09 PM #160444 -
AuthorPosts
Find exclusive trading pro-tools on