Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
My apologies.
It seems I was aware of your recognition.
I modified the code and ran it again, but this time no alert sound was output at all.
I apologize for my lack of understanding, but I would appreciate your help.
variables: var0(0),highBarNumber(0);
var0 = High ;
highBarNumber = CurrentBar;
if CurrentBar > highBarNumber then
Alert ;
if BarType <= 1 or BarType >= 5 then
begin
if Date <> Date[1] then
var0 = High
else if High > var0 then
begin
Plot1( High, "NewHi-D" ) ;
Alert ;
var0 = High ;
end ;
end ;
スクリーンショット 2023-04-04 Attached image of script code for intraday high update(2)
I would suggest for you to go through your code line by line and think about what each line does, and if your conditions can become true at all or at the points where you want them to.
Additionally, I would suggest making it a habit to use meaningful variable names and comments in your code. This will not only improve the readability of your code, but it will make your programming life a lot easier in the long run.
Regards,
ABCTG
LW11041104
Thank you for your reply.
My apologies.
It seems I was aware of your recognition.
I modified the code and ran it again, but this time no alert sound was output at all.
I apologize for my lack of understanding, but I would appreciate your help.
variables: var0(0),highBarNumber(0);
var0 = High ;
highBarNumber = CurrentBar;
if CurrentBar > highBarNumber then
Alert ;
if BarType <= 1 or BarType >= 5 then
begin
if Date <> Date[1] then
var0 = High
else if High > var0 then
begin
Plot1( High, "NewHi-D" ) ;
Alert ;
var0 = High ;
end ;
end ;
スクリーンショット 2023-04-04 Attached image of script code for intraday high update(2)
I will add comments and other information as you have indicated.
You previously stated, "You should be able to accomplish what you have in mind by adding the parts from the code snippet that you posted to the code in the exact same place that you added the code." I appreciate your reply.
This is the screenshot image of my last post, is it correct that the code addition you indicated is to be added within 8 lines from the 2nd line?
Or are you saying that the code will be added after line 20.
let us keep in mind what you are trying to accomplish. Based on that, I am not sure why you would want to add the code in either of the two locations you mentioned.
Your goal was to block alerts on subsequent bars making higher highs. The tracking of higher highs occurs in the "begin...end" block spanning from line 13 to line 19 (I am referring to the latest image you posted, and not the original code).
I posted the code required for that in my first reply and you can use this to replace line 17 and 18 in the last code you posted. The lines 3 to 7 you currently have in there
will not help in accomplishing what you have in mind. In fact, they will prevent alerts. Therefore, it would make sense to remove them in my opinion.
Regards,
ABCTG
LW11041104
Thank you for your reply.
I will add comments and other information as you have indicated.
You previously stated, "You should be able to accomplish what you have in mind by adding the parts from the code snippet that you posted to the code in the exact same place that you added the code." I appreciate your reply.
This is the screenshot image of my last post, is it correct that the code addition you indicated is to be added within 8 lines from the 2nd line?
Or are you saying that the code will be added after line 20.