Search found 3 matches

Go to advanced search

by MFA
Fri Aug 12, 2022 12:20 am
Forum: Pine Script Q&A
Topic: Coding Variable Position Size in Pine
Replies: 2
Views: 3292
 
Jump to post

Re: Coding Variable Position Size in Pine

Update After looking over the code again this evening, I seem to have fixed the position-sizing issue, though I would still appreciate some clarity on the problem - I'm not exactly sure how I fixed it. However, I'm now having trouble plotting entry, profit, and loss lines to the chart as they were ...
by MFA
Thu Aug 11, 2022 12:44 pm
Forum: Pine Script Q&A
Topic: Coding Variable Position Size in Pine
Replies: 2
Views: 3292
 
Jump to post

Update

I've also tried adding the position size as a percent of equity and using that as the 'qty' argument in my strategy.entry function - I just divide the position size in cash by the account balance: equitytorisk = equity * (i_risk/100) //percentloss = (long_diff/long_entryprice)*100 pos_size = equityt...
by MFA
Thu Aug 11, 2022 4:19 am
Forum: Pine Script Q&A
Topic: Coding Variable Position Size in Pine
Replies: 2
Views: 3292
 
Jump to post

Coding Variable Position Size in Pine

Hi Pine Scripters, I've been working on a simple script derived from Matt's in his latest YouTube video. I'm new to Pine (and to programming), but I am part-way through a strategy that allows the user to set a percentage of their account balance to risk per trade, where the balance is understood to ...

Go to advanced search