fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. pontedruse
    3. Best
    P
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 33
    • Best 3
    • Controversial 0
    • Groups 0

    Best posts made by pontedruse

    • RE: @roar, Sell ​​now and Buy now with% of Balance or% of Equity but with minimum lot. (Solved)

      @xyon126 Try this code: https://fxdreema.com/shared/OaBJphFqd

      However, in order to use it you have to create a variable that you will call: LOT which you will initialize with 0 (zero), and which you will put in place of the buy and sell lots in the market. And also you will have to create 2 constants, 1 you will call it: PERCENTAGE, and you will put the percentage% of Equity you want to put into play,(to calculate 1% you will have to write 0.01 while to calculate 10% you will have to write 0.1). And the other you will call it: MINIMUM_LOT, and inside you will put the value 0.02 that is the minimum of the lot beyond which you must not go down. I hope I was clear.

      posted in Questions & Answers
      P
      pontedruse
    • RE: @roar, Sell ​​now and Buy now with% of Balance or% of Equity but with minimum lot. (Solved)

      @xyon126 If you want to get the percentage as you say you have to change it in this way: (AccountEquity () * PERCENTAGE / 10000000);

      As for the 2 blocks located on init, you can very well delete them because they are not needed, I just forgot to delete them.

      posted in Questions & Answers
      P
      pontedruse
    • RE: @roar, Sell ​​now and Buy now with% of Balance or% of Equity but with minimum lot. (Solved)

      @xyon126 Hi if you only want 0.5 % of capital, you have to multiply the capital by 0.005.

      If, on the other hand, you want the capital + 0.5 % you have to multiply the Capital by 1.005

      But you have to keep in mind that if you use that modified formula I gave you last time: (AccountEquity () * PERCENTAGE / 10000000); for equity, and which can also be used very well for balance making it become like this: (AccountBalance () * PERCENTAGE / 10000000);

      0.005 becomes 0.5 and 1.005 becomes 100.5

      I hope I was clear 🙂

      posted in Questions & Answers
      P
      pontedruse
    • 1 / 1