Can someone please give me some assistance on how to go about plotting a trailing stop for a corresponding position a strategy has on?
I cannot figure this out as plotting has to be done from within an indicator, but from within an indicator "MarketPosition" is not accessible.
Thanks
Adam
Help with plotting of a trailing stop
-
- Posts: 742
- Joined: 09 Apr 2010
- Location: Texas
- Has thanked: 483 times
- Been thanked: 274 times
- Contact:
Re: Help with plotting of a trailing stop
For indicators they have a special function for market position called
i_marketposition.
i_marketposition.
Re: Help with plotting of a trailing stop
Thank you.
Any idea how to reference highest or lowest close since entry in an indicator? I am having issues with this as reserved word "barssinceentry" cannot be referenced from within an indicator like in the code below...
plot1(Highest(close, barssinceentry) - (ATR * ATRStop), "Trailing Stop");
Thanks in advance,
Adam
Any idea how to reference highest or lowest close since entry in an indicator? I am having issues with this as reserved word "barssinceentry" cannot be referenced from within an indicator like in the code below...
plot1(Highest(close, barssinceentry) - (ATR * ATRStop), "Trailing Stop");
Thanks in advance,
Adam
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: Help with plotting of a trailing stop
Dear Adam,
barssinceentry cannot be used in indicators, so you will need to define the bar on which the entry occurred using the analysis of market position change: i_marketposition.
barssinceentry cannot be used in indicators, so you will need to define the bar on which the entry occurred using the analysis of market position change: i_marketposition.
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times