Using MouseClick event to show arrow:

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Using MouseClick event to show arrow:

Postby arjfca » 23 May 2013

Hello
using MC beta 7 and the time precision is to the millisecond. I'm using Tick Chart.

Where is my error

I want to use the mouse click event to show an arrow. From my code, arrow is not showed. I suspect because the time precision is not the millisecond.

Martin

Code: Select all


if MouseClickshiftPressed then begin
Amouseclick = True;
vClickBarNbr = MouseClickBarNumber;
vclickdatetime = MouseClickDateTime;
vClickPrice = MouseClickPrice;
end;

clickdate = juliantodate(vclickdatetime);
clicktime = datetime2eltime_s(vclickdatetime);
If vclickPrice > vClickBarHigh then UpArrow = False else UpArrow = True;

value1 = arw_new_self_s(clickdate,clicktime,vclickprice,uparrow);

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Using MouseClick event to show arrow:

Postby TJ » 23 May 2013

Hello
using MC beta 7 and the time precision is to the millisecond. I'm using Tick Chart.

Where is my error

I want to use the mouse click event to show an arrow. From my code, arrow is not showed. I suspect because the time precision is not the millisecond.

Martin

Code: Select all


if MouseClickshiftPressed then begin
Amouseclick = True;
vClickBarNbr = MouseClickBarNumber;
vclickdatetime = MouseClickDateTime;
vClickPrice = MouseClickPrice;
end;

clickdate = juliantodate(vclickdatetime);
clicktime = datetime2eltime_s(vclickdatetime);
If vclickPrice > vClickBarHigh then UpArrow = False else UpArrow = True;

value1 = arw_new_self_s(clickdate,clicktime,vclickprice,uparrow);
You will need to use these millisecond keywords:

arw_new_dt
arw_new_self_dt
arw_setlocation_dt
arw_gettime_dt

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Using MouseClick event to show arrow:

Postby arjfca » 23 May 2013

"TJ"
arw_new_dt
arw_new_self_dt
arw_setlocation_dt
arw_gettime_dt
We don't seem to have the "_DT" for
clicktime = datetime2eltime_dt(vclickdatetime); It won't compile

- The capture is done using the vclickdatetime = MouseClickDateTime
- The time is then read from the value using : clicktime = datetime2eltime_S(vclickdatetime);

Witch return the wrong format

Martin :)

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Using MouseClick event to show arrow:

Postby TJ » 23 May 2013

additional millisecond help:

viewtopic.php?f=16&t=18785


Return to “MultiCharts”