MouseClickShiftPressed - futures io
futures io futures trading


Discussion in MultiCharts

Updated by ABCTG
    1. trending_up 218 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 1 replies
    2. attach_file 0 attachments

Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

Search this Thread


(login for full post details)
  #1 (permalink)
Experience: Intermediate
Platform: MultiCharts
Broker: IB Canada/Rithmic
Trading: CL
Posts: 325 since Jul 2011
Thanks: 342 given, 434 received


I created an indicator using the MouseClickShiftPressed reserved word in MultiCharts and it works great. But there is one thing I would like it to do that I can't figure out how to code. if I am clicking off a high, I want a subtraction to be done and if I am clicking off a low, I want an addition to be done in my formula. How can I program it so that when I click, MC knows that I want a high or low? I have left most of the math out of the formula. Step4 is what I would like to change to an addition if I click on a low or a subtraction if I click on a high. Thank you.

Inputs: Add(60), Chart_Length(2), iMultiplier(1), iSquare(2), TL_Colour(cyan), Txt_Colour(cyan);

[ProcessMouseEvents = true];
[RecoverDrawings = false];

switch (getappinfo(aicalcreason)) begin
	case CalcReason_MouseLClick : if MouseClickShiftPressed then begin
		var : recalcpersist iPrice(0), 
		recalcpersist iBar1(0),
		recalcpersist iBar2(0),
		recalcpersist dt1(0), 
		recalcpersist dt2(0),
		recalcpersist dt3(0),
		recalcpersist Step1(0),
		recalcpersist Step2(0),
		recalcpersist Step3(0),
		recalcpersist Step4(0),
		recalcpersist Step5(0),
		recalcpersist Step6(0);	
			if 0 = iBar1 then begin
				iBar1 = MouseClickDateTime;
				dt1 = MouseClickBarNumber;
			if 0 = iBar2 then begin
				iBar2 = MouseClickDateTime;
				dt2 = MouseClickBarNumber;
			if 0 = iPrice then begin
				iPrice = MouseClickDateTime;
				dt3 = MouseClickPrice;
		until (False);
		if 0 <> iPrice and 0 <> iBar1 and 0 <> iBar2 then begin
		Step1 = ------------------------
		Step2 = ------------------------
		Step3 = ------------------------
		Step4 = Step3 + Step2;
		Step5 = ------------------------
		Step6 = ------------------------
		draw_hor_line(Step6, iPrice, TL_Colour, Txt_Colour,  "");		
			iBar1 = 0;
			iBar2 = 0;
			iPrice = 0;


Reply With Quote

(login for full post details)
  #2 (permalink)
Hamburg Germany
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
Posts: 2,186 since Apr 2013
Thanks: 384 given, 1,421 received


you could use MouseClickPrice and check if the click is at the lower or lower and do the addition or if the click is at the high or higher do a subtraction.
You could also use MouseClickShiftPressed to trigger one logic and MouseClickCtrlPressed to trigger another.



Follow me on Twitter Visit my Facebook Reply With Quote
The following user says Thank You to ABCTG for this post:

futures io Trading Community Platforms and Indicators MultiCharts > MouseClickShiftPressed

September 16, 2019

Upcoming Webinars and Events

Every journal equals ten meals for the hungry


Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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.
no new posts