AmiBroker 7.20.0 BETA released

A new BETA version (7.20.0) of AmiBroker is available now.

DOWNLOAD LINKS

32-bit version:
https://www.amibroker.com/members/download.php?AmiBroker.7.20.0.exe

64-bit version:
https://www.amibroker.com/members/download.php?AmiBroker.7.20.0.x64.exe

HIGHLIGHTS

  • Analysis: New RADAR mode for continuous, flicker-free Exploration monitoring; fixed MT Optimization statistics issues
  • AI & IPC: Added named-pipe IPC, MCP server support, and secure remote AFL execution
  • Performance: Major Time & Sales performance improvements
  • Data: added new IQFeed plugin with bad tick filter (Trade Conditions filtering) and new AmiQuote 4.40.
  • UI: New Light/Dark editor presets and improved Auto-tile MDI options.
  • Reports & Compatibility: ReportViewer Windows 10/11 compatibility improvements plus readability improvements in reports
  • Multi-System Backtesting (Wave 1) preliminary (partial) implementation - more info will follow

BETA STATUS

There are lots of completely new features including IPC named pipes, MCP server and last but not least multiple-system backtesting. These features are early preliminary versions. The functionality is incomplete and under development. The intention to release now is to collect early feedback on new features without waiting months. These features should be treated as "early access/preview" rather than complete stuff.

DOCUMENTATION

For the details see ReadMe.html and ReleaseNotes.html inside AmiBroker folder, F1 help, as well as in the on-line guide AmiBroker 7.00 User's Guide

Extra documentation on new features is under development and will appear on the forum in subsequent days. Please be patient. This is huge release and lots of docs need to be written from scratch.

UPGRADE POLICY

This version is a free upgrade only for users who registered AmiBroker after August 13, 2024 . Users who registered earlier, would need to purchase license upgrade. To find out the version you currently have use Account Information page at https://www.amibroker.com/members/info.php

CHANGES FOR VERSION 7.20.0 (as compared to 7.10.0)

  1. UI: Prefs/AI page - added a switch that allows AFL execution via IPC / named pipes (and thus via MCP) and message box asking if user is completely aware of the risks
  2. IPC: when AFL formula is executed from remote source via afl_execute call, certain functions are blocked for safety
    AI: MCP (Model Context Protocol) server implemented as open source software using new IPC (named pipes) - details in separate doc (AmiBroker ยท GitLab)
  3. IPC: in addition to existing OLE automation interface a new IPC mechanism implemented - named pipes - details in separate doc
  4. New Analysis: Individual MT Optimization - multithreaded race condition could cause incorrect MAE/MFE/drawdown stats in certain scenarios. Fixed.
  5. New Analysis: new "RADAR" mode - continously running exploration with double buffering (so output doesn't reset and doesn't flicker and keeps its position / selection ) allowing constant monitoring nearly like "real-time" window but with completely custom
  6. Backtest report: fixed CSS style to use correct fonts in all browsers
  7. Charts: marquee indicator does not stay on screen when chart is empty (for example due to lack of data)
  8. IQFeed Tick filtering based on "Trade Conditions"
  9. Report Viewer: now it requests browser emulation 11001 (IE "Edge" mode)
  10. Report Viewer: OS bug - on some machines with certain versions of Windows 10/11 CHtmlView started crashing on exit, even though application did not change for ages. Implemented workaround to OS bug.
  11. Since Microsoft's GetVersionEx function is lying about windows version, implemented yet another "workaround" to MS absurd practices to report actual Windows 11 in crash report when Windows API is lying that it is 10 (when build number is greater than 2200
  12. Time&Sales - drastically improved performance of T&S window (it was a bit slow with 1000 trades per second per symbol, now it is much faster)
  13. UI: if "Auto-tile MDI windows" option is set to "Always" the tiling also happens on main frame resize now (in addition to tiling only on adding new window)
  14. UI: Pref/Editor: added presets for Light and Dark mode editor colors
  15. UI: Prefs/Misc: "Auto-tile MDI windows" setting has 3 options: Never, Always and "Only on adding new". The third option is compatibility setting to make it work as in pre-7.20 versions
  16. MULTI-SYSTEM BACKTESTING WAVE 1 (more details will follow soon)

