An easy pine script edit project

Job ID: 31864392

Budget: $10 – $30 USD

Hi all, I just need a pine script coder that changes my strategy script qty parameter to qty_percent;

As you can see at the below, it is only buying 2 contract and selling one by one on the target1 and target2.

So I need to change it that it will enter the position with % of my initial capital in settings as in the attached image.

Here is part of the code that needs to be change;

counter=0
bar_entry=0
if counter[1]!=0
counter:=counter[1]
if bar_entry[1]!=0
bar_entry:=bar_entry[1]

if (buy) and strategy.position_size==0
label.new(bar_index,low, text = "Buy", size=size.small, style = label.style_label_up)
strategy.entry("Buy", true,2)
strategy.order("T1", false,qty=1, limit = bT1,oca_name='Long',oca_type=strategy.oca.reduce)
strategy.order("T2", false, qty=2, limit = bT2,oca_name='Long',oca_type=strategy.oca.reduce)
strategy.order("Stop_Loss buy", false, stop=Stopbuy,qty=2, oca_name='Long', oca_type=strategy.oca.reduce)
bar_entry:=bar_index

label.new(bar_index[4], buy, text="+ Buy: " + tostring(abc),style = label.style_label_left,textcolor = color.blue, color = color.new(color.black, 100))
label.new(bar_index[4], T1, text="+ T1: " + tostring(T1),style = label.style_label_left,textcolor = color.green, color = color.new(color.black, 100))
label.new(bar_index[4], T2, text="+ T2: " + tostring(T2),style = label.style_label_left,textcolor = color.green, color = color.new(color.yellow, 100))
label.new(bar_index[4], Stopbuy, text="- SL: " + tostring(Stopbuy),style = label.style_label_left,textcolor = color.red, color = color.new(color.black, 100))
Related categories: Pine Script