Tutorial 165 | Creating to a button to stop a strategy making trades

3 years ago
10

Tutorial 165 looks at how a strategy can be paused without changing the status of a strategy applied to real-time bars on a chart. In this tutorial the demo strategy is paused from generating trades by the click of a button.

The simple 'dummy' strategy in the tutorial generates market orders based on a counter. A condition for an order to take place is when the Boolean variable 'Trade' is set to TRUE. The Boolean variable is switched between true and false by clicking a button.

The tutorial demonstrates how to create a simple form and button. It also shows how to create and use a button click event. The form and button are initially created using the 'Add Form' capability and then using the visual design tools. Once the code is created it is copied from the 'Designer Generated Code' area into a strategy. The form is then deleted from the 'Resource View.'

See https://markplex.com/free-tutorials/tutorial-165-creating-to-a-button-to-stop-a-strategy-making-trades/

Loading comments...