I am trying to use Hermans

 

HYPERLINK
"http://www.amibroker.org/userkb/2008/03/16/setting-prices-with-your-cursor/
"http://www.amibroker.org/userkb/2008/03/16/setting-prices-with-your-cursor/

 

to create multiple price lines. I want an entry price line, a stop price
line, and  a target price line. I thought I could use 3 sets of variables in
place of the existing variables  and use buttons to choose which line had
focus.  

 

LButtonDown = GetCursorMouseButtons() == 9; EXISTING CODE

MousePrice = GetCursorYPosition();

 

LButtonDownENT = GetCursorMouseButtons() == 9; NEW CODE FOR ENTRY LINE

MousePriceENT = GetCursorYPosition();

 

LButtonDownSTP = GetCursorMouseButtons() == 9;  NEW CODE FOR STOP LINE

MousePriceSTP = GetCursorYPosition();

 

LButtonDownTAR = GetCursorMouseButtons() == 9; NEW CODE FOR TARGET LINE

MousePriceTAR = GetCursorYPosition();

 

I would then choose which line I was focusing on with case statements

 

case 101:

       // Perform Button task 101 here

LButtonDownENT = GetCursorMouseButtons() == 9; NEW CODE FOR ENTRY LINE

MousePriceENT = GetCursorYPosition();

 

       break;

       

case 102:

       // Perform Button task 102 here

LButtonDownSTP = GetCursorMouseButtons() == 9; NEW CODE FOR STOP LINE

MousePriceSTP = GetCursorYPosition();

 

       break;

 

etc….

 

the first problem I get is because the variable is in the case statement, it
is not initialized.

 

I am sure there is a better way to deal with this then I am coming up with.
Can someone point me in the right direction.

       

Thanks

 

 

 

 

 

 

 

 


No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.7/1336 - Release Date: 3/20/2008
9:48 AM
 

Reply via email to