Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 622

 

Is it possible to download charts for technical analysis, - indexes S & P 500 Futures Chart, TA 25 Chart, and the S & P 500 Chart if possible can prompt how to do this, maybe there is an explanation of how to download!

I can't find such a broker, can you advise a program for technical analysis, which allows me to download the indexes I'm interested in (can be in real time) or a broker.

Maybe there is an opportunity to download these indices MT-4 or MT-5. I'm just beginning to try to do technical analysis, I would very much like to hear expert advice on how to cope with my task.

I am very grateful in advance for your help.
 
Help me figure out how to deal with objects.
Trying to find the price of the last object knowing the first 3 letters in its name.

Thank you.

double Entry()
{
  double Price;
  string ObjName ="ABC";
  int QuantObjects=ObjectsTotal();
  for(Cnt=QuantObjects-1;Cnt>=0;Cnt--)
  { 
    if(ObjectFind(0,StringSubstr(ObjName,3,StringLen(ObjName)-3)) > -1)
    {
      Price = NormalizeDouble(ObjectGet(StringSubstr(ObjName,3,StringLen(ObjName)-3),OBJPROP_PRICE1),Digits);
    }
    else Price = 0;
  }
  return(Price);
}

 
rustein:
Help me figure out how to deal with objects.
Trying to find the price of the last object knowing the first 3 letters in its name.

Thank you.

Try this.

double Entry()
{
  double Price;
  string ObjName ="ABC";
  int QuantObjects=ObjectsTotal();
  string name;
  for(Cnt=QuantObjects-1;Cnt>=0;Cnt--)
  { 
   name=ObjectName(cnt);
   if(StringSubstr(name,0,3)=ObjName)
    {
      Price = NormalizeDouble(ObjectGet(name,OBJPROP_PRICE1),Digits);
return(Price);

    }
    else Price = 0;
  }
  return(Price);
}
 
Roger:

So try it.


That works,
Thank you very much.
 

I have an indicator:

//+------------------------------------------------------------------+
//| T3MA_ALARM.mq4 |
//| Copyright © 2011, Martingeil |
//| fx.09@mail.ru |
//+------------------------------------------------------------------+
//исправленный Martingeil, теперь можно в тестере увидеть его стрелки.
#property copyright "Copyright © 2011, Martingeil"
#property link "fx.09@mail.ru"

//---- indicator settings
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//---- indicator parameters
extern int period = 4; //12
extern int shift = 0; //сдвиг по бару
//---- indicator buffers
double BufferUp[],BufferDn[];
int q,st=5;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(2);
//---- drawing settings
SetIndexStyle(0,DRAW_ARROW,2);
SetIndexArrow(0,233);
SetIndexStyle(1,DRAW_ARROW,2);
SetIndexArrow(1,234);

SetIndexBuffer(0,BufferUp);//стрелка синяя верх
SetIndexBuffer(1,BufferDn);//стрелка красная вниз
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("T3MA-ALARM ("+period+")");
//---- initialization done
if(Digits==3 || Digits==5) q=10;
st=st*q;
return(0);}

int deinit()
{
ObjectDelete("low");
ObjectDelete("high");
}
//+----------------------------------------------------------------------+
//| Moving Average of Oscillator |
//+----------------------------------------------------------------------+
int start()
{
//---- ArraySetAsSeries --------------------------------------------------
double Ma[500],MaOn[500];
double y0[500],y1[500],y2[500];
int i,limit=ArraySize(Ma);
ArraySetAsSeries(Ma,true);
//---- IndicatorCounted --------------------------------------------------
int counted_bars=IndicatorCounted();
int limit1=Bars-counted_bars;
if (limit1>1){limit1=Bars-period-1;}
//---- EMA ---------------------------------------------------------------
for(i=limit1; i>=0; i--) Ma[i] =iMA(NULL,0,period,0,MODE_EMA,PRICE_CLOSE,i);
for(i=limit1; i>=0; i--) MaOn[i]=iMAOnArray(Ma,limit,period,0,MODE_EMA,i);

for(i=limit1; i>=0; i--)
{
y0[i+shift]=MaOn[i+shift];
y1[i+1+shift]=MaOn[i+1+shift];
y2[i+2+shift]=MaOn[i+2+shift];

if(y0[i+shift]-y1[i+1+shift]<0 && y1[i+1+shift]-y2[i+2+shift]>0){BufferDn[i+1]=High[i+1]+st*Point;}//продажа
if(y0[i+shift]-y1[i+1+shift]>0 && y1[i+1+shift]-y2[i+2+shift]<0){BufferUp[i+1]=Low[i+1]-st*Point;}//покупка
//---- Signal Trend Up || Dn ---------------------------------------------
if(y0[i]-y1[i+1]>0) Comment ("\n SWAPLONG = ",MarketInfo(Symbol(),MODE_SWAPLONG),
" SWAPSHORT = ",MarketInfo(Symbol(),MODE_SWAPSHORT),"\n BUY TREND ",DoubleToStr(Close[i],Digits));

else if(y0[i]-y1[i+1]<0) Comment ("\n SWAPLONG = ",MarketInfo(Symbol(),MODE_SWAPLONG),
" SWAPSHORT = ",MarketInfo(Symbol(),MODE_SWAPSHORT),"\n SELL TREND ",DoubleToStr(Close[i],Digits));
}


//---- done
return(0);}
//+---------------------------------------------------------------------+


I want to make an EA which would enter a position when an arrow appears, what condition should be written in the EA?

 

Good day all .... Gentlemen help me with a question about a time parameter. The problem is this, I have a criterion on input with variables that are fixed in a certain time parameter.

M5maBIG_1= iMA(ed,PERIOD_M5,150,0,MODE_EMA,PRICE_CLOSE,1);

M5L=NormalizeDouble(iLow(ed,PERIOD_M5,1),Digits);

if(M5L<M5maBIG_1){ordersend(520);} tried such variants as---- ((M5L<M5maBIG_1))__((M5L)<(M5maBIG_1))__((M5L)<(M5maBIG_1)))---- also does not work!

if(a==520){RefreshRates();//__________________________________________________________________________________

op=NormalizeDouble(Ask,Digits);sl=NormalizeDouble(op-62*kio*Point,Digits);tp=NormalizeDouble(op+54*kio*Point,Digits);

ticket=OrderSend(ed,OP_BUY, Lot,op,3,sl,0,comm,magic+520,0,Green);//_____Lot=

err=GetLastError();

if(err!=0){Print("Error-",err," op-",op," sl-",sl," tp-",tp);}}

Everything works when test on the same M5 time, but only change (when testing, for example on H1), the result also changes, how to write correctly? Thanks!!!

 

MaperiodAVTO = 750 / Period();

laveosa:


Good day all .... Gentlemen help me with a question about a time parameter. The problem is this, I have a criterion on input with variables that are fixed in a certain time parameter.

M5maBIG_1= iMA(ed,PERIOD_M5,150,0,MODE_EMA,PRICE_CLOSE,1);

M5L=NormalizeDouble(iLow(ed,PERIOD_M5,1),Digits);

For example, like this:

 int MaperiodAVTO; 

if( Period()>1){ 

MaperiodAVTO = 750 / Period();

}

else

{

  MaperiodAVTO = 750;

}

 M5maBIG_1= iMA(ed, Period() , MaperiodAVTO ,0,MODE_EMA,PRICE_CLOSE,1);  


 
benzovoz:

For example, like this:

int MaperiodAVTO = 750 / Period();

  M5maBIG_1= iMA(ed, Period() , MaperiodAVTO ,0,MODE_EMA,PRICE_CLOSE,1);  



why 750?
 
laveosa:

Why 750?

He just likes that number.
 
laveosa:

Why 750?
Bringing the period to the minute chart, corrected the code above.