[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker]Multiple cursor price lines



PureBytes Links

Trading Reference Links

I am trying to use Hermans

 

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() == 9NEW 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

 

 

 

 

 

 

 

 

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

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