Loading...
 

Scripting

 

This section covers several tutorials on programming the following components in AgenaTrader:

 

Scripting environment

AgenaTrader's programming environment (script) is similar to that of Visual Studio, and allows you to:

  1. navigate the programming workspace using toolbars,
  2. handle multiple components at the same time via the editor (top tab bar),
  3. use the IntelliSense® functionality,
  4. view a list of errors at the bottom of the screen.

Scripting1  

Scripting toolbar

Icon Function
Loads existing self-programmed indicators/strategies to the workspace
Saves source code changes
Cuts marked source code
Copies marked source code
Pastes copied / cut source code
Enables comments on marked source code parts
Uncomments the selected lines
Cancels previous action(s)
Repeats cancelled action(s)
Opens output window
Opens reference popup
Compiles sources
Searches for a text within source code
Find/Replace
Opens list of errors
Deletes file

 

Visual Studio


AgenaTrader 2.0 used the .NET Framework 4.6. In addition please use Visual Studio version 2017. Microsoft offers a free version called Visual Studio 2017 Community Edition, which is pretty good to develop AgenaScript code.
Download Visual Studio 2017 Community Edition.

Arz  This article was created by http://script-trading.com.

 

AgenaTrader and Visual Studio


AgenaTrader offers its very own script editor that can be used for AgenaScript development.

MyIndicator  


This editor is a useful tool when it comes to quickly changing a couple of lines of code, or if you just want to look at an AgenaScript.
For all other applications, it is essential that you use Microsoft’s development environment Visual Studio. It offers a comprehensive solution that has proven itself time and again for almost all areas of software development, including of course for AgenaScript as well as for C#.

The most important advantages are:

  • Debugging
  • Code Completion
  • Syntax checking


In addition, there is a multitude of further features that make developing easier for you.

You can download the free “Visual Studio Community” edition at https://www.visualstudio.com/downloads. Please note that the download and the installation of the software take about 60 minutes!

From AgenaTrader 2.0 onwards, you need to use at least “Visual Studio Community 2017” due to the .NET version 4.6 that is implemented!

Once you have successfully installed Visual Studio, you can link it to AgenaTrader using the Configuration Escort setting shown below. From now on, all AgenaScript files will automatically be opened with Visual Studio, and the debugger will also automatically be linked to AgenaTrader.

Configuration Escort setting for Visual Studio

Configuration  

You can now conveniently develop, test and debug your AgenaScripts in Visual Studio.

MyIndicatorVS  



Arz  This article was created by http://script-trading.com.

Search AgenaTrader Wiki

Switch Language