Bahman Asgarov / Publications
Forum
Economic Calendar trading
Hello, I have a question about newly introduced Calendar in MQL5. Is it only used for closing open orders before the economic news ? Or it can be used for opening new orders depending on the content of the news? I mean, does the news contain actual figures rather than planned event data? For ex, if
Common code for all symbols
Sometimes, I need to use a code that will be not attached to a specific chart. I mean, if I use the same EA in 2 charts(for ex EURUSD , GOLD), then the code of this EA runs twice for both charts which is not desirable. For example, orders closing, I want to do once, for all the symbols... not each
OrderClose function does not function as expected....
void CloseAll() {double bid, ask, price;bool success; for(int n=0 ;n<=tot;n++){if(!OrderSelect(n,SELECT_BY_POS,MODE_TRADES)) continue; bid=MarketInfo(OrderSymbol(),MODE_BID);ask=MarketInfo(OrderSymbol(),MODE_ASK);price=(OrderType()==0)?bid:ask;
Contract size...
Can anyone explain me how to find contract size programmatically? Like the one which is on MT4 contract specification... Market Watch -> Right Click -> Specification -> Contract size -- 100,000 (for ex, for EURUSD=100,000, for Bitcoin it is 1, for XAUUSD=100, and so on) It is used in formula for
New trading signal is not enlisted, why?
Hello, I have registered myself as a signal provider already registered my first signal to be used by subscribers. However, I cannot see its name in the list of Signals, why? Whom, should I address? They say write to forum. Anyone can answer me with this question, please? Regards Bahman
how to find the Chart Items, including its existing Expert Advisor.
It is necessary to avoid a duplicate working of my Expert Advisor in paralel Charts. For ex, if it is already running in EURUSD chart , then if a user loads it into GBPUSD, it should not work but exit. It is because, my EA is not related to only one instrument or one chart, it works with several of
How to restrict the EA to run with only one symbol, avoiding its accidental running with other symbols?
I need run a certain modules of an EA to be run with only one symbol, let say "EURUSD" and block others ( GBPUSD ) to do the same. For ex, if my robot is used in one symbol (EURUSD), and if it is runnig some module of closing all orders, I need to block other symbols to do the same. That means, for
FileWrite - does not add text into the end of file, but replaces the content of CSV file, why?
I need to add some information into the end of CSV or TXT file, but every time I open the file with FileOpen and write the text there, it erases all information and write a new text.. But I need to add the new information into the end of the file, while keeping the previous text as well. Kind of
how to find a number of pips according to equity percentage?
if I need to take 1% if equity as an order target profit, how can I calculate the number of pips (for TP) as a function of Equity percentage? pips = F(equity%)... Any idea? I need to find the formula... bahmanaskerov at yandex dot ru
How to calculate 1 pip programmatically?
When I read different material, I cannot figure out the exact formula for calculating 1 pip... I mean, number of pips, difference from opening and current price. is it (Current price- Opening price )/point? Please provide the exact formula that will calculate the number of pips for all pairs