CHANGES FOR VERSION 7.10.0 (as compared to 7.00.1)

  1. AFL: Added protection against passing reserved names in VarSet function calls: Error 77. The variable name '..." passed to VarSet is incorrect, it is already assigned to a ....
  2. AFL Editor: when Debug->Go was used and code had loops and inside the loop the warning (not error) was generated, the loop was exited prematurely. Fixed
  3. Web Research: WebView2 only - implemented full-featured robust Ad-Block (via Extensions / uBlock )
  4. Web Research: WebView2 new browser now implemented in 32-bit AmiBroker version too (previously it was 64-bit only)
  5. UI: for better user-experience Help->Activate dialog tells the user that they were already activated and there is no need to worry about doing it again
  6. UI/Date: implemented custom N-month intervals (just type 2M in the interval combo box to get bi-monthly periodicity). Note that MONTHS are UPPER case "M", while lowercase "m" is minutes
  7. Charts: improved rendering of sparse dot chart at extreme zoom out
  8. Internals/QuickGFX: FillSolidRect() for QuickGfx adjusted to render one pixel less (vert and horz) to match GDI FillSolidRect
  9. Charts: added marquee indicator that appears when formula is super slow and takes more than one second to execute (as indicator that user should fix the formula)
  10. Web Research: implemented built-in ad-block downloader/updater
  11. AFL: preprocessor now counts #Include nesting levels and will issue Error 78 if your formula exceeds 20 levels of nesting (which typically occurs if you have circular reference in includes leading to endless include loop)
  12. AFL Editor: calltip is now hidden when auto-complete list drops down
  13. AFL Editor: when auto-comple fills built-in function name, opening and closing braces are automatically added and call tips is immediatelly presented.
  14. Charts: maximum pixel width of candle body increased to 90 pixels (from 30)

Previous version AmiBroker 7.00.1 Official released

Continuing the discussion from AmiBroker 7.10.0 BETA released

16 Likes

IPC Server documentation:

MCP Server documentation and sources:

6 Likes

i managed to get it running. I use a free LLM at the moment and got that working, see image. Ready to do some testing with it.

One remark is that in AmiBroker / MCP Server ยท GitLab it shows running the server: python mcp_amibroker.py

but the file has a different name: python mcp_my_server_http.py

4 Likes

i hardly have done any testing and already having some Belgian beers right now but just asked some question to the LLM connected to Amibroker and since the client of my choosing is not in the API type list I was suggested to chose to "Allow remote AFL", see image below. Wow !! my initial reaction is that it can see it all. Will do some testing soon.

4 Likes

I am playing around with it trying to understand what is possible. My idea was to write a simple ATR trail system together with the LLM. Which is possible but it can not directly edit the AFL. It can write the AFL and I can copy that or download it and load it in my chart but it can not (yet?) directly edit the AFL itself.

I am not sure whether this is something that could be added or that it is technically not possible.

These are some of the replies I got from the LLM:

What I can do:

  • Execute AFL code directly in your AmiBroker instance (afl_execute) โ€” read data, compute values, test logic snippets, debug syntax
  • Run full scans/explorations/backtests (analysis_tool) โ€” e.g. "flag every trail-flip signal and compute stats around it"
  • Pull AFL function reference/docs to get syntax right
  • Access whatever symbol/data is loaded โ€” I confirmed I can read @NQ#, 427k+ bars, so full price/volume history is fair game

What I can't do:

  • See your screen, chart panes, colors, visual layout, drawn objects, or what's currently displayed
  • Know which formula/indicator is attached to which pane unless you tell me or paste the code
  • See mouse position, zoom level, or anything GUI-side

My first question would be: would it be possible (somewhere in the future) that the LLM can see the chart setup and that it is able to for instance open de AFL file of the top chart pane, make changes and save the file?

ok as I am learning I think I can add commands myself in the python file: mcp_my_server_http.py will first play around with it some more before asking my noob questions

so I just uploaded the Python file mcp_my_server_http.py to the LLM and it now tells me it can see the chart and the panes :slight_smile: before it said it could not see it.

2 Likes

Please, ALL tools are documented here:

and it includes chart_get_image, chart_draw_line etc.

So your LLM is mistaken. It can see charts and trendlines drawn.

Properly implemented LLM / MCP client should be able to learn from the MCP what all tools do.

YOU DO NOT need to upload anything to LLM. MCP by itself reports available tools to LLM and proper LLM should be able to use them out of the box without any uploads or instructions.

An MCP (Model Context Protocol) server tells an MCP client what tools are available through the tool discovery mechanism.

At a high level:

  1. Client connects to the MCP server
    • The client establishes an MCP connection, typically over a transport such as stdio or HTTP.
    • They perform the MCP initialization/handshake.
  2. Client asks for available tools
    • The client sends a tools/list request.
  3. Server returns tool definitions
    • The server responds with a list of tools. Each tool definition generally includes:
      • name โ€” unique tool name
      • description โ€” what the tool does
      • inputSchema โ€” JSON Schema describing the arguments

For example, conceptually:

{
  "tools": \[
    {
      "name": "search_files",
      "description": "Search files matching a query",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          }
        },
        "required": \["query"\]
      }
    }
  \]
}
  1. Client makes the tools available to the model

    The MCP client takes these definitions and exposes them to the LLM as callable tools.
    When the model decides to call search_files, the client sends a tools/call request to the MCP server:

{
  "name": "search_files",
  "arguments": {
    "query": "invoice"
  }
}
  1. Server executes and returns the result

    The server performs the operation and sends the result back to the client, which then makes it available to the model.

The important distinction

