fxDreema

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

    btrader

    @btrader

    0
    Reputation
    226
    Profile views
    17
    Posts
    1
    Followers
    0
    Following
    Joined Last Online

    btrader Unfollow Follow

    Latest posts made by btrader

    • RE: Close partially by amount of money

      @jstap I can get the trade value of open trades and the value of the last closed trades. But how do I work out how much lot size to close.
      e.g. I go 0.5 long, then 0.5 short.
      The short trade closes out at say $100 in profit and the long trade is $150 in drawdown. I want to close out $80 of the trade in drawdown so I bank $20. How would you work out how much of the 0.50 lots to close out on the position in drawdown?

      posted in Questions & Answers
      B
      btrader
    • RE: Close partially by amount of money

      Would also like to know how to do this. Anyone know a way to do the calculation?

      posted in Questions & Answers
      B
      btrader
    • Zero Divide Error With Brokers Using 1 Lot Minimum

      Hi,

      I have an EA which I built to trade stock indices and it works fine on all my normal brokers I use but there is one broker who forces you to use 1 lot increments and the EA just gives a 0 divide error. I've tested the EA on their FX pairs (allowing 0.01s) and it works fine so have narrowed it down to the fact they only allow 1.00 lots on the indices.

      The error is thrown up in this line in the code generated by FXDreema:

      size=MathRound(size/LotStep)*LotStep;

      I assume thats to do with the lotstep but having searched through the forum for this Zero Divide error I can't find any solution that seems to work. Have a tried a few.

      The EA doesn't use a stop loss and I even have it set to trade fixed lots and even when I set the lot size to 1 it still throws up the error.

      Anyone have any ideas on a fix?

      posted in Questions & Answers
      B
      btrader
    • RE: Custom Code Conversion MT4 to MT5

      @tipsywisdom That code makes the buttons work in the tester. It's a conversion from an MT4 EA built in FXDreema using the convertor to MT5. You didnt read the bloody post I posted did you. Suspect you are new 😉

      posted in Questions & Answers
      B
      btrader
    • RE: Custom Code Conversion MT4 to MT5

      Same error for each of the buttons.
      0_1646818551339_37c2cb05-ec21-462f-8083-01747786b3b0-image.png

      posted in Questions & Answers
      B
      btrader
    • Custom Code Conversion MT4 to MT5

      I have just converted an MT4 project to MT5 using the convertor and all fine apart from some custom code I have to set button states after pressed in the tester.

      I've used it in the MT4 version of an EA I'm building and it works perfectly.
      Just converted my creation to MT5 and I get a compile error on all these blocks.

      What would be the MT5 version of this code?
      ObjectSet(LoadedObjectName(),OBJPROP_STATE,0);

      The code is from this thread but think it's buried so deep people didnt see my question. 🙂
      https://fxdreema.com/forum/topic/9883/working-buttons-in-strategytester
      Any help much appreciated.

      posted in Questions & Answers
      B
      btrader
    • RE: Working Buttons in StrategyTester

      I have a question on this custom code for the buttons in the tester which sets the state after it's pressed.
      I've used it in the MT4 version of an EA I'm building and it works perfectly.
      Just converted my creation to MT5 and I get a compile error on all these blocks on the buttons.

      What would be the MT5 version of this code?
      ObjectSet(LoadedObjectName(),OBJPROP_STATE,0);

      posted in Tutorials by Users
      B
      btrader
    • RE: Calculating ADR in pips Wrong for JPY Pairs

      Anyone coming across this in the future I found the solution.
      Searched for this but couldnt find it and stumbled across it while reading tutorials. 🙂
      https://fxdreema.com/forum/topic/11003/atr-value-to-pips-tutorial/2
      Handles JPY calculations perfectly.

      posted in Questions & Answers
      B
      btrader
    • RE: Calculating ADR in pips Wrong for JPY Pairs

      @roar So how would I implement that in the project?
      https://fxdreema.com/shared/xZfhyTE4e
      The modify variables there saves the ADR as a pip amount. Not sure how to use your formula, not a coder and just working visually with the system. 🙂

      posted in Questions & Answers
      B
      btrader
    • RE: Calculating ADR in pips Wrong for JPY Pairs

      @roar I need an inpu to set a target which is an amount of pips but based off ADR.
      i.e. half the ADR10 value if 50 would be 25.

      posted in Questions & Answers
      B
      btrader