Errors, bugs, questions - page 2988

 

Concerning DatabaseBind:

DatabaseBind

"The function should be used when the SQL query contains parameterizable values "?" or "?N", where N stands for the parameter number (starting with one). The indexing of parameters in DatabaseBind() starts at zero."

Is this the way it was intended? In sqlite3_bind - these indexes correspond, while yours are offset.

 

Forum on trading, automated trading systems and trading strategy testing

Questions from Dummies

Andrey Dik, 2013.07.11 20:54

How do I know that TRADE_RETCODE_MARKET_CLOSED (market is closed) for a specified symbol without sending a trade order to the server?

If i know that the quotes go, but trade is forbidden for a few minutes after the opening of the trading session, how do i know if trading is allowed to go on request at any time without pounding the server with trade orders? for almost 8 years nothing new about this topic has appeared in the help, please correct me if i am wrong.

 
Andrey Dik:

There are times when quotes go but trading is suspended for a few minutes after the opening of the trading session, how do I know if trading is allowed on request at any time without pounding the server with trade orders? For almost 8 years nothing new has appeared in the help on this topic, please correct me if I am wrong.

Similarly, if FORTS is "barred" and trading is suspended.

 
Andrey Dik:

There are times when quotes go but trading is not allowed for a few more minutes and after the trading session opens, how do I know if trading on request is allowed at any time without pounding the server with trade orders? in almost 8 years nothing new on this topic has appeared in the help, please correct me if I'm wrong.

Take a look at the specification.


If it's filled in correctly, there's no problem.

 
JRandomTrader:

Similarly, if there is a "bar" on the FORTS and trading is suspended.

not clear, so is there a solution or not?

 
Andrey Dik:

I don't understand, is there a solution or not?

It's not a solution, it's an extension of the question.

 
Alexey Viktorov:

Look at the specification.


If it is filled in correctly, there is no problem.

unfortunately there are problems, the trading session is open and trading is prohibited "Market is closed". therefore - trading sessions cannot serve as a reliable guide. you need a direct way to know at any time on request "i want to trade. can i send trade orders right now?"

 
Alexey Viktorov:

Look at the specification.


If correctly filled in, there is no problem.

For FORTS it says 6:45-24:00, not 7:00-23:50. But that's fine.

But what about clearing, which can have different durations?

 

Good afternoon, gentlemen.

Totally can't figure out the execution of functions like TimeCurrent() or iTime.

1. When I print this function, it should show the number of seconds elapsed since 1970. Instead it just shows a nice-looking date in format yy.mm.dd hh:mm:ss. How can I know number of seconds?

2. I have written a simple script (it is shown below), but when I run it for the first time I get a total rubbish - the last bar open time could be few hours earlier than the real one, and today's last one-minute bar was open in 1970.If I re-run the same script after that the result is accurate enough, though M1 bar open time can be shifted. I have 2terminals installed andget the same result.

Has anyone encountered such a problem or it is just me?

Thank you all.

string FI, ArrFI[]={"AUDCAD","AUDCHF","AUDJPY","AUDNZD","AUDUSD","CADCHF","CADJPY","CHFJPY","EURAUD","EURCAD", "EURCHF",
                    "EURGBP","EURJPY","EURNZD","EURRUB","EURUSD","GBPAUD","GBPCAD","GBPCHF","GBPJPY","GBPNZD", "GBPSGD",
                    "GBPUSD","NZDCAD","NZDCHF","NZDJPY","NZDUSD","USDCAD","USDCHF","USDJPY","USDRUB","XAGUSD", "XAUUSD" };
int ArrTF[]={PERIOD_W1,PERIOD_D1,PERIOD_H4,PERIOD_H1,PERIOD_M30,PERIOD_M15,PERIOD_M5,PERIOD_M1}, TF, fi,tf,
    qTF=ArraySize(ArrTF), qFI=ArraySize(ArrFI);
//---
void OnStart()
{for(fi=0; fi<qFI; fi++)
    {FI=ArrFI[fi]; for(tf=0; tf<qTF; tf++)
                      {TF=ArrTF[tf]; Print(FI,",TF ",TF,"   время ",TimeCurrent(),"   текущий бар ",iTime(FI,TF,0));}
    }
}//end of Start
 

I don't know where to post this, so I'll post it here.

Previously, the link from the "AllPosts" profile, which sort of https://www.mql5.com/ru/users/traveller00/publications/all led to posts. It's been going to publications for hours now. So how do I view the posts now? Is it something broken or is it a feature now?