Home
    Product
    Support
    Purchase
    Company

Advanced trading software: technical analysis and neural networks

Empowering wise traders

Support Center
Publications
Tradecision FAQs
Improvian Consulting
Contact Support Team
Knowledgebase
Collection of Indicators
Custom Indicators
Custom Studies
TASC Traders' Tips
Active Trader Strategies
Golden Trading Rules
Traderís Quiz

Traders' Tips from TASC Magazine
Giorgos E. Siligardos's article,"Building Automatic Trendlines", introduces a simple mechanical method for automatic trendline construction using monoparametric trendlines.

Building trendlines requires identifying peaks and troughs. Therefore, an indicator to identify the price swings is needed.

For the correct construction of an active trendline indicator, one can use Indicator Builder, allowing you to use the powerful capabilities of the Improvian Language.

The following is the code for the active trendline indicator:

Active Trendline Indicator

Input   thresold:"Thresold in percent",1,0,100;
End_input

Var
  array:pivot[4]:=-1;
  sm:=SMA(c,5);
  f1:= 0; f2:=f1;
  pf1:= sm\f1\;
  pf2:= sm\f2\;
  f3:=0;
  pf3:=0;
  n:=historysize;
  pc:=1;
  k:=0;
  y:=0;


End_var

While ((100*abs(pf1-pf2)/min(pf1,pf2) Begin
  f2:=f2+1;
  pf2:= sm\f2\;
End;

f3:=f2;pf3:= sm\f3\;

While (f1<=n and pc<=4) Do
Begin
  While (
    ((100*abs(pf2-pf3)/min(pf2,pf3)     Or
    (((pf1pf2) And pf2>=pf3))))
    And (f3   Begin

  If (((pf1pf2) and (pf2>=pf3))) then
  Begin
  f2:=f3; pf2:= sm\f2\;
  End;


  f3:=f3+1; pf3:= sm\f3\;
  End;

  pivot[pc]:=f2; pc:=pc+1;

  f1:=f2; pf1:= sm\f1\;
  f2:=f3; pf2:= sm\f2\;

End; if (pivot[1]-pivot[3]=0 or pivot[2]-pivot[4]=0) then return inf;
if pc<=4 then return inf;

{Constructing trend}

k:= (sm\pivot[1]\-sm\pivot[3]\)/(pivot[1]-pivot[3]);
k:= (k+ (sm\pivot[2]\- sm\pivot[4]\)/(pivot[2]-pivot[4])) / 2;
y:= pivot[1]*k + c\pivot[1]\;

return y;


Download to import into Tradecision.

How to use this indicator in Tradecision:
  1. Click Download.
  2. Save this indicator in a safe location on your hard drive.
  3. Open Tradecision and in the Tools menu click Indicator Builder.
  4. In the Indicator Builder dialog, click Import, locate the saved file and then click OK.
The indicator will be added to the Custom Indicators list.
 
Active Trendline Indicator
Tradecision Reviews
Video Tours
Ask a question

Site Map   |   Terms of Use   |   Privacy Policy   |   Risk Warning
Forex, equities or futures trading involves substantial risk of loss and is not suitable for all investors.
Copyright © 2001-2017 Alyuda Research, LLC.  All rights reserved