fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. fxgump
    F
    • Profile
    • Following 0
    • Followers 0
    • Topics 13
    • Posts 39
    • Best 3
    • Controversial 0
    • Groups 0

    fxgump

    @fxgump

    3
    Reputation
    392
    Profile views
    39
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    fxgump Unfollow Follow

    Best posts made by fxgump

    • RE: How to extract the HH part of the candle time?

      Solved. I had ChatGPT write the following code:

      When using ChatGPT or Deepseek to write code, mention that it will be used in fxdreema. These 2 AI robots know fxdreema and know how it works

      // --- Parse all start and end times into total minutes ---

      // Asian
      int aStartHour = StringToInteger(StringSubstr(AsianStartTime, 0, 2));
      int aStartMinute = StringToInteger(StringSubstr(AsianStartTime, 3, 2));
      int aStartTotal = aStartHour * 60 + aStartMinute;

      int aEndHour = StringToInteger(StringSubstr(AsianEndTime, 0, 2));
      int aEndMinute = StringToInteger(StringSubstr(AsianEndTime, 3, 2));
      int aEndTotal = aEndHour * 60 + aEndMinute;

      // Europe
      int eStartHour = StringToInteger(StringSubstr(EuropeStartTime, 0, 2));
      int eStartMinute = StringToInteger(StringSubstr(EuropeStartTime, 3, 2));
      int eStartTotal = eStartHour * 60 + eStartMinute;

      int eEndHour = StringToInteger(StringSubstr(EuropeEndTime, 0, 2));
      int eEndMinute = StringToInteger(StringSubstr(EuropeEndTime, 3, 2));
      int eEndTotal = eEndHour * 60 + eEndMinute;

      // NY
      int nStartHour = StringToInteger(StringSubstr(NYStartTime, 0, 2));
      int nStartMinute = StringToInteger(StringSubstr(NYStartTime, 3, 2));
      int nStartTotal = nStartHour * 60 + nStartMinute;

      int nEndHour = StringToInteger(StringSubstr(NYEndTime, 0, 2));
      int nEndMinute = StringToInteger(StringSubstr(NYEndTime, 3, 2));
      int nEndTotal = nEndHour * 60 + nEndMinute;

      // --- Get the candle time in total minutes ---
      datetime candleTime = iTime(Symbol(), tf, candle_id);
      int candleHour = TimeHour(candleTime);
      int candleMinute = TimeMinute(candleTime);
      int candleTotalMinutes = candleHour * 60 + candleMinute;

      // --- Check all three session windows ---
      bool inAsian = (candleTotalMinutes >= aStartTotal && candleTotalMinutes < aEndTotal);
      bool inEurope = (candleTotalMinutes >= eStartTotal && candleTotalMinutes < eEndTotal);
      bool inNY = (candleTotalMinutes >= nStartTotal && candleTotalMinutes < nEndTotal);

      // --- Final decision ---
      if (inAsian || inEurope || inNY) {
      Output = 1;
      } else {
      Output = 0;
      }

      posted in Questions & Answers
      F
      fxgump
    • RE: Problem with the heiken ashi indicator?

      OK sorry.
      I could just figure out the problem: the HA indicator in my MT4 platform was corrupted. I copied an instance from another MT4 instance and it now works fine.

      Thanks Jstap for trying to help. Your kind help from the other side of the planet is highly appreciated

      posted in General Discussions
      F
      fxgump
    • RE: Problem with enum list

      Thanks L'andorra.

      I solved the problem by changing the entries as follows:

      image.png

      posted in Questions & Answers
      F
      fxgump

    Latest posts made by fxgump

    • RE: Problem with enum list

      Thanks L'andorra.

      I solved the problem by changing the entries as follows:

      image.png

      posted in Questions & Answers
      F
      fxgump
    • Problem with enum list

      Hi all,

      I am trying to create two enum list with identical dropdown list but it is not compiling

      14237bb8-437a-4338-be66-fbd1b6417a0f-image.png

      0933fd7b-4dd1-47a8-8600-e6b2f58b4c14-image.png

      https://fxdreema.com/shared/uQSDs1nAc

      Any idea what I did wrong?

      Thanks in advance for your help

      posted in Questions & Answers
      F
      fxgump
    • RE: Timeframe as input

      Thank you jstap!

      posted in Questions & Answers
      F
      fxgump
    • RE: How to extract the HH part of the candle time?

      Solved. I had ChatGPT write the following code:

      When using ChatGPT or Deepseek to write code, mention that it will be used in fxdreema. These 2 AI robots know fxdreema and know how it works

      // --- Parse all start and end times into total minutes ---

      // Asian
      int aStartHour = StringToInteger(StringSubstr(AsianStartTime, 0, 2));
      int aStartMinute = StringToInteger(StringSubstr(AsianStartTime, 3, 2));
      int aStartTotal = aStartHour * 60 + aStartMinute;

      int aEndHour = StringToInteger(StringSubstr(AsianEndTime, 0, 2));
      int aEndMinute = StringToInteger(StringSubstr(AsianEndTime, 3, 2));
      int aEndTotal = aEndHour * 60 + aEndMinute;

      // Europe
      int eStartHour = StringToInteger(StringSubstr(EuropeStartTime, 0, 2));
      int eStartMinute = StringToInteger(StringSubstr(EuropeStartTime, 3, 2));
      int eStartTotal = eStartHour * 60 + eStartMinute;

      int eEndHour = StringToInteger(StringSubstr(EuropeEndTime, 0, 2));
      int eEndMinute = StringToInteger(StringSubstr(EuropeEndTime, 3, 2));
      int eEndTotal = eEndHour * 60 + eEndMinute;

      // NY
      int nStartHour = StringToInteger(StringSubstr(NYStartTime, 0, 2));
      int nStartMinute = StringToInteger(StringSubstr(NYStartTime, 3, 2));
      int nStartTotal = nStartHour * 60 + nStartMinute;

      int nEndHour = StringToInteger(StringSubstr(NYEndTime, 0, 2));
      int nEndMinute = StringToInteger(StringSubstr(NYEndTime, 3, 2));
      int nEndTotal = nEndHour * 60 + nEndMinute;

      // --- Get the candle time in total minutes ---
      datetime candleTime = iTime(Symbol(), tf, candle_id);
      int candleHour = TimeHour(candleTime);
      int candleMinute = TimeMinute(candleTime);
      int candleTotalMinutes = candleHour * 60 + candleMinute;

      // --- Check all three session windows ---
      bool inAsian = (candleTotalMinutes >= aStartTotal && candleTotalMinutes < aEndTotal);
      bool inEurope = (candleTotalMinutes >= eStartTotal && candleTotalMinutes < eEndTotal);
      bool inNY = (candleTotalMinutes >= nStartTotal && candleTotalMinutes < nEndTotal);

      // --- Final decision ---
      if (inAsian || inEurope || inNY) {
      Output = 1;
      } else {
      Output = 0;
      }

      posted in Questions & Answers
      F
      fxgump
    • How to extract the HH part of the candle time?

      I am trying to extract the HH part of the candle time so as to compare it to a fixed value. Can this be done?

      I tried the following but it doesn't work

      d8f1d65b-ee22-479e-a73f-6707e6b3dd0f-image.png

      NB: using the time filter block doesn't work as I want to check candle of previous days

      posted in Questions & Answers
      F
      fxgump
    • RE: Timeframe as input

      @fxDreema said in Timeframe as input:

      NUM_TIMEFRAMES

      And for a variable that is a timeframe, what should the data type be?

      posted in Questions & Answers
      F
      fxgump
    • Array of strings in the input tab

      Hi

      I am trying to create a drop down menu in the input tab of an EA.

      I copy-pasted what I found on https://fxdreema.com/forum/topic/19905/input-variables

      9de1f066-9101-41aa-aec0-701667cf4477-image.png

      However, I got compilation error: 'value13' - invalid array access

      What is wrong?

      https://fxdreema.com/shared/q0n3fMr6e

      posted in Questions & Answers
      F
      fxgump
    • RE: How to edit variables in the inputs tab?

      Is it possible to define colors in the input tab? How can this be done?

      image.png

      posted in Questions & Answers
      F
      fxgump
    • RE: How to edit variables in the inputs tab?

      Thanks Jstap. This works!

      posted in Questions & Answers
      F
      fxgump
    • How to edit variables in the inputs tab?

      Hi,

      I would like to figure out how to edit the items in the variable column on the inputs tab.

      For example, how can I have "Time frame" instead of "inp132_ObjName"

      Can anybody help?

      4bace8e0-51b1-4a8a-89a8-7f1c7bab2354-image.png

      posted in Questions & Answers
      F
      fxgump