fxDreema

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

    How can Implement the following logic in FXdreema

    Questions & Answers
    3
    4
    753
    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.
    • J
      JayPapa123 last edited by

      Please can anyone explain how I can write the codes that meet certain conditions written below?
      First, I have to input certain parameters; the currency pair and a particular time. As an example: EURUSD and 9 AM EST.
      Next, I have to define constants; PipBlock=10 (i.e 10 pips), DAYCounter=30 (i.e 30 trading days), PassCounter=0, FailCounter=0. 30 minutes candlestick chart is used. The program always starts at the 9 AM EST candle every trading day and analyzes for the past 30 tradings days.

      It is important to know the meaning of the alphabet used in the trading scenarios below. The H means the high price of the current candle, O means the opening price of the first/initial candle, L means the low price of the current candle.

      NOTE: If is analyzing any candle, It should retain the "Open" value of the initial candle(i.e if the 9 AM Open candle value is 1.1250 when analyzing the 2 PM EST candle, the program replaces the open value of that 2 PM EST candle with 1.1250 for the calculations). However, the High and Low values of any candle would not be replaced by the high/low of the initial candle values.

      Now the logic for the trade has 4 possible scenarios:

       if (H-O>PipBlock and O-L<PipBlock)
      {PassCounter=PasCounter+1;}
      #Then move to the next trading day
      

      Explanation: The above is scenario 1, and it starts with the 9 AM candle. Then moves to the next 9 AM candle on the next day.

       if (H-O<PipBlock and O-L<PipBlock)
      #Move to the next candle, on the same trading day
      

      Explanation: The Above is scenario 2, start with the 9 AM candle, then move to the 9:30 AM candle.

       if (H-O<PipBlock and O-L>PipBlock)
       #Move to the next candle, on the same trading day
      

      Explanation: The Above is scenario 3, start with the 9 AM candle, then move to the 9:30 AM candle.

       if (H-O>PipBlock and O-L>PipBlock)
       #Move to the next candle, on the same trading day
      

      Explanation: The Above is scenario 4, start with the 9 AM candle, then move to the 9:30 AM candle.

      NOTE:
      If any of scenario 2, 3, or 4 occurs first and secondly scenario 2 keeps occurring
      the program would keep moving from candle to candle(i.e 9 AM, 9:30 AM, 10
      AM, 10:30 AM e.t.c) until the end of the trading day 9 PM EST then
      FailCounter=FailCounter+1 and the analysis ends for that trading day and moves
      to another trading day.

      However, if scenario 3 or 4 occurs again at any time given that the first candle was any of scenarios 2, 3, or 4, then end the analysis immediately for that trading day and FailCounter=FailCounter+1, and move to another trading day.

      If scenario 1 occurs at any time given that the first candle was any of scenarios 2, 3, or 4, then end the analysis immediately for that trading day and PassCounter=PassCounter+1, and move to another trading day.

      Since DAYCounter is 30 days, once the program ends the analysis for a trading day, it would check for the same scenarios on another trading day. The program would keep doing this until the last 30 trading days are analyzed.
      Finally after the 30 days analysis, Print the FailCounter and PassCounter values for that particular currency over the last 30 days.

      l'andorrà XYON126 2 Replies Last reply Reply Quote 0
      • l'andorrà
        l'andorrà @JayPapa123 last edited by

        @jaypapa123 This is a very ambitious project to implement. Certainly not a trivial to build with fxDreema. Do you have any initial EA built so far to begin with?

        (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.

        J 1 Reply Last reply Reply Quote 1
        • J
          JayPapa123 @l'andorrà last edited by

          @l-andorrà Yes, I have built some EA before with FXdreema. However, it was nothing complex.

          1 Reply Last reply Reply Quote 0
          • XYON126
            XYON126 @JayPapa123 last edited by

            @jaypapa123 Hi @jaypapa123! I have looked at your post and what you have commented is possible with a command called MYSQL that is specific to enter mql4 or mql5 code depending on the type of EA you do, but for my humble knowledge of mql4 (since I have passed the fxDreema to mql4, they are lighter and respond without errors like those of fxDreema) you are missing code in your mql expressions unless you already have a structure in fxDreema made but without seeing what you have raised in fxDreema it can hardly help you more, you could Hang what you have of fxDremma (not photo, link) seeing the structure and the code fragments will be able to help you more.

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

            Online Users

            A
            K
            H
            N
            T
            K
            F
            E

            17
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors