fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. coolazice
    3. Posts
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 9
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by coolazice

    • Summation of array elements

      Hi, I am looking for help with writing a small custom code to sum some elements (about 25 to 35 elements) of an array with 100 elements.

      I tried the following code but it did not work and I don't know what else to do.
      for (int iArray = ArraySize(array) - 1; iArray >= 0; iArray--) summation += array[iArray];

      The only other choice I have is to sum them manually, that is, sum=var1+var2+...var35. This will work but is clumsy and I can only modify the calculation manually.

      Please help, thanks.

      posted in Questions & Answers
      C
      coolazice
    • RE: Multidimensional Arrays

      @l-andorrà Hi, this is what I am trying to achieve, the link you referenced me to did not help me much. Can you give me an idea on how I can fill the following two arrays (both one dimensional).

      VAR X is the input to the first index of array one and the first index of array two is the input to the second index of array one and so on and so forth as shown.

      I also want to be able to expand the array size from 5 to 10 or any other number if need be. Thanks

      Array description.jpg

      posted in Questions & Answers
      C
      coolazice
    • RE: Multidimensional Arrays

      Can you give me an idea on how I can fill the following two arrays (both one dimensional).

      VAR X is the input to the first index of array one and the first index of array two is the input to the second index of array one and so on and so forth as shown.

      I also want to be able to expand the array size from 5 to 10 or any other number if need be. Thanks

      Array description.jpg

      posted in Questions & Answers
      C
      coolazice
    • RE: Multidimensional Arrays

      Array description.jpg

      posted in Questions & Answers
      C
      coolazice
    • RE: Multidimensional Arrays

      Hi,

      I am looking to create a simple one-dimensional array that holds the current price of a pair when a condition is met and then repeats the cycle continuously for as long as the EA runs.

      The array size can be modified by specifying it as an input when needed and every new price occupies the first array cell while moving the older prices back.

      How do I reference the cell that I need for calculations in the EA. Please help me with this inquiry and make as clear as possible with example(s) if you can, thanks.

      Illustration with a 5 cell array:
      Cell 1 Cell 2 Cell 3 Cell 4 Cell 5
      After first 30 seconds Price 1 0 0 0 0
      After second 30 seconds Price 2 Price 1 0 0 0
      After third 30 seconds Price 3 Price 2 Price 1 0 0
      After fourth 30 seconds Price 4 Price 3 Price 2 Price 1 0
      After fifth 30 seconds Price 5 Price 4 Price 3 Price 2 Price 1

      After sixth 30 seconds Price 6 Price 5 Price 4 Price 3 Price 2
      After seventh 30 seconds Price 7 Price 6 Price 5 Price 4 Price 3
      After eighth 30 seconds Price 8 Price 7 Price 6 Price 5 Price 4
      After ninth 30 seconds Price 9 Price 8 Price 7 Price 6 Price 5
      After tenth 30 seconds Price 10 Price 9 Price 8 Price 7 Price 6

      And so on and so forth...

      posted in Questions & Answers
      C
      coolazice
    • RE: On Timer: What is the difference?

      @l-andorrà Thanks for your response, you are right in your conclusions regarding the 'on Timer' tab. However, I am still looking for a solution that will capture the price at 15 minute intervals and would like to know if you have used the second condition block pictured below, I am hoping it can do the job.

      0_1601436651892_Condition 2.jpg

      0_1601436671793_Condition 2'.jpg

      I want the block to pass on the condition that “MathMod( Var1, Var2 ) = 0” is True. Do you have an idea on how I can write this condition for this purpose?

      posted in Questions & Answers
      C
      coolazice
    • RE: On Timer: What is the difference?

      @l-andorrà Thanks, I already implemented what you suggested but I'm not getting anything. I am not sure if it's because the markets are closed right now and it cannot work on the tester environment but we'll see when the markets open tomorrow night.

      Meanwhile, I am open to suggestions from anyone else reading this who can help and the question is; how do I capture the price value of a currency pair every 15 minutes on a 4 hour chart with fxdreema. Thank you

      posted in Questions & Answers
      C
      coolazice
    • RE: On Timer: What is the difference?

      Thank you for your response. I am Just looking for a way to capture the price every 15 minutes and was wondering if it would help. Previously, I used the logic of counting up the time in seconds and diving by 15 minutes (900 sec, see figure below) and if the answer gives an integer value it prompts the logic to take the value of current price. However, I can't quite figure out how to figure out if the quotient is an integer or not on "on Tick", see why I'm asking? Do you have a way I can capture price every 15 minutes on a 4 hour chart?

      0_1601053382332_Time count.jpg

      posted in Questions & Answers
      C
      coolazice
    • On Timer: What is the difference?

      Please I am curious to know the difference between the 'period for the "on timer" event' that shows under the 'project option' tab and the "on Timer" event which gives you the option of specifying hours, minutes and seconds.

      In both cases, how do they work and what are they used for? I'd appreciate answers with an example or two please. Thanks

      First instance,
      0_1601018615550_Inkedon timer 1_LI.jpg

      Second instance,
      0_1601018900946_Inkedon timer 2_LI.jpg

      posted in Questions & Answers
      C
      coolazice
    • 1 / 1