p.Symbol vs p.Bars.Symbol
Author: MrIzzy
Creation Date: 1/12/2010 8:43 AM
profile picture

MrIzzy

#1
Hi There,

What is the precise difference between p.Symbol and p.Bars.Symbol (assuming that p is a Position)?

Many thanks,
Izzy



For example, in the RSI rotation strategy we have the code snippet:
-------------------------------------------------------------
foreach(Position p in ActivePositions)
if (p.Bars.Symbol == holder.symbol)
{
buyPosition = false;
break;
}
--------------------------------------------------------------

What would happen if instead we had
--------------------------------------------------------------
foreach(Position p in ActivePositions)
if (p.Symbol == holder.symbol)
{
buyPosition = false;
break;
}
----------------------------------------------------------------

profile picture

Eugene

#2
p.Symbol is a shortcut to p.Bars.Symbol.

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).