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
Hello! I tried to create an indicator that uses 2 symbols (EURUSD and GBPUSD for example), it doesn't draw (gives an error 4806) ... I get indicator handles in the OnInit function (iRSI for example) of each symbol, I copy indicator data to buffers and perform further operations with them ...It receives indicator data for one symbol (the same symbol that coincides with the symbol on the chart, to which I attach the indicator) it is ok, but indicator data for the second symbol is not received ... i.e., it receives data only for the symbol that coincides with the symbol on the chart, to which the indicator is attached ... what am I doing wrong?
I'm posting the whole code, because nothing works, on mql4 everything was much easier, maybe it's just because I'm not used to it... these handles and auxiliary buffers are killing my brain.
I think the meaning is clear (difference in rsi of 2 correlating symbols), please help....point out the errors?
#property copyright "Copyright 2012, MetaQuotes Software Corp.error #1
failure to use the SRC key
Such an error occurs, for example, if you take a standard custom MACD indicator and change the following line
ExtFastMaHandle=iMA(NULL,0,InpFastEMA,0,MODE_EMA,InpAppliedPrice);
to
ExtFastMaHandle=iMA("EURUSD",0,InpFastEMA,0,MODE_EMA,InpAppliedPrice);
If MACD is attached to EURUSD chart, everything will be drawn, if it's attached to another chart - error 4806 will appear... How can I make it so that in this indicator I can use as many symbols as I want?
If you know how to make the previously posted indicator work, I'd be very grateful.
Lester: Here I put a template, inside there is a modification showing how to crawl.
https://www.mql5.com/ru/forum/6343/page73
If you don't want to, you have to count the variables correctly.
I've got the idea of Schablon file with mixed success, brought it to my conditions a bit and it works. However there is a significant deadlock for me - they are set on the next candle, not on a tick. Here is the part of the EA.
With varying success I got the gist of the Schablon file, adjusted it a bit to my conditions and Hooray - stops and profits are set. However there is a significant deadlock for me - they are set on the next candle, not on a tick. Here is a part of the code.
The code should always contain conditions for some actions, but everything should be checked and have some logic.
If you want to help, print(" ", ); ) and see the result.
The descriptions are all clear and they work. But this is a modification to "breakeven" and "trailing". I should write a modification to set StopLimit and TakeProfit after order opening, i.e.
1. order opening
--------
2. Modification on Stop Limit setting (this is not available yet!)
------
3. Modification for Breakeven
4.Modification to trailing stop
5.Close order
You can use point 2 to modify the order, but only at the beginning of the next bar.
A function is written to open eats: