Hi,
I need some help with this line
CODE:
Please log in to see this code.
I want to sell a share when the price increase for $51.
Example:
Bought a share for $100 and I want to sell it at $151... or same share at $130 and sell it at $181...
Thanks a lot
S
Size:
Color:
Hi,
Unless you bought at any price during [bar-1] or Open[bar], selling at limit at "bar" will most likely peek into the future thus leading to inflated results.
What kind of help do you need with this line?
Size:
Color:
Thanks Eugene.
I didn't really understand what you meant. Do I have to put bar+1 then?
Either way, it works fine now. I couldn't understand why the results didn't show profit=$51, I forgot to turn off the commission :-d
Size:
Color:
Ok I cannot find the result I want. I am translating a backtest from prorealtime to wealthlab.
Since Jan 1st the results on prorealtime for the .SPX are:
75% winning trade when it's a long market and 82% when it's a bear market. I translated all the code now and I don't have the same results...
if you have any suggestions, here is the code:
CODE:
Please log in to see this code.
Size:
Color:
After fixing some obvious peeking that I suggested earlier and simplifying the structure, here's my take at it (w/o knowledge of your original rules):
CODE:
Please log in to see this code.
Size:
Color:
Thanks a lot!! It looks a lot better!!! you rock!
Size:
Color: