support e Resistance error

 

Pessoal, boa tarde. Estou personalizando um indicador que já existe, usando icustom, quero adicionar seta na LTA e LTB. mas esta dando erro.

"LINES"-função deve ter um corpo

Não sei mais o que fazer, estou prestes a desistir.



#property indicator_label1 "SALE"
#property indicator_type1 DRAW_ARROW
#property indicator_color1 clrRed
#property indicator_style1 STYLE_SOLID
#property indicator_width1 1

#property indicator_label2 "PURCHASE"
#property indicator_type2 DRAW_ARROW
#property indicator_color2 clrDarkGreen
#property indicator_style2 STYLE_SOLID
#property indicator_width2 1


//LIBRARY ________

//used in data initialization
void init();//

Usado para gerar parâmetros de entrada (a partir do gráfico de presentes forex)
double Lines(
int region //region number
, tipo int //tipo de região (0= suporte/resistência 1= LTA 2= LTB)
, int candle); //candle



double SALE[];
double PURCHASE[];


extern int MaxBars=1000;
extern int SRZBars=500;
extern int Sensitivity=1;
extern bool ShowSupResZones=true;
extern bool HideSupResPriceLabel=false;
extern bool ShowZoneTouches=true;
extern color ResistanceLineColor=5737262;
extern color SupportLineColor=1993170;
extern color HorizontalLineColor=6908265;
extern int NormalLinesWidth=1;
extern int NormalLineStyle=0;
extern int BrokenLineStyle=2;
extern int HorizontalLineStyle=2;
extern int OverhangBars=15;
extern bool Background=false;
extern bool MakeGlobalVariables=false;



ser duplo = iCustom (NULL,0,"SUPORT",MaxBars 
,SRZBars
,Sensitivity
,ShowSupResZones
,HideSupResPriceLabel
,ShowZoneTouches
,ResistanceLineColor
,SupportLineColor
,HorizontalLineColor
,NormalLinesWidth
,NormalLineStyle
,BrokenLineStyle
,HorizontalLineStyle
,OverhangBars
,Background
,MakeGlobalVariables,0); 0 última alça de vela do gráfico
//_________________________________________________________________________________________________________________________
int init()//função de inicialização, toda vez que estiver carregado na tela do gráfico, chamará essa função primeiro
{
//---
EventSetMillisecondTimer(1000);

SetIndexBuffer(0,SALE);
SetIndexBuffer(1,PURCHASE);
PlotIndexSetInteger(0,PLOT_ARROW,234);
SetIndexArrow (0,234);
PlotIndexSetInteger(1,PLOT_ARROW,233);
SetIndexArrow(1,233);

return(INIT_SUCCEEDED);
}
//_________________________________________________________________________________________________________________________

// OnCalculate responsible for calculating and bringing the arrow and buffers
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
limite int = 1000;
ArraySetAsSeries(SALE, true);
ArraySetAsSeries(PURCHASE,true);
if(prev_calculated < 1)
{
ArrayInitialize(SALE, 0);
ArrayInitialize(PURCHASE,0);
}
else
limit++;
for(int i = 0; i >=0; i--)
{

STRATEGY(i); //strategy i= value of the candle that is traveling
}
return(rates_total);
}

// I calculate GENERATING SIGNALS

estratégia de vazio (int i)// 
{
if //IF THE TOP SHADOW IS GREATER OR EQUAL TO LTB AND IN THE PREVIOUS CANDLE THE TOP SHADOW THAT LTB
(
//LTB
[0+1] SE O CANDLE MAX ATUAL FOR 0 EIE CONNECT EM LOOP REPETIDO, PASSE TODAS AS BARRAS TRAGAM TODOS OS SINAIS (INT LIMITE = 500;)
>= O MÁXIMO DA VELA ATUAL É MAIOR OU IGUAL (Linhas -0)
(0,2,0+i)- 0= REGIÃO, 1= LINHA LTB,
(Low[0+i]<=LINES(0,1,0+i) && Low[1+i]>LINES(0,1,1+i))||
(Low[0+i]<=LINES(1,1,0+i) && Low[1+i]>LINES(1,1,1+i))||
(Low[0+i]<=LINES(2,1,0+i) && Low[1+i]>LINES(2,1,1+i))||
(Low[0+i]<=LINES(3,1,0+i) && Low[1+i]>LINES(3,1,1+i))||
(Low[0+i]<=LINES(4,1,0+i) && Low[1+i]>LINES(4,1,1+i))

)
{
VENDA[0+i] = Alto[0+i] + 50* Ponto;
}
mais
{
VENDA[0+i]=0;
}

}
Files:
FELIPE.txt  5 kb
 
Write in English please and use the </> button to insert your code.
 
  1. Please post only in English on this forum. Use the automatic translation tool if needed. Use simple language structure when using mechanical translation. (2013)

  2. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
              Messages Editor

  3. Do not post code that will not even compile.