量化交易系统

MT4-GS trendS

  • 型号:
Main Image
GS trendS is a trend indicator that can be used for any Forex financial instrument.

The indicator does not redraw and does not lag. Recommended timeframe H1.

Shows the direction of the trend in color:

  • yellow - direction can be SELL or BUY (S_B)
  • blue - uptrend (BUY)
  • red - downtrend (SELL)
The indicator panel displays the trend values of the M5, M15, H1, D1 timeframes for the current price level.

The value of the trend is fixed by the indicator at the opening of the next candle.
GS smart advisor uses the indicator's algorithm to determine the direction of the trend.

Parameters

  • Trend period = 24; - determines the number of candles used by the algorithm
  • Trend filter = 2; - parameter for the criterion for the existence of a trend. The higher the value, the stricter the criterion.
  • Trend panel Offset from right corner =100;
  • Further color settings.

Using

  1. For visual control of the trend and setting the parameters of advisers or making a decision to open orders manually.
  2. For use in your own advisors as one of the criteria for making a decision to open an order
An example of the text of an Expert Advisor testing access to an indicator:

#property description "GS test v1.0 - Expert Advisor"
#property description "This EA use for test"
#property strict
#resource "\\Indicators\\GS_trendS.ex4"

extern string Version__ = "-------------GS test v1.0 -------------";
input int NN=10;//Limit

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
{
//------------Timer
EventSetTimer(1);
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert Timer function                                            |
//+------------------------------------------------------------------+
void OnTimer()
{ static int i=0;
if (i>NN) return;
double r=iCustom(NULL,0,"::Indicators\\GS_trendS.ex4",3,i);
Alert("i="+(string)i+": GS trendS Signal = "+DoubleToString(r,5)+((r==1)?" (SELL_BUY)":(r==2)?" BUY":" SELL"));
i++;
}

The Expert Advisor displays the indicator values every second, corresponding to the history from the current candle to the previous ones (the amount is set by the Limit parameter)

Index 3 of the indicator returns values:

1 - SELL or BUY
2 - BUY
3 - SELL