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

 
ULAD:

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:)

check GetLastError while referring to currency pairs, if history bounces, wait.
 
msl:

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

\end_of_program' - ending bracket '}' expected

It's written that you need brackets. Look for where the curly bracket was not closed.
 
zx5zx:

I guess some kind of loop needs to be added to the code. HELP PLEASE .

Mm-hmm, and infinite.

int start(){while(true) Alert("EURUSD Close",iClose("EURUSD",PERIOD_H1,0)); }

Although your code would work fine in the Expert Advisor without any changes.

 

Good afternoon,

is it possible to check the load when the indicator is running and how? a vague suspicion that the code is crooked and is slowing down because of this...

 
Is it possible to read the values of a smoothing average, manually applied in a separate window of any indicator, using the Previous Indicators option? If so, how?
 
splxgf:

Mm-hmm, and infinite.

Although your code would work perfectly well in the Expert Advisor without changes.

{while(true) Alert("EURUSD Close",iClose("EURUSD",PERIOD_H1,0)); }

No, let's not make fun (((( We should not execute "alert" every millisecond, but every current closed candlestick. But once an hour, because I am interested only in hourly candlesticks.

This one just hangs. ((

 
zx5zx:

Interested in an indicator, script or advisor?
 
For the script. And for an EA in the future too, please explain
 
zx5zx:
For the script. And for an EA in the future too, please explain

for the script

int start()
{int b;
  while(!IsStopped())
    {
    if(b!=iBars("EURUSD",60)){Alert("EURUSD Close: ",iClose("EURUSD",PERIOD_H1,0));b=iBars("EURUSD",60);}
    }
}

for the adviser


int b;
int start()
{
  if(b!=iBars("EURUSD",60)){Alert("EURUSD Close: ",iClose("EURUSD",PERIOD_H1,0));b=iBars("EURUSD",60);}
}
 
Techno:

for an advisor

it's better this way:

int start()
{static int b;
Reason: