[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 341

 
Alexander.a:

Hi all, is there any indicator or..... that would make a grid in MT4 not randomly but after 100, 500 pips???

There is. There is even more than one. google the search string: grid indicator site:mql4.com and you will see at least three.
 

Help, people of goodwill.

For multicurrency iCustom indicator of 5 currencies

(here are pairs "EURGBP", "EURUSD", "EURCHF", "EURJPY", "GBPUSD", "GBPCHF", "GBPJPY", "USDCHF", "USDJPY", "CHFJPY")

Do I need to force-feed the history?

I have a suspicion that the indicator works, but the history for some pairs is not updated when the indicator is running.

Do you have something to suggest?

Preferably a piece of code:)

 

Below there is an Expert Advisor which downloads and periodically updates the history for a required instrument (e.g. EURCAD) into the catalogue.

What and where should I fix in the code, so that data would be exported by creating csv. file in this folder C:\Program Files\Alpari MT4\experts\files\Export_History without creating subdirectories inside?

right now it's dumping C:\Program Files\Alpari MT4\experts\files\Export_History\EURCAD

Files:
 
myrzila:

int tiket[]

int funk1(){

Size=ArrayResize(tiket,n);

for (i=0;i<=Size;i++) {

tiket[i]=OrderSend();

Print(tiket[i]) ;}

}

int funk2(){

for (i=0;i<=Size;i++) {

Print(tiket[i]);}

int init() {}

int start() {

funk1();

funk2();}

Print in the first function produces tikets, everything is ok here, but it produces zeros in the second function - why? Where may the fault be?

Can you figure it out?

//+------------------------------------------------------------------+
//|                                                         Test.mq4 |
//|                             Copyright © 2011, Trishkin Artyom A. |
//|                                           support@goldsuccess.ru |
//|                                           Skype: artmedia70      |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, Trishkin Artyom A."
#property link      "support@goldsuccess.ru"
//                   Skype: artmedia70

int tiket[];
//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//----
   funk2(tiket, funk1(tiket, 5));
   return;
//----
   return(0);
  }
//+------------------------------------------------------------------+

int funk1(int &mass[], int n, int op=0) {
   int i, Size=ArrayResize(mass, n);
   for (i=0; i<Size; i++) {
//      mass[i]=OrderSend();
      mass[i]=i;
      Alert("funk1: mass[",i,"]= "+mass[i]);
      }
   return(Size);
}

void funk2(int &mass[], int n) {
   int i;
   for (i=0; i<n; i++) 
      Alert("funk2: mass[",i,"]= "+mass[i]);
}

Try the analogy...

 
trol222:

Below there is an Expert Advisor which downloads and periodically updates the history for a required instrument (e.g. EURCAD) into the catalogue.

What and where should I fix in the code, so that data would be exported by creating csv. file in this folder C:\Program Files\Alpari MT4\experts\files\Export_History without creating subdirectories inside?

Now it goes like this C:Program Files\Alpari MT4\experts\files\Export_History\EURCAD

Thank you.

But it has a rather complicated design and only one shaft pair at a time, I would like it to be simpler and in many pairs at the same time.

 
ULAD:

Thank you.

But it has a rather complicated design and only one shaft pair at a time, I would like it to be simpler and in many pairs at the same time.


It's not my thing, but you can hang it on different instruments at the same time, so how can this little misunderstanding be corrected?
 
trol222:

It's not mine. but you can hang on different instruments at the same time. so how do you fix this little misunderstanding?

This is how Mnu does it. I put all necessary pairs with necessary TF into one profile and update it that way. I would like to do it programmatically, but I do not have enough skills, as Chapay said.
 
artmedia70:

Can you figure it out?

Try an analogy...


Thanks, I'll try it that way.
 

Kind people, and more importantly, smart ones, explain to a self-taught person what kind of error I get when compiling code?

\end_of_program' - ending bracket '}' expected

 

Hi, I'm new to mql programming.

int start()

  {

   Alert("EURUSD Close",iClose("EURUSD",PERIOD_H1,0));

   return(0);
  }

When I click on this script in the terminal, it shows me the given quote. I want it to show the closing price at the end of each candlestick.

I think I need to add a loop in the code. HELP PLA.

Reason: