fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Help Needed: Spread Trading Bot for Correlated Pairs in FXDreema/MT5

    Questions & Answers
    2
    2
    72
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MarekFleisi last edited by MarekFleisi

      Task: Create a Spread Trading Bot Using Two Correlated Pairs (e.g., EURJPY and USDJPY)

      I would like to request help with building a bot that trades the spread between two correlated forex pairs, such as EURJPY and USDJPY.

      Requirements:
      Constants:
      Symbol_1: First symbol (e.g., EURJPY).
      Symbol_2: Second symbol (e.g., USDJPY).
      LotSize: The lot size for trades.
      MovingAveragePeriod: Period for the moving average (e.g., 100).
      Variables:
      Spread: The spread between Symbol_1 and Symbol_2, calculated as Symbol_1 price - Symbol_2 price.
      AvgSpread: The moving average of the spread over the last MovingAveragePeriod (e.g., 100 closing prices).
      Entry Conditions:
      Buy Symbol_1 / Sell Symbol_2: When the spread (Symbol_1 price - Symbol_2 price) is greater than the average spread (AvgSpread) over the last 100 periods.
      Close Existing Positions and Reverse: If the spread between Symbol_1 and Symbol_2 drops below the average spread (AvgSpread), close the existing positions and Sell Symbol_1 / Buy Symbol_2.
      Example:
      If EURJPY - USDJPY (spread) is greater than the moving average of the spread over the last 100 periods, the bot should:
      Buy EURJPY and Sell USDJPY.
      If the spread falls below the moving average, the bot should:
      Close the current positions and Sell EURJPY and Buy USDJPY.
      Customizable Inputs:
      Ability to change Symbol_1, Symbol_2, Lot Size, and Moving Average Period in the constants section.

      Would anyone be able to help me with setting this up in FXDreema or MetaTrader 5?

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • l'andorrà
        l'andorrà last edited by

        I can help if you are also doing your part. 😉 Did you create any initial version?

        (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

        (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

        (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        Online Users

        A
        R
        E

        10
        Online

        146.9k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors