fxDreema

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

    willramsey

    @willramsey

    I like to build and test different strategies for myself or others.

    4
    Reputation
    13
    Profile views
    42
    Posts
    1
    Followers
    0
    Following
    Joined Last Online
    Location United States Age 29

    willramsey Unfollow Follow

    Best posts made by willramsey

    • RE: Buttons don't work during backtesting

      @bagheria For backtests, there is a "If Testing" block. Unfortunately with the backtester, OnChart doesn't work with buttons, but OnTick does. So if you want to backtest with it, you need to have an If Testing block, connected to the rest of your logic OnTick.

      i.e. This is a old example with just a simple buy button, which works in the backtester.
      https://fxdreema.com/shared/jvHegkKHc

      posted in Questions & Answers
      willramsey
      willramsey
    • RE: Best way to set Delay and Modelling functions while back testing

      Whenever doing backtesting, you should always include some kind of delay, if not random. You're orders in live markets are never instant.
      Additionally, any test that's not based on real-ticks or tick-data is not good and shouldn't be taken seriously.
      There are still other factors such as how it trades. Does it scalp? Does it have a tight trailing stop? All these things matter. Additionally, you should add commissions to your backtest. Some kind of swaps too if the strategy holds trades through the next day.

      Lastly, and most important, just because these things are included, it still doesn't mean it's going to perform the exact same way in live, but it should be a close representation.

      posted in Questions & Answers
      willramsey
      willramsey
    • RE: Best way to set Delay and Modelling functions while back testing

      To add commissions, you can click this button and input the commissions your broker charges. I can try to find an article to link if it's confusing to you or you can probably find an article in a few minutes on how to do it. Commissions.png

      posted in Questions & Answers
      willramsey
      willramsey
    • RE: Help - Custom MQL Code

      I messed with creating it a different way and this worked just as well with less code . The if statement just checks the current status and if its on, then it toggles the button. Otherwise it does nothing. There is no custom function to make or anything.

      Screenshot 2023-12-11 084504.png

      // Global Variables, includes
      
      #include <WinUser32.mqh>
      #import "user32.dll"
      int GetAncestor(int, int);
      #define MT4_WMCMD_EXPERTS 33020
      #import
      
      //  Main Code
      
      if (IsTradeAllowed()){
      int main = GetAncestor(WindowHandle(Symbol(), Period()), 2/*GA_ROOT*/);
      PostMessageA(main, WM_COMMAND, MT4_WMCMD_EXPERTS, 0);
      }
      
      
      posted in Questions & Answers
      willramsey
      willramsey

    Latest posts made by willramsey

    • RE: Help - Custom MQL Code

      For MQL5, this is the code. Unfortunately, there seems to be an error with FXDreema or something for the MQL5 version. You'll have to save it as a MQ5 (the source code) and delete the semicolons on the global variables (includes/defines). For whatever reason when trying to compile, it's putting semicolons which makes it returns an error when trying to compile. I did test it and it works.

      // Global Variables, includes
      
      #include <WinAPI/winapi.mqh>
      #include <WinAPI/winuser.mqh>
      #define MT_WMCMD_EXPERTS 32851
      #define WM_COMMAND 0x0111
      #define GA_ROOT 2
      
      // Main Code
      
         if (TerminalInfoInteger(TERMINAL_TRADE_ALLOWED)){
         
            HANDLE hchart = ChartGetInteger(ChartID(), CHART_WINDOW_HANDLE);
            HANDLE hmt = GetAncestor(hchart, GA_ROOT);
            
            PostMessageW(hmt, WM_COMMAND, MT_WMCMD_EXPERTS, 0);
         
         }
      
      

      When you export the MQ5 from FXDreema, you need to remove these semicolons:

      remove.png

      Sorry there isn't an easier way, not sure why it's randomly putting semicolons.

      posted in Questions & Answers
      willramsey
      willramsey
    • RE: TRAILING STOP NOT WORKING PROPERLY

      You're wanting to trail the stop loss at a certain pip/point amount? Also, as a group or individually? I'm confused.

      posted in Bug Reports
      willramsey
      willramsey
    • RE: Help - Custom MQL Code

      The bool can be nice to have though if you want to toggle it back on or something with other conditions. Glad you got it to work.

      posted in Questions & Answers
      willramsey
      willramsey
    • RE: Help - Custom MQL Code

      I messed with creating it a different way and this worked just as well with less code . The if statement just checks the current status and if its on, then it toggles the button. Otherwise it does nothing. There is no custom function to make or anything.

      Screenshot 2023-12-11 084504.png

      // Global Variables, includes
      
      #include <WinUser32.mqh>
      #import "user32.dll"
      int GetAncestor(int, int);
      #define MT4_WMCMD_EXPERTS 33020
      #import
      
      //  Main Code
      
      if (IsTradeAllowed()){
      int main = GetAncestor(WindowHandle(Symbol(), Period()), 2/*GA_ROOT*/);
      PostMessageA(main, WM_COMMAND, MT4_WMCMD_EXPERTS, 0);
      }
      
      
      posted in Questions & Answers
      willramsey
      willramsey
    • RE: Help - Custom MQL Code

      I have seen a few people say they are getting errors so I just decided to make a quick tutorial over it. The video is about 8 minutes. If it still doesn't work, then I really wouldn't have a clue. If it works on my end, it should work on yours. Hope this helps.
      https://youtu.be/xjMN9KzBqB8

      posted in Questions & Answers
      willramsey
      willramsey
    • RE: Error in mt5 position bucket

      Very odd, I honestly have no idea lol. I haven't seen something like this happen before and I mainly work with MQL5.

      posted in Bug Reports
      willramsey
      willramsey
    • RE: Error in mt5 position bucket

      Not sure then, just so you can see my pov recorded a quick clip. You could always comment them a different way just using a variable for a counter though if your having problems and want to use MT5.
      https://youtu.be/vaWMaTmEXIE?si=aonKp7X3sO_0IFwd

      posted in Bug Reports
      willramsey
      willramsey
    • RE: Error in mt5 position bucket

      If you're using pending orders, you need to use bucket of pending orders not positions. Or both of the bucket blocks if you want both. My project is just for positions I posted earlier.

      posted in Bug Reports
      willramsey
      willramsey
    • RE: Error in mt5 position bucket

      I just put it on live chart and it worked so not sure then.

      posted in Bug Reports
      willramsey
      willramsey
    • RE: Error in mt5 position bucket

      In OnTrade, have a position created and closed block, connected into bucket of positions (gray). Then OnInit, pass and comment using bucket of trades (gray) values you want. This works for live and backtesting. The only thing is when you're EA has no trades open, it'll show random large values. You can fix this using variables and normalizing them but commenting buckets does work. Having this on OnTrade updates the values each "On Trade".
      https://fxdreema.com/shared/V2BZeqmXb

      posted in Bug Reports
      willramsey
      willramsey