fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. simharr
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 5
    • Best 1
    • Controversial 0
    • Groups 0

    simharr

    @simharr

    1
    Reputation
    239
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    simharr Unfollow Follow

    Best posts made by simharr

    • RE: Testing out Swap, can't get it to work

      After restarting the computer the problem went away, and now it all works fine. Odd, but as long as it works 🙂 Thanks for the help 🙂

      posted in Questions & Answers
      S
      simharr

    Latest posts made by simharr

    • RE: Finding buffer in source code of indicator

      Not being a programmer, I couldnt get this to work.

      Seems that the person who programmed this went a totally different route than the one suggested here. He did this:

      //--- indicator buffers mapping
      SetIndexBuffer(0,baro,INDICATOR_DATA);
      SetIndexBuffer(1,barh,INDICATOR_DATA);
      SetIndexBuffer(2,barl,INDICATOR_DATA);
      SetIndexBuffer(3,barc,INDICATOR_DATA);
      SetIndexBuffer(4,barcl,INDICATOR_COLOR_INDEX);
      SetIndexBuffer(5,cano,INDICATOR_DATA);
      SetIndexBuffer(6,canh,INDICATOR_DATA);
      SetIndexBuffer(7,canl,INDICATOR_DATA);
      SetIndexBuffer(8,canc,INDICATOR_DATA);
      SetIndexBuffer(9,cancl,INDICATOR_COLOR_INDEX);
      SetIndexBuffer(10,line,INDICATOR_DATA);
      SetIndexBuffer(11,linecl,INDICATOR_COLOR_INDEX);
      //---

      So if I change #property indicator_buffers 12 to 3, it will mess up the above code for 12 (0-11) internal buffers, of which 3 are shown?

      posted in Questions & Answers
      S
      simharr
    • Finding buffer in source code of indicator

      Hi

      I have done a trace on an indicator, but that returns "EMPTY_VALUE (BUFFER 0)" error messages for the 3 buffers.

      The indicator works in mt5 both on live and backtesting charts. It also seems to work in fxdreema, in that it recognizes both input and the 3 buffer values in the source code.

      But for some reason it registers the 3 values as empty. Buffer 0 and 1 are for painting the candles, and buffer 2 are for plotting a line. Perhaps this is the reason behind the empty values?

      I looked through the tutorial and it states that "property" indicates where the buffers are located in the program code (source code), so I copy pasted that part of the source code below, hope it is the right place to find the error in the buffers 🙂 As can be seen in the code, the indicator have only 3 buffers, which fxdreema finds seemingly correctly.

      Hope you can help

      The code:
      #property indicator_chart_window
      #property indicator_buffers 12
      #property indicator_plots 3
      #property indicator_label1 "Trend bars"
      #property indicator_type1 DRAW_COLOR_BARS
      #property indicator_color1 clrDarkGray,clrDeepSkyBlue,clrSandyBrown
      #property indicator_label2 "Trend candles"
      #property indicator_type2 DRAW_COLOR_CANDLES
      #property indicator_color2 clrDarkGray,clrDeepSkyBlue,clrSandyBrown
      #property indicator_label3 "Trend line"
      #property indicator_type3 DRAW_COLOR_LINE
      #property indicator_color3 clrDarkGray,clrDeepSkyBlue,clrSandyBrown
      #property indicator_style3 STYLE_DOT

      posted in Questions & Answers
      S
      simharr
    • RE: Testing out Swap, can't get it to work

      After restarting the computer the problem went away, and now it all works fine. Odd, but as long as it works 🙂 Thanks for the help 🙂

      posted in Questions & Answers
      S
      simharr
    • RE: Testing out Swap, can't get it to work

      I tried to get your test to work, but it didnt. However I figured out how to share the project. SwapTest

      I checked, and all swap data is kept in double format.

      posted in Questions & Answers
      S
      simharr
    • Testing out Swap, can't get it to work

      Hi

      I am testing out swap in mt5, just made a very simple strategy that opens a trade when swap is positive and closes trades when swap <=0.

      I made the strategy put the value of the swap in the journal during tests. Problem is, swap is always registered as being = 0.

      To get swap I use:

      SwapLong = SymbolInfoDouble("AUDJPY",SYMBOL_SWAP_LONG);

      Where SwapLong is the variable holding the value found.

      Btw, is there any way to have it use current pair instead of a specific defined pair as above?

      0_1570854244683_SwapTest.ex5

      posted in Questions & Answers
      S
      simharr