Errors, bugs, questions - page 1803

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
Or, as just said here, ask for the number of bars, also a few cycles.
This also applies to indicators. Create a 1-minute timer and ask for the number of bars of all timeseries of interest.
Checking the timing fact does not hold the timing.
Dear developers! Once again I ask to add time in ms for sentiment values(SYMBOL_SESSION_...) and tumbler( OnBookEvent()) as soon as possible. Give a chance to make synchronization of all available data!
Metaquotes-Demo, symbol DIG-20170330
SymbolInfoDouble(Symb,SYMBOL_SESSION_PRICE_LIMIT_MIN) = 29528.0
(ENUM_SYMBOL_TRADE_MODE)SymbolInfoInteger(Symb,SYMBOL_TRADE_MODE) = SYMBOL_TRADE_MODE_FULL (4)
Error in SYMBOL_SESSION_PRICE_LIMIT_MIN: above Ask - no BuyLimit can be set.
Please share your bike: a bool function that tells you whether a symbol is ready to trade or not.
{
MqlDateTime sTime = {0};
TimeToStruct(time, sTime);
return((ENUM_DAY_OF_WEEK)sTime.day_of_week);
}
// true - находимся в торговой сессии
bool SessionTrade( string Symb = NULL )
{
datetime TimeNow = TimeTradeServer();
const ENUM_DAY_OF_WEEK DayOfWeek = GetDayOfWeek(TimeNow);
TimeNow %= 24 * 60 * 60;
if ((Symb == NULL) || (Symb == ""))
Symb = Symbol();
bool Res = false;
datetime From, To;
for (int i = 0; SymbolInfoSessionTrade(Symb, DayOfWeek, i, From, To) && (!Res); i++)
Res = ((From <= TimeNow) && (TimeNow < To));
return(Res);
}
// Возвращает true, если символ торгуемый. Иначе - false.
bool SymbolTrade( string Symb = NULL, const int Pause = -1 )
{
MqlTick Tick;
if ((Symb == NULL) || (Symb == ""))
Symb = Symbol();
if (Pause >= 0)
Sleep(Pause); // Если только что произошло добавление символа в Обзор рынка, нужно дождаться поступления данных в Marketwatch.
return(SymbolInfoTick(Symb, Tick) ? ((Tick.bid != 0) && (Tick.ask != 0) && SessionTrade(Symb) &&
((ENUM_SYMBOL_TRADE_MODE)SymbolInfoInteger(Symb, SYMBOL_TRADE_MODE) == SYMBOL_TRADE_MODE_FULL)) : false);
}
if (Pause >= 0)
Sleep(Pause); // Если только что произошло добавление символа в Обзор рынка, нужно дождаться поступления данных в Marketwatch.
What if it's in an indicator?
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
fxsaber, 2017.02.14 12:31
Immediately after SymbolSelect(true) I request prices and they are zero. With _LastError == 0, SymbolInfoTick == true.
How do I know that prices on new symbol for Marketwatch have been delivered to Marketwatch?
Hence the legs.
If the indicator plots some statistical data on symbols that are not known beforehand, when you select the next symbol from the panel, you often cannot get the data for it at once, and the table will contain false information... How can I be sure that the data received from the symbol is correct and in sufficient quantities to obtain further correct calculations?
Honestly, I don't get it. I was wondering: how do you know if a symbol is ready in an indicator? Sleep() does not work in indicators.
If the indicator displays in the table some statistical data on symbols that are not known in advance, then when you select the next symbol from the panel, you often can not immediately get the data for it, and the table displays false information... How can I be sure for further calculations, that the data obtained from the symbol are correct, and in sufficient quantities to obtain further correct calculations?