Line to connect entry and exit signals

Questions about MultiCharts and user contributed studies.
Posts: 157
Joined: 14 Jun 2006
Has thanked: 2 times
Been thanked: 4 times

Line to connect entry and exit signals

Postby glam_100 » 06 Dec 2007


Is there a way to display lines that connect the entries and exits in a strategy? In TS we can see by default that a winning trade would show blue lines and losing trade would show red line. I can't seem to find such setting in MC.


User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 06 Dec 2007


At the moment, MultiCharts does not have this feature. However, we are planning to add it in future.


Posts: 150
Joined: 14 Apr 2006
Has thanked: 1 time
Been thanked: 4 times

Postby miltonc4 » 06 Dec 2007

Hi Glam
Try this,found on TS website a while back

[LegacyColorValue = TRUE];

{ Indicator: Trade Marker

Displays lines from trade-open to trade-close.
Move the indicator to the "Hidden" subgraph to save screen space.

Note: since TS doesn't provide much position information to
indicators, I had to calculate the exit price using
I_CurrentEquity. The increase in equity includes any costs
you've factored into your system, so the exit price will be off
by the "cost" amount. In most cases this will be a very small
offset. Also, since I had to use I_AvgEntryPrice for the entry
price, it will show the average entry price if you have multiple
inputs: Win(Tool_Green), Loss(Tool_Red);
vars: MP(0), EPrice(0), EDate(0), ETime(0), ICE(0), ICC(0);
vars: PosProfit(0), ExPrice(0), Line(0);

MP = I_MarketPosition;
ICC = I_CurrentContracts;
ICE = I_ClosedEquity;

if MP <> MP[1] then begin { Position has changed }
if MP[1] <> 0 then begin { Just exited a position }
PosProfit = (ICE-ICE[1])/BigPointValue;
if MP[1] = 1 then ExPrice = EPrice + PosProfit / ICC[1]
else ExPrice = EPrice - PosProfit / ICC[1];
Line = TL_New(Edate, Etime, Eprice, Date, Time, ExPrice);
TL_SetSize(Line, 1);
if PosProfit > 0 then TL_SetColor(Line, Win)
else TL_SetColor(Line, Loss);
if MP[1] = -1 then TL_SetStyle(Line, Tool_Dashed);
if MP <> 0 then begin { Just entered a position }
EPrice = I_AvgEntryPrice;
Edate = Date;
Etime = Time;

if false then plot1(0,"");

Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

This won't work because...

Postby 2haerim » 07 Dec 2007

MC does not support I_MarketPosition and I_CurrentContracts yet as far as I know.

If I am wrong, let me know.

Return to “MultiCharts”