[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 194

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
It's not working. Here's a screenshot:
The timing seems to be confused + after the end of the first cycle, a new one has not started.
How about another option?
Hi,
Please give me the simplest example to open an order (immediately, without any ifs).
The textbook is very complicated.
Hi,
Please give me the easiest example to open an order (immediately, without any ifs).
The tutorial is very complicated.
OrderSend()
int OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)
Basic function used to open a position or place a pending order.Returns the ticket number, which is assigned to the order by the trade server, or -1 in case of failure. To get more information about the error, you should call the GetLastError() function.
Notes.
When opening a market order (OP_SELL or OP_BUY), only the latest Bid (for selling) or Ask (for buying) prices may be used as the opening price. If the operation is performed for a financial instrument, different from the current one, then to get the latest quotes for this instrument, you should use the MarketInfo() function with the MODE_BID or MODE_ASK parameter. You cannot use an estimated or non-normalized price. If the requested opening price was not in the price flow or the requested price is not normalized according to the number of decimal places, error 129 (ERR_INVALID_PRICE) will be generated. If the requested opening price is severely out of date, an error 138 (ERR_REQUOTE) will be generated regardless of the value of the slippage parameter. If the requested price is out of date but still present in the price flow, the position will be opened at the current price and only if the current price falls within the price+-slippage range.
StopLoss and TakeProfit prices may not be placed too close to the market. The minimum stop distance in pips can be obtained using the MarketInfo() function with the MODE_STOPLEVEL parameter. Error 130 (ERR_INVALID_STOPS) is generated in case of erroneous or non-normalized stops.
When placing a pending order, the opening price cannot be too close to the market. The minimum distance of the pending price from the current market price in points can also be obtained using the MarketInfo() function with the MODE_STOPLEVEL parameter. If the pending order open price is incorrect, error 130 (ERR_INVALID_STOPS) will be generated.
On some trade servers a ban on expiration of pending orders can be set. In this case an error 147 (ERR_TRADE_EXPIRATION_DENIED) will be generated when trying to set a non-zero value in the expiration parameter.
On some trade servers a limit on the total number of open and pending orders can be set. If this limit is exceeded, a new position will not be opened (no pending order will be set) and the trade server will return error 148 (ERR_TRADE_TOO_MANY_ORDERS).
I can't figure out how to calculate the lifetime from pattern formation to 0 bar.
If the pattern exists and there is no hard reference to price and time.
Hi,
Please give me the simplest example to open an order (immediately, without any ifs).
The textbook is very complicated.
Thank you, it's working!
I'm trying to figure out an example from S.K.'s book, rocseparate.mq4 Expert Advisor I start a test, display a chart. At the bottom there is a rocseparate window, but it is empty. Please, advise how to make an indicator drawn in the main window? The code is as in the book:
I'm trying to figure out an example from S.K.'s book, rocseparate.mq4 Expert Advisor I start a test, display a chart. At the bottom there is a rocseparate window, but it is empty. Please, advise how to make an indicator drawn in the main window? The code as in the book:
Tutorial:
"...The rocseparate.mq4 custom indicator of price change rate on the current, nearest larger and next larger timeframes... is a full analogue of the roc.mq4 indicator, but it is displayed in a separate window. This allowed to calculate the values of the velocity lines for different timeframes, not relative to the MA reference, but relative to the horizontal zero line".
Tutorial:
"... The rocseparate.mq4 custom indicator of the rate of price change on the current, nearest larger and next larger timeframes is displayed in a separate window ... is the full analogue of the roc.mq4 indicator, but it is displayed in a separate window. This allowed to calculate the values of the velocity lines for different timeframes, not relative to the MA reference, but relative to the horizontal zero line".
Yes, absolutely right: I drop it on the chart, rocseparate appears at the bottom in its own window. But when I click on "Open Chart" after testing, the chart window is empty. I don't understand what's wrong?