DRAWARROWUP (and DOWN) doesnt display?
Forums › ProRealTime English forum › ProBuilder support › DRAWARROWUP (and DOWN) doesnt display?
- This topic has 7 replies, 2 voices, and was last updated 7 years ago by margincallcat.
-
-
10/29/2017 at 1:43 PM #50818
I have made an indicator that consists among other things two lines that i want to draw arrows on when crossed.
The code for the specific area is at the bottom here:
12345678910111213hhatrx=highest[lookback](atrxlineh)llatrx=lowest[lookback](atrxlinel)mitten=(hhatrx+llatrx)/2midatrx=mittenmidatrx2=average[SlowMid,1](mitten)if midatrx crosses over midatrx2 thendrawarrowup(barindex[1],llatrx)elsif midatrx crosses under midatrx2 thendrawarrowdown(barindex[1],hhatrx)endifbut no arrows are drawn. Even if i try different colors, same result.
I have read several descriptions including the Pro Builder manual, but i cant get it to work.
Any takers?
Thanks!
10/29/2017 at 1:51 PM #5081910/29/2017 at 1:53 PM #50820I see now that its DRAWONLASTBARONLY that seems to be the issue. Is it possible to have it drawn even though this setting is =true? Will the drawn arrows stay in the future?
10/29/2017 at 1:55 PM #50821This is the full code:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788defparam DRAWONLASTBARONLY=true//defparam CALCULATEONLASTBARS=200if on=1thenx=ATRperioda=AverageTrueRange[x](close)[1]//atrma=Average[10,1](a)//xfactor=a/atrmamultiplier=a*atrx//*xfactoralpha=255////atrxlineh=(highest[lookback](high)+multiplier) // ÖVRE LINJEatrxlineh=high+multiplier//atrxlinel=(lowest[lookback](low)-multiplier) // UNDRE LINJEatrxlinel=low-multiplierif atrxlineh>atrxlineh[1] thenatrxlineh=atrxlineh[1]endifif close[1]>atrxlineh[1] thenatrxlineh=close[1]+aatrxlinel=close[1]-multiplierelsif high[1]>atrxlineh[1] thenatrxlineh=high[1]endifif atrxlinel<atrxlinel[1] thenatrxlinel=atrxlinel[1]endifif close[1]<atrxlinel[1] thenatrxlinel=close[1]-aatrxlineh=close[1]+multiplierelsif low[1]<atrxlinel[1] thenatrxlinel=low[1]endif//GAMLA GRUNDKODEN INNAN IHOPFLÄTAT//if atrxlinel<atrxlinel[1] then//atrxlinel=atrxlinel[1]//endif//if low[1]<atrxlinel[1] then//atrxlinel=low[1]//endif//if close[1]<atrxlinel[1] then//atrxlinel=close[1]-a//endif//OKLAR KOD SOM SKA DRA UPP STOPLOSSEN OM CLOSE BRYTS//if close[1]>atrxlineh[1] then//atrxlinel=open[1]-a//endif//if close[1]<atrxlinel[1] then//atrxlineh=open[1]+a//endif////hhatrx=atrxlineh//llatrx=atrxlinelhhatrx=highest[lookback](atrxlineh)llatrx=lowest[lookback](atrxlinel)mitten=(hhatrx+llatrx)/2midatrx=mittenmidatrx2=average[SlowMid,1](mitten)if midatrx[1] crosses over midatrx2[1] thendrawarrowup(barindex[1],llatrx+a)elsif midatrx[1] crosses under midatrx2[1] thendrawarrowdown(barindex[1],hhatrx-a)endif//if Numbers=1 thendrawtext("ATR:#a#(X:#multiplier#)",barindex,hhatrx+a/2,sansserif,standard,12)drawtext("ATR:#a#(X:#multiplier#)",barindex,llatrx-a/2,sansserif,standard,12)endifif Lines=1 thendrawsegment(barindex-20,hhatrx,barindex,hhatrx)coloured(30,144,255,alpha)drawsegment(barindex-20,llatrx,barindex,llatrx)coloured(30,144,255,alpha)endifendifreturn hhatrx as "ATRx High", llatrx as "ATRx Low", midatrx as "ATRx Mid", midatrx2 as "ATRx Mid Slow"Dont know if it helps.. Some of it is in Swedish 🙂
10/29/2017 at 10:28 PM #5086310/30/2017 at 9:02 AM #50882If i do that all other drawings get all over the chart, so i need to have that setting to false.
10/31/2017 at 2:33 PM #5107310/31/2017 at 8:54 PM #51141Its solved – it was “Drawonlastbaronly” that was the issue, and after recoding some other drawlines/segments it works to have it set to =false without having the whole chart cluttered. 🙂
ps. I would appreciate some help in the “How do i stop repeat signlas”-thread.
Thanks
-
AuthorPosts
Find exclusive trading pro-tools on