Thankseevviill,butmy skillsaretoo complicated.I'mstarting outwith programming,they areself-taughtand it's hardfor me to understandsome things. Thanks for everything,Massimo.
Thankseevviill, yourcode works,but I'm notfromthe signal afterthree secondsthat openedthe candle,but if,for example,RSIis above level70after 30 secondsthat the candleis open,the codelets3/2yetand thenbrings upthearrow. For nowthe code thatcomes closestis the onewho suggested I GumRai,butgives methe signal andsets theopeningof the candleand notafter 3seconds.
Thanks for everything,Massimo.
int start(){
if (BarStart !=Time[0])
{
BarStart = Time[0];
//This is the code suggested by GumRai. This works well, but the arrow appears and fixed the opening of the candle, instead of 3 seconds after its opening.
This should check at the first received tick that is at least 3 seconds after the bar open time
Note that if the bar has been open n seconds when the indicator is initialized and n is >3, it will be checked at that time. Also, obviously, it will not work with historical bars.
This should check at the first received tick that is at least 3 seconds after the bar open time
Note that if the bar has been open n seconds when the indicator is initialized and n is >3, it will be checked at that time. Also, obviously, it will not work with historical bars.
:))))
1)I would like to modify this code so that the alert, instead of appearing at the opening of the candle, detects the conditions after a few seconds.
2)but I'm notfromthe signal afterthree secondsthat openedthe candle
Hi guys,you aregreat!!! I do not knowhow to thank youfor your cooperation. The codepostedeevviillworks very well, that's whatI meant. TheGumRaicode insteadmakesrepaintandgivethe signalwhenevertheRSIcrossesthe30/70levels. I insert theworking codeaccording toeevviillsuggestions,hoping that it willserve somemore.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Thanks for everything, Massimo.
Thanks eevviill, but my skills are too complicated. I'm starting out with programming, they are self-taught and it's hard for me to understand some things.
Thanks for everything, Massimo.
For now the code that comes closest is the one who suggested I GumRai, but gives me the signal and sets the opening of the candle and not after 3 seconds.
Thanks for everything, Massimo.
but I'm not from the signal after three seconds that opened the candle
Better to write it first and not "I need every 3 seconds alert."
This should check at the first received tick that is at least 3 seconds after the bar open time
Note that if the bar has been open n seconds when the indicator is initialized and n is >3, it will be checked at that time. Also, obviously, it will not work with historical bars.
This should check at the first received tick that is at least 3 seconds after the bar open time
Note that if the bar has been open n seconds when the indicator is initialized and n is >3, it will be checked at that time. Also, obviously, it will not work with historical bars.
:))))
1)I would like to modify this code so that the alert, instead of appearing at the opening of the candle, detects the conditions after a few seconds.
2)but I'm not from the signal after three seconds that opened the candle
P.S. Do not use Time[0], use Bars
:))))
1)I would like to modify this code so that the alert, instead of appearing at the opening of the candle, detects the conditions after a few seconds.
2)but I'm not from the signal after three seconds that opened the candle
What is your point?
:))))
P.S. Do not use Time[0], use Bars
Why not? There is nothing wrong with using Time[0] to detect a new bar.
I do not know how to thank you for your cooperation.
The code posted eevviill works very well, that's what I meant.
The GumRai code instead makes repaint and give the signal whenever the RSI crosses the 30/70 levels.
I insert the working code according to eevviill suggestions, hoping that it will serve some more.
Thanks for everything, Massimo.