The MCP server does not directly tell the LLM "here are my tools." It advertises them to the MCP client through tools/list. The client is responsible for exposing those tool definitions to whatever model it is using.

The flow is essentially:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       tools/list        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Model  โ”‚  โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”‚ MCP Client  โ”‚
โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚                                     โ”‚
     โ”‚ tool call                           โ”‚ tools/call
     โ–ผ                                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Model host  โ”‚                      โ”‚ MCP Server  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

In practice, the client may also cache or refresh the tool list and can receive a notification from the server that its available tools have changed, after which it can call tools/list again.

3 Likes

thank for the explanation, yes I asked the LLM about it and the short explanation was:

the AmiBroker tools aren't all loaded into my toolbox by default. They live in a deferred tool registry โ€” I have to call a tool_search function with a keyword query, and only the tools that match get "loaded" and become usable to me.

  1. When you uploaded mcp_my_server_http.py, I could read the actual source and saw chart_get_image, chart_draw_line, etc. defined there.
  2. That prompted me to run tool_search again with better keywords ("chart image draw line current symbol"), which then loaded those tools โ€” and only then could I actually call chart_get_image and get your screenshot.
1 Like

Simply don't trust what AI says to you. AI is giving you BS. Yes AI output is scientifically called BS, see: Hicks, M.T., Humphries, J. & Slater, J. ChatGPT is bullshit. Ethics Inf Technol 26, 38 (2024) . Yes AI is not the source of knowledge. Don't discuss with ME using AI, because I know what I did (because I did that - so called LIVED EXPERIENCE) and AI doesn't.
AI doesn't have a clue. What AI says is irrelevant.

I don't know what model you using but even 12B Gemma 4 (very small model) is able to see and all tools without need to upload anything. Straight out of the box

The video proves it

It is straight Gemma 4 12B local. WITHOUT any system prompting, WITHOUT any uploads. It is aware of all of the tools out of the box.

3 Likes

Great News that Multi System Back testing implementation is starting.

Thanks for your effort on this !

Hi, I'm trying to use the MCP server via LM Studio but am running into an issue with the ICP (?) to AB 7.20 (?). Does anyone have any idea why access is being denied? Many thanks, Peter.

... start cmd "as Administrator" and execute "python C:\Python311\mcpserver\mcp_my_server_http.py" in my env, solved the "access denied" situation.

Next question: chart_get_image does not include my AB Chart totally on my highres notebook ? Is there any additional parameter ? ... the received image is looking proportionally large ?

Tomasz, thank you for your work ! This is really "magic" ... and "spooky" at same time ! I am very curious to see how things develop.

... as in the past, everything is working, just to know where to modify :wink: ...

1 Like
  1. Yes, resolution can be set in the Python code.
  2. The error you are getting is when there is no active symbol or active symbol doesn't have any quotes. You need to actually select the chart and symbol with quotes
  3. My experience with LM Studio built-in MCP client is that it has a bug that prevents images to be processed correctly. Image is generated fine. Everything looks like it works but LLM doesn't see it. I don't know maybe they fixed it but it is still listed as open
    MCP tool ImageContent (base64) not forwarded to the model ยท Issue #1746 ยท lmstudio-ai/lmstudio-bug-tracker ยท GitHub
    and
    API rejects base64 data URI in image_url blocks (OpenAI-compatible endpoint) ยท Issue #1752 ยท lmstudio-ai/lmstudio-bug-tracker ยท GitHub
    The result is that it hallucinates without actually seeing the image. What was working for me is other open-source project Goose https://goose-docs.ai/
    it is an "agent" that talks to LM Studio without relying on LMStudio built-in MCP client and then images work fine.

I second that. There is so much potential here.

2 Likes

Hi everyone, I am truly amazed by what Tomasz has created! I am currently trying to get started with the MCP, but I am finding it a bit difficult to grasp the initial setup. Would anyone be willing to share a step-by-step code example for connecting it to AmiBroker? My coding background in this area is quite limited, so a beginner-friendly guide would be immensely helpful. Thank you in advance for any guidance!

You do not need any coding to install MCP. In my opinion which steps to follow also depend which LLM you use, meaning Grok, ChatGPT etc. (I use one I can not mention on the forum :grinning_face: ). Then the next step would be to explain the LLM you are going to use what you want to do and it will explain to you what you need to do :grinning_face:

I think all the LLM's will require you to install Node.js โ€” Download Node.jsยฎ and then you need this Python file (mcp_my_server_http.py) you can download from here: AmiBroker / MCP Server ยท GitLab Somewhere you need to edit a json file that points to this python file.

Best just ask the steps to follow to the LLM itself that you are going to setup

1 Like

better to integrate the whole thing with VS Code.
Goose desktop is nice, you can get its plugin in VSC too.

For a noob this is way better, then me explaining how i can get it done from command line :smiley:
Similarly, one should start with LM Studio( full gui ) then move to LMS headless.