Page 1 of 1

Do the "signals" work? (Tom DeMark TD Setup)

Posted: 02 Jun 2006
by traderwep
i have imported a strategy into multicharts and it compiled properly. it is listed under studies and i have added it to my chart but it does not show up on the chart anywhere.

do the "signals" part of multicharts work? if so, how do i get it to show up on a chart. thanks

wayne

Posted: 05 Jun 2006
by Alex Kramer
There is no support for strategies in public versions of MultiCharts yet.

If you're interested whether it will work in later releases, could you please attach the strategy in question to a forum post or email it to me? I could check it out using an internal version.

code below as you requested

Posted: 05 Jun 2006
by traderwep

Code: Select all

{ Tom DeMark TD Setup Long/Short Entry Strategy
Written by: HamFon
Contact: ncrowle@sprintmail.com
Date: 07/27/2002, original 07/27/2002
Revision: 1.00
Status: Gnu Public License - this indicator may be used or shared freely with
no fee, as long as this original header comment is included.
Purpose: Generates a Buy or Sell Short order based on conditions price trend
Source: Active Trader Magazine, July 2002, page 64.
}

{ Generates a Buy signal when:
1) For each of the last 9 bars, the close is less than the close of the bar 4 bars earlier.
Reverse everything for Sell Short signal.
}

inputs:
TimeStart (0), TimeEnd (0), { hhmm integer or 0 to ignore }
AllowMultipleEntries (false), { blocks new trades if one already active }
DoLong (true), DoShort (true)
;
variables: CountLong (0), CountShort (0);

if CurrentBar < 9 then begin
CountLong = 0;
CountShort = 0;
end else begin
if C >= C[4] then CountLong = 0
else CountLong = CountLong + 1;
if C <= C[4] then CountShort = 0
else CountShort = CountShort + 1;
end;

if (AllowMultipleEntries or MarketPosition = 0)
and (TimeStart = 0 or Time >= TimeStart) and (TimeEnd = 0 or time <= TimeEnd)
then begin
if DoLong and CountLong >= 9
and (L < L[2] and L < L[3]) or (L[1] < L[2] and L[1] < L[3])
then begin
Buy ("TMSetupLE") next bar at C or higher;
Alert ("Ham TMSetup LE");
CountLong = 0;
end;
if DoShort and CountShort >= 9
and (H > H[2] and H > H[3]) or (H[1] > H[2] and H[1] > H[3])
then begin
Sell Short ("TMSetupSE") next bar at C or lower;
Alert ("Ham TMSetup SE");
CountShort = 0;
end;
end;