How to Use Block Code: A Step-by-Step Tutorial





Quick Introduction to Block Code

Block Code is a beginner-friendly no-code/low-code platform that lets you build scripts and applications visually—without writing a single line of code. Using a drag-and-drop interface, you assemble logical blocks to define your program flow. It’s like building with LEGO bricks: intuitive, fun, and powerful. Once your block sequence is ready, the system automatically translates it into real source code in your chosen programming language.



Select Your Programming Language

At the top of the page, use the language selector to choose among supported languages like MQL4, JavaScript, Python, Java, C#, PHP, and others. The block library will refresh to show only blocks compatible with your selected language.




Searching and Selecting Blocks

The left panel lists all available blocks for your chosen language. Scroll through categories or use the search box to filter by keyword. Each block shows its name and a short description. Right-click on a block for detailed info, including required variables.




Voting for Block Relevance

Help the community by rating blocks on a 6‑star scale (1 = 0/5, …, 6 = 5/5). Blocks with higher average ratings float to the top, making it easier for others to find the most useful elements.




Drag and Drop Blocks

Drag a block from the left panel into the workspace on the right. Blocks snap together to define the flow. You can rearrange, remove, or nest blocks as needed. The interface supports intuitive drag handles and snap guides.



Tip: Start small—add one block at a time and test your logic before building complex flows.



Configuring Block Variables

Each block may require specific variables (inputs) to operate. Click a block in the workspace to open its configuration panel. Fill in fields like numbers, text, or dropdowns. Hover tooltips often provide guidance or default values.



Note: Properly configured variables ensure your generated code runs without errors. Always check for missing inputs before compiling.



Compile Your Project

Click the Compile button below the workspace. The platform translates your block design into source code, checks for missing inputs or errors, and prepares the file for download.




Download the Generated File

After compiling, click the provided link to download your source file. The filename reflects your project name and language extension (e.g., .mq4, .js, .py).




Install in Your Environment

For languages requiring a specific runtime or IDE, follow standard installation steps. For example, to use an MQL4 EA, place the .mq4 file in MetaTrader’s Experts folder and refresh. For JavaScript, run with Node.js or in a web page. For Python, import and execute with your interpreter.




Bonus: Add Custom Blocks

Extend Block Code by creating your own blocks. Navigate to the “Add New Block” page, define block metadata, write template code snippets, and declare variables. Once saved, custom blocks appear alongside built-ins.



Advanced: Custom blocks unlock full flexibility—mix no-code ease with hand-written logic.


That’s it! You’re now ready to build multi-language projects visually with Block Code. Happy coding!


Any bugs? Report them to contact@cp-corporation.fr.