[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 347
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
Something is wrong with the visualiser and the tester. The trades are displayed incorrectly in the picture, and there is no logic where everything is shifted. I tried different strategies (Sidus on the picture), reinstalled the terminal, deleted the folder and cleaned the registry, ran it on Linux. Everywhere the same thing. Deals in the air. What the hell is this? Alpari 399 terminal.
Hello!
I can't figure out how to access the last closed bar, the textbook says that bars are indexed by "Bar [1]", I need to check if the last bar is bullish or bearish, please help me with the code as an example:
int LastBar = Bar[1];
if (lastbar... whatever)
{alert ("Bullish candle");}
else {alert ("Bearish candlestick");}
How can I access an indicator which isn't in this list https://docs.mql4.com/ru/indicators ?
For example a downloaded one from the net.
Thank you.
Hello!
I can't figure out how to access the last closed bar, the textbook says that bars are indexed by "Bar [1]", I need to check if the last bar is bullish or bearish, please help me with the code as an example:
int LastBar = Bar[1];
if (lastbar... whatever)
{alert ("Bullish candle");}
else {alert ("Bearish candlestick");}
What is a bull/ bear bar?
you need Open[1] / Close[1]
How can I access an indicator which isn't in this list https://docs.mql4.com/ru/indicators ?
e.g. downloaded from the internet.
via iCustom
Once again!
Can you tell me how to allow the EA to trade only the first 10 minutes of each hour?
How can I disable the clock from the code below and leave only the minutes?
Function isTradeTimeInt().
This function returns a flag to allow trading by time. The returned value is true or false. Function isTradeTimeInt() is similar to function isTradeTimeString() by the principle of time interval recognition, i.e. the trade start time can be both larger (time interval within a day) and smaller (time interval in different days). Function isTradeTimeInt() accepts the following optional parameters:
hb - Number, sets the hour of trade start time. Default value - 0.
mb - A number, specifies the minutes of trade start time. Default value - 0.
he - A number indicating the hours of trade end time. The default value - 0.
me - A number, specifies the minutes of trade end time. Default value - 0.
//+----------------------------------------------------------------------------+
//| Author : Kim Igor V. aka KimIV, http://www.kimiv.ru |
//+----------------------------------------------------------------------------+
//| Version : 30.04.2009 |
//| Description : Returns flag to allow trading by time. |
//+----------------------------------------------------------------------------+
//| Параметры: |
//| hb - hours of trade start time |
//| mb - minutes of trade start time |
//| he - hours of trade end time |
//| me - minutes of trade end time |
//+----------------------------------------------------------------------------+
bool isTradeTimeInt(int hb=0, int mb=0, int he=0, int me=0) {
datetime db, de // Start and end time
int hc; // Current time clock of trade server
db=StrToTime(TimeToStr(TimeCurrent(), TIME_DATE)+""+hb+""+mb);
de=StrToTime(TimeToStr(TimeCurrent(), TIME_DATE)+""+he+": "+me);
hc=TimeHour(TimeCurrent());
if (db>=de) {
if (hc>=he) de+=24*60*60; else db-=24*60*60;
}
if (TimeCurrent()>=db && TimeCurrent()<=de) return(True);
else return(False);
}
Once again!
Can you tell me how to allow the EA to trade only in the first 10 minutes of each hour?
Good evening all Could you please advise if I have installed MT5 the indices from MT4 can simply be transferred or do they need to remake
but the turkey part is not much affected by the changes
Is there also a glass in MT5 ? Thank you
this is easy to check. when opening a candle, insert Print()
I need a script that opens 2 orders on different currency pairs. I can't specify the pair in the code. When compiling, it generates an error.
Am I writing the pair correctly?
int start()
{
OrderSend(Symbol(UERUSD),OP_BUY,0.1,Ask,0,Ask-400*Point,Ask+100*Point);
OrderSend(Symbol(GBPUSD),OP_SELL,0.1,Ask,0,Ask-100*Point,Ask+400*Point);
return(0);
}
By the way, did I write the take profits and stop losses correctly. For both T/P 10; S/L 40