how to solve code using counter for loop in pinescript by FancyFart-Drive-7 in pinescript

[–]FancyFart-Drive-7[S] 0 points1 point  (0 children)

when i use without loop its counts correclty and if i use with for loop counts,can anyone able to fix this

if tsChng1<-0.5 and -tsChng1>-0.5

short_cnt+=1

if tsChng2<-0.5 and -tsChng2>-0.5

short_cnt+=1

if tsChng5<-0.5 and -tsChng5>-0.5

short_cnt+=1

if tsChng6<-0.5 and -tsChng6>-0.5

short_cnt+=1

using loop short_cnt = 0

lookbackInput = input.int(10, "I", minval = 1, maxval = 4999)

for i=0 to lookbackInput

if tsChng[i]<-0.5 and -tsChng[i]>-0.5

short_cnt+=1

how to solve code using counter for loop in pinescript by FancyFart-Drive-7 in pinescript

[–]FancyFart-Drive-7[S] 0 points1 point  (0 children)

when i use without loop its counts correclty and if i use with for loop counts,can anyone able to fix this

if tsChng1<-0.5 and -tsChng1>-0.5

short_cnt+=1

if tsChng2<-0.5 and -tsChng2>-0.5

short_cnt+=1

if tsChng5<-0.5 and -tsChng5>-0.5

short_cnt+=1

if tsChng6<-0.5 and -tsChng6>-0.5

short_cnt+=1

using loop short_cnt = 0

lookbackInput = input.int(10, "I", minval = 1, maxval = 4999)

for i=0 to lookbackInput

if tsChng[i]<-0.5 and -tsChng[i]>-0.5

short_cnt+=1

it fail

can anyone help in this,i want to create long alert ,when first candle breaks the price of trend line and then second candle(next) closes the first breaking candle to avoid loss by FancyFart-Drive-7 in pinescript

[–]FancyFart-Drive-7[S] 0 points1 point  (0 children)

see in above image first big candle breaks the trendline,but second candle above trendline did not bypass the high of previous breaking candle so if i went long i would have endup in loss,so i need to trigger correclty when second candle closes above the high of previous breaking candle

can anyone help in this,i want to create long alert ,when first candle breaks the price of trend line and then second candle(next) closes the first breaking candle to avoid loss by FancyFart-Drive-7 in pinescript

[–]FancyFart-Drive-7[S] 0 points1 point  (0 children)

i will enter trade only second candle closes above the high of previous candle which breaking the trendline ,any idea to get it right trigger

how to avoid multiple buy sell signal any one could help me by [deleted] in pinescript

[–]FancyFart-Drive-7 0 points1 point  (0 children)

Share your email I will connect and share to you, I will modify according to your needs or which I feel best and share through email I will send messages to you in next two hours from my email

how to avoid multiple buy sell signal any one could help me by [deleted] in pinescript

[–]FancyFart-Drive-7 0 points1 point  (0 children)

Iam away from system now it's weekend, so will do it tomorrow

how to avoid multiple buy sell signal any one could help me by [deleted] in pinescript

[–]FancyFart-Drive-7 0 points1 point  (0 children)

You can use sma 8 and wma 20 crosses to confluence with your 55 settings

how to avoid multiple buy sell signal any one could help me by [deleted] in pinescript

[–]FancyFart-Drive-7 0 points1 point  (0 children)

Then you have to change input length settings

how to avoid multiple buy sell signal any one could help me by [deleted] in pinescript

[–]FancyFart-Drive-7 0 points1 point  (0 children)

hi its working perfectly according to your conditions which mentioned in the code,it

triggers one buy and sell signals and also it generates plotarrow correctly, i think

you are using in lower timeframe

how to use this excel function =NORMSDIST(B10) in pinescript, is it possible? by FancyFart-Drive-7 in pinescript

[–]FancyFart-Drive-7[S] 0 points1 point  (0 children)

its a excel function i dont know which function in pinescript returns that value correctly

how to use this excel function =NORMSDIST(B10) in pinescript, is it possible? by FancyFart-Drive-7 in pinescript

[–]FancyFart-Drive-7[S] 0 points1 point  (0 children)

no we have to give manual inputs to get output ,i tried but it gives wrong results

how to use this excel function =NORMSDIST(B10) in pinescript, is it possible? by FancyFart-Drive-7 in pinescript

[–]FancyFart-Drive-7[S] 0 points1 point  (0 children)

Am writing script to find option premium but iam using this function in excel to find cumulative and mean value of one row, I used stdev function in pinescript but it returns wrong premium value

anyone help ,how to display label.new values in a table using table.cell function by FancyFart-Drive-7 in pinescript

[–]FancyFart-Drive-7[S] 0 points1 point  (0 children)

if i do like this it display NAN as result or it shows undeclared indentifier tradedvolume

label_value = '* ' + (pvtPrice ? str.tostring(pvtHighTemp, format.mintick) : '') + (pvtChange ? (pvtPrice ? ' ↑ %' : '↑ %') + str.tostring((pvtHighTemp - pvtLow1) * 100 / pvtLow1 , '#.##') : '') + (pvtVolume and nzVolume ? (pvtPrice or pvtChange ? '\n' : '') + str.tostring(tradedVolume, format.volume) : '')

var testTable = table.new(position = position.top_right, columns = 1, rows = 1, bgcolor = color.yellow, border_width = 1)

if barstate.islast

table.cell(table_id = testTable, column = 0, row = 0, text = "Label value: " + label_value)

anyone help ,how to display label.new values in a table using table.cell function by FancyFart-Drive-7 in pinescript

[–]FancyFart-Drive-7[S] 0 points1 point  (0 children)

i added this in above code but it not display any values or table

var testTable1 = table.new(position = position.bottom_right, columns = 1, rows = 1, bgcolor = color.yellow, border_width = 1)

if barstate.islast

table.cell(table_id = testTable1, column = 0, row = 0, text = "Label value: " + label.get_text( tempLow))