Jump to content
Medved Trader Forums

DefinePaintbarParameter


Recommended Posts

Hello,

Is DefinePaintbarParameter limited to numeric values only? Is it possible to accept String as parameter?

I am trying to adds prices of 2 or more option symbols and plot a line using SetYValue of this net price for an option strategy.

It is working fine except I cannot change symbol on PB parameter on chart.

//Defined Vars to use CompareSymbol

 



Any other way to do this?

Edited by Kasper
Link to comment
Share on other sites

it is numeric only. Cannot use the string parameter to change the compare symbol.  

If this is for a Paintbar on a chart vs scan, then just define the Compare To Symbol indicator in the Paintbar and do NOT set the symbol parameters. Then, when you add the paintbar to the chart, make sure to also add the "Compare To Symbol" indicator. The Paintbar will take the definition of that indicator

Link to comment
Share on other sites

I posted my code above but I guess code is not allowed.

Plotting Compare Symbol is no problem, it works with or without paintbar.

My goal is to track last prices of two symbols, add or substract them and plot a line in lower indicator window. It works fine for more liquid symbols but less accurate estimate when one or more symbol is illiquid. I would like to set alert when net price is closing in my target.

There's no last/bid/ask price option for Compare Symbol, I use short time frame to simulate last price. Is it possible?

If paintbar parameter could accept string then copying symbol will be easier, instead of updating in the paintbar and having to manage multiple paintbars.

 

1403687966_2021-03-0508_30_54-Scan_PaintbarEdit_Compare2xa_-MedvedTrader.png.439894d44e4306cc037b193dffcd6789.png

1823668418_2021-03-0508_28_49-PYPL.thumb.png.90b7227881f3bd74310888372561d55e.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...