Use click of left mouse button for multiple fib. studies

Hi,

For many many moons I have tried to solve this issue ! I had earlier started a topic which changed its course
to plotting Hi Lo tags - closed as success achieved , many thanks to PanoS.

My goal, ha ha ha, is to be able to do multiple Fib. price and time studies on the same chart, using only the
left click of the mouse button, without creating a messy chart .

My journey started with using "range markers" ----- draw back == can only be done once.

Step 2 was using a trend line - so now multiple fib studies possible - also chart is relatively clean, when compared to the use of the inbuilt fib retracement studies.

The below screen capture is where I am at now:

image

This shows only retracements --- can anyone help me to do the same using "just click of the left mouse button!

I will post a screen capture of time retracement, showing the draw back of using "trendlines" for fib studies.

1 Like

Hi,

Just adding the screen capture of time studies.

This highlights the point that using a trend line for fib PROJECTION study is not possible for multiple studies.

For a projection a third point is needed - this is selected using a left click -- selected bar -- this will effect all the studies on the chart -

NOTE THE POSITION of the "SB" tag (selected bar) above(blue) and below (dark red) -- it is the SAME - so independant time studies not possibe.

image

Mouse clicks, mouse clicks and only mouse clicks is the goal ---- guidance required.

Hi,

8 days and no feed back on using mouse clicks for drawing.

I have tried to search in the library and on the forum and have not found any solution / thread for using

the left click of a mouse button for drawing using an AFL code - there are examples for changing the color , moving a square / spiral etc but nothing for drawing and controlling the no. of clicks.

I am still working on this and the reason is that I am relatively new, have been led to believe that all is possible in Amibroker.

The result will be clean charts with all the studies!

I am posting a screen capture of this mornings nifty 5min chart with only one set (1 retracement + 1 extension + 1 projection) for price and only ONE time extension (time projections not possible) - what a messy chart - imajine what would be the look with multiple studies.

image

My final question - IS IT POSSIBLE TO ACHIEVE MY GOAL WITH AMIBROKER or the present version (6.28)
does not have this capability.
So that either I continue trying or realize that it is not possible in Amibroker!

Mouse clicks for multiple fib time and price studies!

@JEETU do you really think that if nobody provided you with ready to use, custom solution meeting in 100% your criteria, it is impossible to code it in AFL? Of course it is doable. Why wouldn't it be possible? AmiBroker and its AFL is a really sophisticated tool. The problem is that you (especially as a newbie here) can't expect other users to prepare sophisticated codes for you just because you have requested so. It requires good skills and spending a lot of time to do that. Sometimes you might be really lucky and find a user who generously will assist you or share his/her own solution, but in general this forum is meant to help you, not give-away copy-paste sophisticated solutions on demand for free. If you are not skilled enough to code your own custom solution, there are other ways of doing that. See here: Third party services blogs courses books add-ons

That's not truth! In your prior thread on the same (or almost identical) subject, I have given you a solution allowing to identify a custom double click, triple click etc. Inspite of the fact, that I don't think that it is a good idea to make use of a double click in your code because AmiBroker already uses it for other purposes and it will pose some problems (my code bypasses it allowing to define a custom double click (difference in miliseconds between clicks) - different from the system one:

Besides you can find many examples of using mouse clicks to perform different tasks, but you cannot expect finding an example exactly in line with your request - that's highly unlikely.

I have also suggested much simpler solution (no coding at all) using different Layers:

@PanoS have provided you with his code:

and among other things suggested, that you need to use StaticVars to store the values to make them permanent. And after all this you just created another thread on almost identical subject which strips all the context from the prior thread.

... that's probably because the feedback was in your first thread - which in my opinion, you should have continued instead of creating another one.

2 Likes

Hi,

Thanks for the reply.

Now that I have it on record from an old master that it is possible I will continue looking for a solution.
I definitely do not want any one to write an AFL for me, where is the learning in that ?
After all we have a forum, where I believe Amibroker users are supposed to help each other - or am I wrong
in this belief ?

All the previous solutions offered were different layers, using trendlines (fibo AFL) etc have not addressed
the key question -- "is it possible to use only a click of the left mouse button" !!

The previous thread did help a lot. Unfortunately all of your above reply does not deal wit using a single click of the left mouse button to perform drawing tasks! There is double click - which thanks to your advice I did not follow.

Then there is ctrl +click and also using a trendline ! Not one about using only the left click - seems like no one has done it before ???

The only guidance about using a click of the left mouse button was from PanoS - and I have already
mentioned in my previous thread I am grateful for i, which I will state again --- many, many thanks to PanoS!

I can only mention that please read the question before providing an answer -
Despite my repeating "only the click of the left mouse button" - all different methods were pointed out and it was only PanoS who pointed me in a direction of using a click of the mouse button!!

Develop your AFL using CTRL + Click, and post your solution here. I'm sure this way you can receive more suggestions

1 Like

I'm sorry, but the difference between using only mouse click versus Ctrl + mouse click is exactly like this: if (MouseButtonPressed) ... vs. if (MouseButtonPressed AND CtrlPressed)... So you must admit, it doesn't change the whole code ...

In your first thread I have given you the link to the example code allowing user to draw an object (a spiral) using Ctrl + left mouse button and later delete this object using Ctrl + middle mouse button. Additionally thanks to RequestMouseMoveRefresh() (used conditionally only when drawing) you can see the changes "live" - so it works very similar to drawing an object using the inbuilt drawing tools:

I have not proposed a solution using only left mouse click to draw objects, because in my opinion it would be very unhandy and impractical solution. It would interfere with many tasks that are performed when you click on the chart! You would draw something every time you click on the chart - for example when you select some bar, mark the start/end of the range or just want to go to the chart Properties... From my point of view, it's a really bad idea, but you are free to experiment with whatever solution you want...

That won't be necessary, because I've already spent enough time trying to help you and as I can see it leeds to nowhere, so I'm not going to continue this discussion ...

2 Likes

@JEETU Actually there is really great example that draws custom shape using left mouse clicks written by @Kuba on this very forum, so you should just search harder :slight_smile:

1 Like

Hi and thanks,

I had seen the code but ran away from it when I saw "matrix" - last time I studied about matrix was in 1972 or
maybe 1973.

Will get to that topic also, one step at a time.

You can skip the matrix part and focus on mouse click handling alone :slight_smile:

3 Likes