NexusFi: Find Your Edge


Home Menu

 





About alerts for intraday high price renewals


Discussion in MultiCharts

Updated
    1. trending_up 1,727 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 16 posts
    2. attach_file 3 attachments




 
Search this Thread

About alerts for intraday high price renewals

  #11 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

LW11041104,

based on that code you should get an alert on every bar and not "each time an intraday high is renewed, but" not if "renewed consecutive".

Regards,

ABCTG


LW11041104 View Post
Thank you for your assistance.

Here is the code.
Best regards.

 
Code
variables: var0( 0 ),highBarNumber(0); 

if CurrentBar > highBarNumber then    
   Alert ;
   
var0 = High ;
highBarNumber = CurrentBar;

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 ;


Follow me on Twitter Reply With Quote

Can you help answer these questions
from other members on NexusFi?
About a successful futures trader who didnt know anythin …
Psychology and Money Management
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
What broker to use for trading palladium futures
Commodities
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
 
  #12 (permalink)
LW11041104
Tokyo,Sapporo
 
Posts: 74 since Jan 2023
Thanks Given: 2
Thanks Received: 3

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.


 
Code
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)

Reply With Quote
  #13 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


LW11041104,

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 View Post
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.


 
Code
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)


Follow me on Twitter Reply With Quote
  #14 (permalink)
LW11041104
Tokyo,Sapporo
 
Posts: 74 since Jan 2023
Thanks Given: 2
Thanks Received: 3

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.

Reply With Quote
  #15 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

LW11041104,

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 View Post
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.


Follow me on Twitter Reply With Quote
  #16 (permalink)
LW11041104
Tokyo,Sapporo
 
Posts: 74 since Jan 2023
Thanks Given: 2
Thanks Received: 3

Thank you for your reply.

We will try again and get back to you with the results.

Reply With Quote
  #17 (permalink)
LW11041104
Tokyo,Sapporo
 
Posts: 74 since Jan 2023
Thanks Given: 2
Thanks Received: 3

We are contacting you to report the results of the verification.

It seems that every time I replace the code and update the intraday high, an alert goes off.

I would like the alert to sound only on the first bar when the intraday high is renewed, what is different in my modified code?

I also took a verification video.


https://www.screencast.com/t/e9yMA3yqfl


スクリーンショット 2023-04-11 Correction code for intraday highs

Reply With Quote




Last Updated on April 10, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts