Announcement:
  • If you need to open an account, you can contact customer service to guide the operation.
  • Customer service WeChat: Jin-DaoCheng
    1. Home > Foreign Exchange School

    Introduction to Forex EA Programming [Lesson 10]: You can create endless strategies

    The human mind is infinite, and it is constantly improving. When you learn to write ea, your "Brain" keeps turning, and you find again................................................... What do you want..................... Endless...............

    Add this condition to your eaIsDemo, which can avoid human error and put immature ea to play real games.

    When you add this condition to the ea, the ea can only be run on a demo account

    Write the result: datetime limit one column bet once = 0;//custom double bet quantity = 0.1;//custom double stop loss = 200;//custom double take profit = 200;//custom double take profit = 200;//custom

    int start(){

    If (OrdersTotal () == 0 & & Close [0] Open [0] & & Limit one bet per column! = Time [0] & & IsDemo ()) {OrderSend (Symbol (), OP_BUY, Bet Quantity, Ask, 3, Ask- Stop Loss * Point, Ask + Take Profit * Point, "macd sample", 16384,0, Green); Limit one bet per column = Time [0];}

    If (OrdersTotal () == 0 & & Close [0] & & Limit one bet per column! = Time [0] & & IsDemo ()

    ) {OrderSend (Symbol (), OP_SELL, Bet Quantity, Bid, 3, Bid + Stop Loss * Point, Bid- Take Profit * Point, "macd sample", 16384,0, Red); limit one column to one bet = Time [0];}

    return(0);}

    Click to inquire about transaction account opening

    Please indicate the source: https://www.daoctech.com/fxschool/1958.html

    Disclaimer: The content of this article does not represent the views of the Institute of Foreign Exchange. The content is for reference only and does not constitute investment advice. Investors operate accordingly at their own risk.