Exit name: error CS1502
Author: nicorenv
Creation Date: 1/22/2015 4:42 AM
profile picture

nicorenv

#1
Good morning!
I started WL a couple of weeks ago and going through the learning curve.
I managed to write code for a couple of strategies, but I am facing a problem that I'm sure will sound dumb.

I am trying to add a comment in the "Exit Name" column that shows the actual exit executed price.

I tried code like:
CODE:
Please log in to see this code.


which returns the error CS1502 (The best overloaded method match for "WealthLab.Bars.FormatValue(double) has some invalid arguments

or

CODE:
Please log in to see this code.

which returns the stop I did input, but not the actual exit price. In case of a gap at the open, I would be executed at the open of the next bar, and not at my "exitp" price.

I need help, please!!!

Thank you!
profile picture

Eugene

#2
Re: CS1502. Look up Bars.FormatValue in the QuickRef (F11 key). It expects a double value whereas you're passing a string. Drop the .ToString() part, it's not required here.

Re: executed at the open of the next bar. What else to expect? In the case of a stop order, it is executed at Stop Price or Open Price, whichever is Higher (Lower).

Also, "bar + compte+1" is wrong. A rule of thumb is: the bar should not exceed bar+1. It is either "bar" for AtClose orders or "bar+1" (but not greater) for anything else.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).