SFX Trend Or Range Indicator

0
(0)
이름:
SFX Trend Or Range Indicator
작가: BarrowBoy (2011.07.12 10:38)
다운로드됨: 11128
다운로드:
SFX Trend Or Range Indicator 1
SFX TOR.mq4 (6.6 kb) 보다
The Trend Or Range Indicator (TOR)

A remarkably simple but very useful indicator. Earlier and clearer signals than ADX or VHF. More positive ranging signal than any other indicators.

Old conventional theory says when StdDev above ATR then market trending.

I say this idea may be OK for stocks & commodites but for the harmonics of Forex market we need something quicker and clearer. Also never forget time of day in relation to the pairs main movements.

SFX Trend Or Range Indicator 2

Yellow = StdDev
Aqua = ATR
Red = Smoothed Moving Average of the StdDev
용법:

모든 쌍, 언제든지. Best used on majors and M15 period or higher

  • Yellow breaks above Red when below Aqua = Trend building
  • Yellow breaks below Red when above Aqua = Trend exhausting
  • Yellow below Red when below Aqua = Ranging/Sideways market

Details:

Code shows how to apply a Moving Average to almost any indicator.

Some sample code snippets below to show you how to call this indicator in an EA.

// Example EA code
extern int AgedPeriodSwitch = 5;   // 1=M1 2=M5 -- 9=MN1 Enables easy period value changing in optimizer ;)

// Settings for SFX TOR
 int TOR.ATR.Period=12;        // D1=20
 int TOR.StdDev.MA.Period=12;  // D1=20
 int TOR.StdDev.MA.Shift=0;    //
 int TOR.StdDev.MA.Method = 0; // 0=SMA 1=EMA 2=Smoothed 3=Linear Weighted
 int TOR.StdDev.MA.Price = 0;  // 0 종가, 
                               // 1 Open price, 
                               // 2 High price, 
                               // 3 Low price, 
                               // 4 Median price, (high+low)/2, 
                               // 5 일반적인 가격, (high+low+close)/3, 
                               // 6 Weighted close price, (high+low+close+close)/4

 int TOR.MA.Fast.Period = 3;
 int TOR.MA.Fast.Method = 2;   //  0=SMA 1=EMA 2=Smoothed 3=Linear Weighted
 int TOR.MA.Fast.Shift = 0;

bool bTrendEnd;

정수 시작()
 {

 bTrendEnd = IsTrendFading(AgedPeriodSwitch);

 만약에 (IsNewBar)
  만약에 (bTrendEnd) CloseYourTrendingOrders();
   ....
   ....

 반품 (0);
 }

bool IsTrendFading(int iPeriodSwitch)
 {
  int iPeriodToUse;
  string strSymbol;

  strSymbol = Symbol();

  만약에 (iPeriodSwitch == 0) iPeriodToUse = 0; // 즉. the current chart period of the EA
  else iPeriodToUse = PeriodSwitcher(iPeriodSwitch); 

  double Aqua_1 = iCustom(strSymbol, iPeriodToUse, "SFX TOR", strSymbol, TOR.ATR.Period,TOR.StdDev.MA.Period,TOR.StdDev.MA.Shift,
                          TOR.StdDev.MA.Method,TOR.StdDev.MA.Price,TOR.MA.Fast.Period,TOR.MA.Fast.Method,TOR.MA.Fast.Shift, 0, 1);
  double Yellow_1 = iCustom(strSymbol, iPeriodToUse, "SFX TOR", strSymbol, TOR.ATR.Period,TOR.StdDev.MA.Period,TOR.StdDev.MA.Shift,
                            TOR.StdDev.MA.Method,TOR.StdDev.MA.Price,TOR.MA.Fast.Period,TOR.MA.Fast.Method,TOR.MA.Fast.Shift, 1, 1);
  double Red_1 = iCustom(strSymbol, iPeriodToUse, "SFX TOR", strSymbol, TOR.ATR.Period,TOR.StdDev.MA.Period,TOR.StdDev.MA.Shift,
                            TOR.StdDev.MA.Method,TOR.StdDev.MA.Price,TOR.MA.Fast.Period,TOR.MA.Fast.Method,TOR.MA.Fast.Shift, 2, 1);

  만약에 (Yellow_1 > Aqua_1)
   만약에 (Red_1 > Aqua_1)
    만약에 (Yellow_1 < Red_1) 반품 (진실);

  반품 (거짓);
 }

int PeriodSwitcher(int iSP)
 {
  // Takes a number 1-9 returns a chart period
  int iP=0;

   스위치 (iSP) 
   {
    사례 1:
     iP=PERIOD_M1;
     부서지다;

    사례 2:
     iP=PERIOD_M5;
     부서지다;

    사례 3:
     iP=PERIOD_M15;
     부서지다;

    사례 4:
     iP=PERIOD_M30;
     부서지다;

    사례 5:
     iP=PERIOD_H1;
     부서지다;

    사례 6:
     iP=PERIOD_H4;
     부서지다;

    사례 7:
     iP=PERIOD_D1;
     부서지다;

    사례 8:
     iP=PERIOD_W1;
     부서지다;

    사례 9:
     iP=PERIOD_MN1;
     부서지다;
   }  

 반품(iP);
 }

Do not mail me if this EA sample code doesnt compile - is only pseudo-code!!!

이 게시물이 얼마나 유용했나요??

평가하려면 별표를 클릭하세요.!

평균 평점 0 / 5. 투표수: 0

현재까지 투표가 없습니다! 이 게시물을 가장 먼저 평가해 보세요..

이 게시물이 귀하에게 도움이 되지 못했다니 죄송합니다!

이 게시물을 개선해 보겠습니다.!

이 게시물을 개선할 수 있는 방법을 알려주세요.?



작가: 외환 위키 팀
우리는 경험이 풍부한 Forex 트레이더 팀입니다. [2000-2023] 우리 자신의 조건에 따라 삶을 살기 위해 헌신하는 사람들. 우리의 주요 목표는 재정적 독립과 자유를 얻는 것입니다., 우리는 자기 교육을 추구하고 Forex 시장에서 자립 가능한 라이프 스타일을 달성하기 위한 수단으로 광범위한 경험을 얻었습니다..