Home Forums MachinaTrader Official Content Zone Simple Strategy with Parameters, Log, Plot and Trade Sample

  • Simple Strategy with Parameters, Log, Plot and Trade Sample

     Steve updated 11 months, 3 weeks ago 1 Member · 1 Post
  • Steve

    Administrator
    2020-02-04 at 12:20 am

    When it comes to writing your first strategy, starting by a Simple Strategy is probably a good choice.

    You don’t have to worry too much about dealing with the Exchange and managing orders and you can focus on the trading logic.

    The only thing a Simple Strategy needs to do is emitting a signal each time it received a new Candle (through the onTick method): either a BUY, SELL or HOLD signal.

    Have a look at the Basic Strategy in the Knowledge base:

    You can use it as a boilerplate for writing your first strategies since it includes a few parameters, shows how to log in the output console, performs some calculation using talib, renders on the chart and return a signal to MachinaTrader.

    All of the above in about 50 lines of codes which should enable you to get familiar with the scripting environment!

Log in to reply.

Original Post
0 of 0 posts June 2018
Now