School Run style strategy indicator to Pro Build
Forums › ProRealTime English forum › ProBuilder support › School Run style strategy indicator to Pro Build
- This topic has 6 replies, 3 voices, and was last updated 1 week ago by
coincatcha.
-
-
01/14/2025 at 3:01 PM #242549
Hello everyone.
Thank you for this amazing resource. What a great place on the internet.I have a pine script indicator that my friend has written for Trading View and we are wanting to backtest further with ProReal Time.
Can anyone do a conversion of this script please?
If there’s any possibillity of adding Day of the week and Date to the label I would be most grateful but i’d be very happy with just the conversion if its not possible.
Mega thanks.
Darren
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/// © fx_huebner//@version=5indicator(title=”RR Lines_V3″, overlay=true, precision = 3)//Input Options Full / Half / customcfRangeLong = input.bool(false, “CR_Full Long”)cfRangeShort = input.bool(false, “CR_Full Short”)chRangeLong = input.bool(false, “CR_Half Long”)chRangeShort = input.bool(false, “CR_Half Short”)// Slippage for stop lossslippage = input.float(0.06,”Padding”, inline= “B” )//Time Options Input// First to take care of the time. There isn’t a function for this without the date as well, so I just made my own.i_hour = input.int(1, “Time (HH:mm)”,0, 23, 1, inline = “A”)i_minute = input.int(0, “:”,0, 59, 1, inline = “A”)// Then we need to create the options for the different days of the week. This allows for the most customization.i_sunday = input.bool(true, “Sunday”)i_monday = input.bool(true, “Monday”)i_tuesday = input.bool(true, “Tuesday”)i_wednesday = input.bool(true, “Wednesday”)i_thursday = input.bool(true, “Thursday”)i_friday = input.bool(true, “Friday”)i_saturday = input.bool(true, “Saturday”)start = input.time(timestamp(“01 Jan 2024 12:00 UTC+0”), “Start”)end = input.time(timestamp(“25 Jan 2024 12:00 UTC+0”), “End”)// ParameterscandleRange = (high-low)customRange = (high + slippage)customRangeL = (low – slippage)halfRange = (candleRange / 2)slipRange = (candleRange + slippage)halfSlipRange = ((candleRange/2)+slippage)//candleHigh = (high +0.02)//candleLow = (low – 0.02)//halfSlipRange = ((high + slippage) – (high – halfRange))//@variable Checks the time of the candle and gets the day of the week as represented by numbers 1-7, starting on Sunday.todayDay = dayofweek(time)// Define Time for Candle// Rewrote this function so that it does the same thing but now will use the variables from above.candleTime(_hour, _mins) =>// Created 2 variables that need to be true in order to return true.isTimeMatch=hour==_hourandminute==_minsisTodayShown=switchtodayDay1=>i_sunday2=>i_monday3=>i_tuesday4=>i_wednesday5=>i_thursday6=>i_friday7=>i_saturdayisTimeMatchandisTodayShown////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Custom Range ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CR Full Long///////////////////////////////////////////////////////////////////////if time >= start and time <= end and candleTime(i_hour, i_minute) and (cfRangeLong == true)//Buy Priceline.new(x1=time,y1=high+slippage+0.01,x2=time+86400000,y2=high+slippage+0.01,xloc=xloc.bar_time,color=color.yellow,style=line.style_dashed),rrEntrycfRangeLongLabel=label.new (x=bar_index,y=high+slippage+0.01,color=color.blue,style=label.style_none,size=size.small,textcolor=color.white,text_font_family=font.family_monospace,text=”(Buy) “+str.tostring (high+slippage+0.01,’#.000′)),line.new(x1=time,y1=high+slippage,x2=time+1800,y2=high+slippage,xloc=xloc.bar_time,color=color.green,style=line.style_dashed),// Stop Lossline.new(x1=time,y1=low-0.01,x2=time+86400000,y2=low-0.01,xloc=xloc.bar_time,color=color.white,style=line.style_dashed)rrSlcfRangeLongLabel=label.new (x=bar_index,y=low-0.01,color=color.blue,style=label.style_none,size=size.small,textcolor=color.white,text_font_family=font.family_monospace,text=”(SL) “+str.tostring (low-0.01,’#.000′))line.new(x1=time,y1=low,x2=time+900,y2=low,xloc=xloc.bar_time,color=color.green,style=line.style_dashed)//1:1.5line.new(x1=time,y1=customRange+ (slipRange*1.5),x2=time+86400000,y2=customRange+ (slipRange*1.5),xloc=xloc.bar_time,style=line.style_dashed)rr1_5cfRangeLongLabel=label.new (x=bar_index,y= (high+slippage) + (slipRange*1.5),color=color.blue,style=label.style_none,size=size.small,textcolor=color.blue,text_font_family=font.family_monospace,text=”(1.5) “+str.tostring ((high+slippage) + (slipRange*1.5),’#.000′))//2:1line.new(x1=time,y1= (high+slippage) + (slipRange*2),x2=time+86400000,y2= (high+slippage) + (slipRange*2),xloc=xloc.bar_time,style=line.style_dashed)rrcfRangeLongLabel=label.new (x=bar_index,y= (high+slippage) + (slipRange*2),color=color.blue,style=label.style_none,size=size.small,textcolor=color.blue,text_font_family=font.family_monospace,text=”(2) “+str.tostring ((high+slippage) + (slipRange*2),’#.000′))//Take Profit 3:1line.new(x1=time,y1= (high+slippage) + (slipRange*3),x2=time+86400000,y2= (high+slippage) + (slipRange*3),xloc=xloc.bar_time,color=color.orange,style=line.style_dashed)rr3cfRangeLongLabel=label.new (x=bar_index,y= (high+slippage) + (slipRange*3),color=color.blue,style=label.style_none,size=size.small,textcolor=color.orange,text_font_family=font.family_monospace,text=”(3) “+str.tostring ((high+slippage) + (slipRange*3),’#.000′)),//To the moon 14:1//line.new(x1=time, y1= high + (slipRange*14), x2=time + 86400000, y2= high + (slipRange*14), xloc=xloc.bar_time, color = color.white, style = line.style_dashed)//rr14cfRangeLongLabel = label.new (x=bar_index, y = high + (slipRange*14), color=color.blue, style=label.style_none, size=size.small,textcolor = color.orange, text_font_family = font.family_monospace, text = “(14) ” + str.tostring (high + (slipRange*14),’#.000′)),//13:1//line.new(x1=time, y1= high + (slipRange*13), x2=time + 86400000, y2= high + (slipRange*13), xloc=xloc.bar_time, color = color.white, style = line.style_dashed)//rr13cfRangeLongLabel = label.new (x=bar_index, y = high + (slipRange*13), color=color.blue, style=label.style_none, size=size.small,textcolor = color.orange, text_font_family = font.family_monospace, text = “(13) ” + str.tostring (high + (slipRange*13),’#.000′)),myLabel=label.new(x=bar_index,y=high,color=color.white,style=label.style_label_up,size=size.small,text=“H: “+str.tostring(high) +“\nL: “+str.tostring(low) +“\nR: “+str.tostring(candleRange) +“\nHR: “+str.tostring((low+halfRange) ))//”\nSS: ” + str.tostring(high + 0.07))// Modify the label’s y-axis behaviour; show it below the price barlabel.set_yloc(id=myLabel,yloc=yloc.belowbar)//////////////////////////////////////////////////////////////////////// CR Full Short //////////////////////////////////////////////////////////////////////////////////////////if time >= start and time <= end and candleTime(i_hour, i_minute) and (cfRangeShort == true)// Buy Priceline.new(x1=time,y1=low-slippage-0.01,x2=time+86400000,y2=low-slippage-0.01,xloc=xloc.bar_time,color=color.yellow,style=line.style_dashed)rrEntrycfRangeShortLabel=label.new (x=bar_index,y= (low-slippage-0.01),color=color.blue,style=label.style_none,size=size.small,textcolor=color.white,text_font_family=font.family_monospace,text=”(BUY) “+str.tostring (low-slippage-0.01,’#.000′))line.new(x1=time,y1=low-slippage,x2=time+900,y2=low-slippage,xloc=xloc.bar_time,color=color.green,style=line.style_dashed)//Stop Lossline.new(x1=time,y1=high+0.01,x2=time+86400000,y2=high+0.01,xloc=xloc.bar_time,color=color.white,style=line.style_dashed)rrSlcfRangeShortLabel=label.new (x=bar_index,y=high+0.01,color=color.blue,style=label.style_none,size=size.small,textcolor=color.white,text_font_family=font.family_monospace,text=”(SL) “+str.tostring (high+0.01,’#.000′))line.new(x1=time,y1=high,x2=time+900,y2=high,xloc=xloc.bar_time,color=color.green,style=line.style_dashed)// 1:1.5line.new(x1=time,y1=customRangeL- (slipRange*1.5),x2=time+86400000,y2=customRangeL- (slipRange*1.5),xloc=xloc.bar_time,style=line.style_dashed)rr1_5cfShortLabel=label.new (x=bar_index,y=customRangeL- (slipRange*1.5),color=color.blue,style=label.style_none,size=size.small,textcolor=color.blue,text_font_family=font.family_monospace,text=”(1.5) “+str.tostring (customRangeL- (slipRange*1.5),’#.000′))//2:1line.new(x1=time,y1=customRangeL- (slipRange*2),x2=time+86400000,y2=customRangeL- (slipRange*2),xloc=xloc.bar_time,style=line.style_dashed)rr2cfShortLabel=label.new (x=bar_index,y=customRangeL- (slipRange*2),color=color.blue,style=label.style_none,size=size.small,textcolor=color.blue,text_font_family=font.family_monospace,text=”(2) “+str.tostring (customRangeL- (slipRange*2),’#.000′))// 3:1 Take Profitline.new(x1=time,y1=customRangeL- (slipRange*3),x2=time+86400000,y2=customRangeL- (slipRange*3),xloc=xloc.bar_time,color=color.orange,style=line.style_dashed)rr3cfShortLabel=label.new (x=bar_index,y=customRangeL- (slipRange*3),color=color.orange,style=label.style_none,size=size.small,textcolor=color.orange,text_font_family=font.family_monospace,text=”(3) “+str.tostring (customRangeL- (slipRange*3),’#.000′))// To the moon 4:1//line.new(x1 = time, y1 = low – (candleRange*4), x2 = time + 86400000, y2 = low – (candleRange*4), xloc = xloc.bar_time),myLabel=label.new(x=bar_index,y=high,color=color.white,style=label.style_label_down,size=size.small,text=“H: “+str.tostring(high) +“\nL: “+str.tostring(low) +“\nR: “+str.tostring(candleRange,’#.000′) +“\nHR: “+str.tostring((low+halfRange )))//”\nSS: ” + str.tostring(high + 0.07))// Modify the label’s y-axis behaviour; show it below the price barlabel.set_yloc(id=myLabel,yloc=yloc.abovebar)////////////////////////////////////////////////////////////// CR Half Long ////////////////////////////////////////////////////////////////////////////////if time >= start and time <= end and candleTime(i_hour, i_minute) and (chRangeLong == true)// Buy Priceline.new(x1=time,y1=high+slippage+0.01,x2=time+86400000,y2=high+slippage+0.01,xloc=xloc.bar_time,color=color.yellow,style=line.style_dashed)rrEntrychRangeLongLabel=label.new (x=bar_index,y= (high+slippage+0.01),color=color.blue,style=label.style_none,size=size.small,textcolor=color.white,text_font_family=font.family_monospace,text=”(BUY) “+str.tostring (high+slippage+0.01,’#.000′))line.new(x1=time,y1=high+slippage,x2=time+900,y2=high+slippage,xloc=xloc.bar_time,color=color.green,style=line.style_dashed)//Stop Lossline.new(x1=time,y1=high-halfRange-0.01,x2=time+86400000,y2=high-halfRange-0.01,xloc=xloc.bar_time,color=color.white,style=line.style_dashed)rrSlchRangeLongLabel=label.new (x=bar_index,y= (high-halfRange-0.01),color=color.blue,style=label.style_none,size=size.small,textcolor=color.white,text_font_family=font.family_monospace,text=”(SL) “+str.tostring (high-halfRange-0.01,’#.000′))line.new(x1=time,y1=high-halfRange,x2=time+900,y2=high-halfRange,xloc=xloc.bar_time,color=color.green,style=line.style_dashed)// 1:1.5line.new(x1=time,y1=customRange+ (halfSlipRange*1.5),x2=time+86400000,y2=customRange+ (halfSlipRange*1.5),xloc=xloc.bar_time,style=line.style_dashed)rr1_5chRangeLongLabel=label.new (x=bar_index,y=customRange+ (halfSlipRange*1.5),color=color.blue,style=label.style_none,size=size.small,textcolor=color.blue,text_font_family=font.family_monospace,text=”(1.5) “+str.tostring (customRange+ (halfSlipRange*1.5),’#.000′))//2:1line.new(x1=time,y1=customRange+ (halfSlipRange*2),x2=time+86400000,y2=customRange+ (halfSlipRange*2),xloc=xloc.bar_time,style=line.style_dashed)rr2chRangeLongLabel=label.new (x=bar_index,y=customRange+ (halfSlipRange*2),color=color.blue,style=label.style_none,size=size.small,textcolor=color.blue,text_font_family=font.family_monospace,text=”(2) “+str.tostring (customRange+ (halfSlipRange*2),’#.000′))// 3:1 Take Profitline.new(x1=time,y1=customRange+ (halfSlipRange*3),x2=time+86400000,y2=customRange+ (halfSlipRange*3),xloc=xloc.bar_time,color=color.orange,style=line.style_dashed)rr3chRangeLongLabel=label.new (x=bar_index,y=customRange+ (halfSlipRange*3),color=color.blue,style=label.style_none,size=size.small,textcolor=color.orange,text_font_family=font.family_monospace,text=”(3) “+str.tostring (customRange+ (halfSlipRange*3),’#.000′)),// To the moon 4:1//line.new(x1 = time, y1 = high + (halfRange*4), x2 = time + 86400000, y2 = high + (halfRange*4), xloc = xloc.bar_time),myLabel=label.new(x=bar_index,y=high,color=color.white,style=label.style_label_up,size=size.small,text=“H: “+str.tostring(high) +“\nL: “+str.tostring(low) +“\nR: “+str.tostring(candleRange) +“\nHR: “+str.tostring(low+halfRange))//”\nSS: ” + str.tostring(high + 0.07))// Modify the label’s y-axis behaviour; show it below the price barlabel.set_yloc(id=myLabel,yloc=yloc.belowbar)/////////////////////////////////////////////////////////////////////////////// CR Half Short //////////////////////////////////////////////////////////////////////////////if time >= start and time <= end and candleTime(i_hour, i_minute) and (chRangeShort == true)// Buy Priceline.new(x1=time,y1=customRangeL-0.01,x2=time+86400000,y2=customRangeL-0.01,xloc=xloc.bar_time,color=color.yellow,style=line.style_dashed)rrEntrychRangeShortLabel=label.new (x=bar_index,y=customRangeL-0.01,color=color.blue,style=label.style_none,size=size.small,textcolor=color.white,text_font_family=font.family_monospace,text=”(BUY) “+str.tostring (customRangeL-0.01,’#.000′))line.new(x1=time,y1=customRangeL,x2=time+900,y2=customRangeL,xloc=xloc.bar_time,color=color.green,style=line.style_dashed)//Stop Lossline.new(x1=time,y1=low+halfRange+0.01,x2=time+86400000,y2=halfRange+low+0.01,xloc=xloc.bar_time,color=color.white,style=line.style_dashed)rrSlchRangeShortLabel=label.new (x=bar_index,y= (low+halfRange+0.01),color=color.blue,style=label.style_none,size=size.small,textcolor=color.white,text_font_family=font.family_monospace,text=”(SL) “+str.tostring (low+halfRange+0.01,’#.000′))line.new(x1=time,y1=low+halfRange,x2=time+900,y2=halfRange+low,xloc=xloc.bar_time,color=color.green,style=line.style_dashed)// 1:1.5line.new(x1=time,y1=customRangeL- (halfSlipRange*1.5),x2=time+86400000,y2=customRangeL- (halfSlipRange*1.5),xloc=xloc.bar_time,style=line.style_dashed)rr1_5chRangeShortLabel=label.new (x=bar_index,y=customRangeL- (halfSlipRange*1.5),color=color.blue,style=label.style_none,size=size.small,textcolor=color.blue,text_font_family=font.family_monospace,text=”(1.5) “+str.tostring (customRangeL- (halfSlipRange*1.5),’#.000′)),//2:1line.new(x1=time,y1=customRangeL- (halfSlipRange*2),x2=time+86400000,y2=customRangeL- (halfSlipRange*2),xloc=xloc.bar_time,style=line.style_dashed)rr2chRangeShortLabel=label.new (x=bar_index,y=customRangeL- (halfSlipRange*2),color=color.blue,style=label.style_none,size=size.small,textcolor=color.blue,text_font_family=font.family_monospace,text=”(2) “+str.tostring (customRangeL- (halfSlipRange*2),’#.000′)),// 3:1 Take Profitline.new(x1=time,y1=customRangeL- (halfSlipRange*3),x2=time+86400000,y2=customRangeL- (halfSlipRange*3),xloc=xloc.bar_time,color=color.orange,style=line.style_dashed)rr3chRangeShortLabel=label.new (x=bar_index,y=customRangeL- (halfSlipRange*3),color=color.orange,style=label.style_none,size=size.small,textcolor=color.orange,text_font_family=font.family_monospace,text=”(3) “+str.tostring (customRangeL- (halfSlipRange*3),’#.000′)),// To the moon 4:1//line.new(x1 = time, y1 = low – (halfRange*4), x2 = time + 86400000, y2 = low – (halfRange*4), xloc = xloc.bar_time),myLabel=label.new(x=bar_index,y=high,color=color.white,style=label.style_label_down,size=size.small,text=“H: “+str.tostring(high) +“\nL: “+str.tostring(low) +“\nR: “+str.tostring(candleRange) +“\nHR: “+str.tostring(high-halfRange))//”\nSS: ” + str.tostring(high + 0.07))// Modify the label’s y-axis behaviour; show it below the price barlabel.set_yloc(id=myLabel,yloc=yloc.abovebar)1 user thanked author for this post.
01/14/2025 at 4:58 PM #24256101/14/2025 at 5:06 PM #242562Hey Ivan
Screenshots attached. The indicator can be set to be long/short or both. The indicator shows entry, SL (stop loss) and then 1.5RR 2RR and 3RR price targets.
I set the anchor candle to 9:15am usually to start the trade on 9:30 ES Time.
Hope that helps.
01/16/2025 at 1:37 AM #242667I think this would be very useful indeed, I am currently looking into testing the same signal for the ASX200
01/16/2025 at 9:58 AM #242670Hi!
Here you have the code:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128//-------------------------------------------------////PRC_RR Lines//version = 0//16.01.25//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//-------------------------------------------------//// Inputs//-------------------------------------------------//StartDate=20250115StartTime=153000slippage=0.06cfRangeLong=1cfRangeShort=0chRangeLong=0chRangeShort=0//-------------------------------------------------//// parameters//-------------------------------------------------//candleRange=high-lowcustomRange=high+slippagecustomRangeL=low-slippagehalfRange=candleRange/2slipRange=candleRange+slippagehalfSlipRange=((candleRange/2)+slippage)atr=averagetruerange[14](close)//-------------------------------------------------//// Custom Range Full Long//-------------------------------------------------//if opentime>=starttime and opentime[1]<starttime and opendate=startdate and cfRangeLong then//Buypricebuyprice=high+slippage+0.01Drawsegment(barindex,buyprice,barindex+50,buyprice)coloured("green")style(dottedline3,2)drawtext("Buy #buyprice#",barindex+25,buyprice+atr*0.25)coloured("blue")//Stop lossstoploss=low-0.01Drawsegment(barindex,stoploss,barindex+50,stoploss)coloured("red")style(dottedline3,2)drawtext("SL #stoploss#",barindex+25,stoploss+atr*0.25)coloured("blue")//1:1.5tp1=customrange+1.5*sliprangeDrawsegment(barindex,tp1,barindex+50,tp1)coloured("blue")style(dottedline3,2)drawtext("(1) #tp1#",barindex+25,tp1+atr*0.25)coloured("blue")//2:1tp2=customrange+2*sliprangeDrawsegment(barindex,tp2,barindex+50,tp2)coloured("blue")style(dottedline3,2)drawtext("(2) #tp2#",barindex+25,tp2+atr*0.25)coloured("blue")//3:1tp3=customrange+3*sliprangeDrawsegment(barindex,tp3,barindex+50,tp3)coloured("blue")style(dottedline3,2)drawtext("(3) #tp3#",barindex+25,tp3+atr*0.25)coloured("blue")endif//-------------------------------------------------//// Custom Range Full Short//-------------------------------------------------//if opentime>=starttime and opentime[1]<starttime and opendate=startdate and cfRangeShort then//ShortpriceShortprice=low-slippage-0.01Drawsegment(barindex,Shortprice,barindex+50,Shortprice)coloured("green")style(dottedline3,2)drawtext("Short #Shortprice#",barindex+25,Shortprice+atr*0.25)coloured("blue")//Stop lossstoploss=high+0.01Drawsegment(barindex,stoploss,barindex+50,stoploss)coloured("red")style(dottedline3,2)drawtext("SL #stoploss#",barindex+25,stoploss+atr*0.25)coloured("blue")//1:1.5tp1=customrangeL-1.5*sliprangeDrawsegment(barindex,tp1,barindex+50,tp1)coloured("blue")style(dottedline3,2)drawtext("(1) #tp1#",barindex+25,tp1+atr*0.25)coloured("blue")//2:1tp2=customrangeL-2*sliprangeDrawsegment(barindex,tp2,barindex+50,tp2)coloured("blue")style(dottedline3,2)drawtext("(2) #tp2#",barindex+25,tp2+atr*0.25)coloured("blue")//3:1tp3=customrangeL-3*sliprangeDrawsegment(barindex,tp3,barindex+50,tp3)coloured("blue")style(dottedline3,2)drawtext("(3) #tp3#",barindex+25,tp3+atr*0.25)coloured("blue")endif//-------------------------------------------------//// Custom Range Half Long//-------------------------------------------------//if opentime>=starttime and opentime[1]<starttime and opendate=startdate and chRangeLong then//Buypricebuyprice=high+slippage+0.01Drawsegment(barindex,buyprice,barindex+50,buyprice)coloured("green")style(dottedline3,2)drawtext("Buy #buyprice#",barindex+25,buyprice+atr*0.25)coloured("blue")//Stop lossstoploss=high-halfrange-0.01Drawsegment(barindex,stoploss,barindex+50,stoploss)coloured("red")style(dottedline3,2)drawtext("SL #stoploss#",barindex+25,stoploss+atr*0.25)coloured("blue")//1:1.5tp1=customrange+1.5*halfsliprangeDrawsegment(barindex,tp1,barindex+50,tp1)coloured("blue")style(dottedline3,2)drawtext("(1) #tp1#",barindex+25,tp1+atr*0.25)coloured("blue")//2:1tp2=customrange+2*halfsliprangeDrawsegment(barindex,tp2,barindex+50,tp2)coloured("blue")style(dottedline3,2)drawtext("(2) #tp2#",barindex+25,tp2+atr*0.25)coloured("blue")//3:1tp3=customrange+3*halfsliprangeDrawsegment(barindex,tp3,barindex+50,tp3)coloured("blue")style(dottedline3,2)drawtext("(3) #tp3#",barindex+25,tp3+atr*0.25)coloured("blue")endif//-------------------------------------------------//// Custom Range Half Short//-------------------------------------------------//if opentime>=starttime and opentime[1]<starttime and opendate=startdate and chRangeShort then//ShortpriceShortprice=customRangeL-0.01Drawsegment(barindex,Shortprice,barindex+50,Shortprice)coloured("green")style(dottedline3,2)drawtext("Short #Shortprice#",barindex+25,Shortprice+atr*0.25)coloured("blue")//Stop lossstoploss=low+halfrange+0.01Drawsegment(barindex,stoploss,barindex+50,stoploss)coloured("red")style(dottedline3,2)drawtext("SL #stoploss#",barindex+25,stoploss+atr*0.25)coloured("blue")//1:1.5tp1=customrangeL-1.5*halfsliprangeDrawsegment(barindex,tp1,barindex+50,tp1)coloured("blue")style(dottedline3,2)drawtext("(1) #tp1#",barindex+25,tp1+atr*0.25)coloured("blue")//2:1tp2=customrangeL-2*halfsliprangeDrawsegment(barindex,tp2,barindex+50,tp2)coloured("blue")style(dottedline3,2)drawtext("(2) #tp2#",barindex+25,tp2+atr*0.25)coloured("blue")//3:1tp3=customrangeL-3*halfsliprangeDrawsegment(barindex,tp3,barindex+50,tp3)coloured("blue")style(dottedline3,2)drawtext("(3) #tp3#",barindex+25,tp3+atr*0.25)coloured("blue")endif//-------------------------------------------------//return1 user thanked author for this post.
02/04/2025 at 1:53 PM #243446Hi Ivan and everyone else.
It’s taken a lot longer than expected to load the indicator but i’ve now done it. Currently I only see the long side to the indicator and the short side doesn’t load. I’ll post screenshots to show you what happens in prorealtime and what should happen in if it were in TradingView.
Is it possible to remove the 1R:1 line and instead add a 4:1 and a 5:1 reward to risk line please? If 3R, 4R and 5R are all in different colours that would be great.
I have updated the TradingView pine script code to include 4:1 and 5:1. let me know if you want me to supply the updated pinescript code.
Thanks,
Darren02/10/2025 at 11:43 AM #243678Hi Darren,
Ivan has given us customisations!
If you load the indicator on the price chart, you can click on it and use ‘Configure’ with the spanner symbol. Look below Start Date and Slippage. Check the box CFRangeShort and you will have short targets printed same as the long.
As for the other requests you may have to adapt that in your code provided. You could just copy/paste “tp3=customrange+3*sliprange” and add TP4 etc using the block of code for each drawing description. The colour can be changed there too.
I’m testing this out and looks like a pretty fun way to deal with opening drives on my market. Beware the double losses though, I will only trade this once a day to minimise whipsaws.
What market do you trade this on?
CC
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on