[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 434

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
How do I get the beginning of the day's funds in my account?
This is a sound file function, it seems to extract sound from a folder
Question on the function
This is a sound file function, it seems to extract sound from a folder
permission to add "C:\Alpari\Sounds\mikhail_krug_-_zolotye_kupola_(zaycev.net).mp3"
But the mp3 is unlikely to play, you need a wav.
Good day to all! Help with this problem, have an Expert Advisor (written by hand, please do not blame the curve) in tests worked out fine in real time does not open orders and no signs or errors, please help me ...
//+------------------------------------------------------------------+
//| |
//| Copyright 2012, MetaQuotes Software Corp.
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2012, MetaQuotes Software Corp.
#property link "http://www.metaquotes.net"
double ten;
double cena3;
double tp4;
int m=0;
int n=0;
//+------------------------------------------------------------------+
//| expert initialisation function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialisation function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
int tiket;
double Free =AccountFreeMargin();
double lot;
lot=(Free/1000/4);
if (TimeMinute(TimeCurrent())==m && TimeSeconds(TimeCurrent())==n)
{
RefreshRates();
x=Open[1];
t=High[1];
ten=NormalizeDouble (t,4)-NormalizeDouble (x,4);
cena3=NormalizeDouble (t,4)+0.0009;
tp4=NormalizeDouble (cena3,4)+0.0006;
if (NormalizeDouble (ten,4)==0.0024)
tiket=OrderSend(Symbol(),OP_BUYSTOP,lot, NormalizeDouble (cena3,4),3, 0, NormalizeDouble (tp4,4),NULL, 54321, iTime(Symbol(),PERIOD_D1,0)+23*60*60+59*60, CLR_NONE)
}
//----
return(0);
}
//+------------------------------------------------------------------+
Good day to all! Help with this problem, there is an Expert Advisor (written by hand, please do not blame for shoddy hands) on tests works fine in real time does not open orders and no signs or errors, please help ...
int start()
{
//----
int tiket;
double Free =AccountFreeMargin();
double lot;
lot=(Free/1000/4);//need to normalize to second digit
if (TimeMinute(TimeCurrent())==m && TimeSeconds(TimeCurrent())==n)//the first tick may not be
{
RefreshRates(); //surplus
x=Open[1];//where is it initialized?
t=High[1];//the same
ten=NormalizeDouble (t,4)-NormalizeDouble (x,4);
cena3=NormalizeDouble (t,4)+0.0009;
tp4=NormalizeDouble (cena3,4)+0.0006;
if (NormalizeDouble (ten,4)==0.0024)//it will be hard to catch the exact number
tiket=OrderSend(Symbol(),OP_BUYSTOP,lot, NormalizeDouble (cena3,4),3, 0, NormalizeDouble (tp4,4),NULL, 54321, iTime(Symbol(),PERIOD_D1,0)+23*60*60+59*60, CLR_NONE)
}
//----
return(0);
}
//+------------------------------------------------------------------+
Trying to write an indicator.
If the price on 4 bars in a row was the same, then colour it red.
If the price on only 2 bars in a row was the same, then I should colour it green.
But if the price on 4 bars is the same, then naturally it will be the same on 2 bars too. How do I divide them?
Thanks in advance for your help!
Trying to write an indicator.
If the price on 4 bars in a row was the same, then colour it red.
If the price on only 2 bars in a row was the same, then I should colour it green.
But if the price on 4 bars is the same, then naturally it will be the same on 2 bars too. How do I divide them?
Thanks in advance for your help!