Manual click on price chart, AB records symbol and price

I've been searching for something that can do this. Happy for any direction you can give me. Thanks.

The purpose would be to scroll through a list of stocks and record the prices at which I'd like to enter. Then I could use the resultant list to send orders to my broker. I know a programatic approach to this is much easier but my eye seems a bit more accurate when it comes to picking levels.

@C_M I'm sure you can do that in many ways, but probably one of the easiest would be using trendlines and Study() function for that. All you need to do is select a chart (unique Chart ID), draw a trendline (in this case horizontal) and assign some Study ID - identical for all selected symbols (it can be any two letters, like "SU", "OR", "X1" etc). Then repeat this process for x other symbols. It is not obligatory, but you can also add these selected symbols to a separate watchlist. Later, using an exploration, you will be able to easily pick all such symbols and retrieve custom price levels (exploration's output) and see them on the chart. More information and example codes (detecting crossing a trendline) below:

http://www.amibroker.com/kb/2007/05/14/how-to-detect-the-study-crossover-for-multiple-symbols-with-use-of-scan/

https://www.amibroker.com/guide/afl/study.html

4 Likes

Very helpful, thanks Milosz.

I have drawn the line on the chart (under the close), saved the line's ID as "SU". I feel like this should work, but it doesn't appear to.

su = Study("SU", GetChartID() ); 
Filter = su<C;
addcolumn(C,"cl");

Chart ID in analysis is always zero. In your analysis exploration code you have to replace GetChartId with the actual chart ID of the chart your line is drawn to.

Go to your chart code (of same chart your line is drawn to) and add

printf( "chart ID: %g", GetChartID() );

to comfortably read chart id from interpretation window. That way you don't need to open parameter window all the time getting chart id from there. Anyhow now add that printed chart id of your Interpretation window output to your analysis code. Re-run analysis.

3 Likes

Perfect thanks fx. Is there a way to automatically make my lines into SUpport lines? Or I have to do that manually for each one?