fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. gooseman
    3. Posts
    • Profile
    • Following 1
    • Followers 0
    • Topics 12
    • Posts 62
    • Best 6
    • Controversial 1
    • Groups 0

    Posts made by gooseman

    • RE: How to do I build a multi timeframe\symbol portfolio?

      @roar will this block go under onInit? Also, Will this be for for each symbol\TF combo I have? for ex

      datetime time_arr[2];  // Creates an array sized 1
      CopyTime("EURUSD", PERIOD_D1, 100, 1, time_arr);
      CopyTime("EURUSD", PERIOD_H1, 100, 1, time_arr);
      

      But since were looking to retrieve just history, would this be more appropriate?

      datetime time_arr[4];  // Creates an array sized 1
      CopyTime("EURUSD", PERIOD_D1, 100, 1, time_arr);
      CopyTime("AUDUSD", PERIOD_D1, 100, 1, time_arr);
      CopyTime("CADCHF", PERIOD_D1, 100, 1, time_arr);
      CopyTime("GBPJPY", PERIOD_D1, 100, 1, time_arr);
      
      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @sktsec Ive been reading up on it to understand the CopyTime function and understand it but implementing it in fxdreema is a whole other story. I am not a mql5 programmer...yet. But I have tried adding CopyTime Function using chatGPT but that did not end well haha.

      bool CopyTime(
         const string      EURUSD, // Symbol name
         const ENUM_TIMEFRAMES  PERIOD_D1, // Period
         const uint start_pos, // Start position
         const uint 100, // Data count to copy
         datetime&    time_array[] // Array of time values
      );
      
      

      Does this look right? I take it I have to create a time_array[] variable as well?

      Also, I am not seeing the modification you made to the project. I imported the project and found no changes.

      So close! thanks guys.

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @sktsec yes, many symbols. check out the first page for more details. The system works on a single TF, symbol, and RSI level. but when you have over 200 iterations or even just half, that's when ill get the error code 4806
      cf1d699e-88e0-4fa9-b811-6ec6937b1347-image.png

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @roar It's all good! no worries. I am just glad you guys are helping.

      The system backtest zero issues now which is great. unfortunately putting the system live returns error code 4806. I don't get it. MT5 client is using < 2% of RAM (total 16GB). Nothing else intensive is going on. Could it be the fact that the MT5 is reading the MA block before the Once Per Bar? I'm thinking since 4 ticks are being delivered per second, then MT5 is attempting to read the MA block 4 times a second. Could it be the custom MQL code block? Is there a more efficient way to structure the code? I am just thinking out loud here.

      brain_full_of_fuck.jpg

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @sktsec that was it! now its trading now. thanks! lets see how it handles all symbols now.

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @roar Heres the error

      0da93643-57c1-4244-b55d-4610355c93a4-image.png

      and heres the latest project

      https://fxdreema.com/shared/C9f0bjrG

      I have cleaned up the constant and variables. Still receiving this error. I have the symbol activated in MT5.

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @roar sorry I forgot to note that block 25 is still on the on init tab, I just copied the block over for the purpose to show all blocks.

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @roar yea my bad. that was an older snapshot I provided. I was hovering the mouse cursor over the variable to find the data type but your tip is much better, thanks for that.

      https://fxdreema.com/shared/VwmyF0FAd

      3c88fa65-b085-4d72-a6ca-db7e9e68f184-image.png

      even with the data type correction, I am still receiving that symbol error. Seems like there's a disconnect somewhere.

      56fd6bdd-2aab-45c2-97fe-4205c7bfdf99-image.png

      any ideas?

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @roar Where exactly this array needs to be stored? I have added the brackets to the variable

      https://fxdreema.com/shared/ikBvXHTSc

      1.PNG

      I was able to save with no compilation errors but when I test in MT5, I get
      2.PNG

      Looks like I need to tie in these custom sys_array just not sure how.

      3.PNG

      I've adjusted for differences in the data name. I just can't get the EA to tie in with my custom data. Please advise.

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @roar yea ill be taking the fancy approach because splitting the symbols the way I was doing, ended up throwing codes still. but I'm receiving compiling errors when trying to save the project. I have the blocks set in the on init tab also. please ignore the multiple market variables lol but those blocks are off. also I thought maybe it could be the Value set as numeric, so I switched it over to text and still received the compilation error.
      a7a0a53e-d3ec-4e81-ac86-3795535fba40-image.png

      +1 for the fist of the north star meme lol

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      Ok splitting up the symbols seems to work so far.

      image.png

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @roar It checks multiple levels because each lvl is considered to be its own asset in a portfolio context. so

      Daily Ifrit EURCHF LV2
      and
      Daily Ifrit EURCHF LV3

      despite being the same system with different levels, they are 2 different assets. All assets were tested individually and now I am trying to bring them all together in a portfolio or 1 EA. each asset is independent from each other. Another way to explain this is if discretionarily traded 2 trend following systems. trend following system A, where it trades on Daily EURCHF only trend following system B trades on daily GBPJPY only. so you ask your programmer friend to code both systems and put them in a portfolio.

      I also tried your example and just changed out the symbols for my customer symbol and it trades no errors. its when I add more symbols is when I receive the error

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @roar

      I have them repeating because that's what's in the portfolio.

      Daily CADJPY rsi_target = 2
      Daily CADJPY rsi_target = 3

      same system just different rsi_targets. I have many iterations of the system
      c1c3d8a0-7f18-4765-a367-801ada53bcdf-image.png

      LV# is the same thing as rsi_targets.

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @roar first thanks for the assistance. I have a little bit better understanding of how to use variables now. With your latest example, I changed symbols to my custom data and was able to get the system running. after that, I added more symbols and code but now facing an infinite sleep-detected error. I found an old post you had replied to regarding this and I checked the names in the market block and in the custom mql block. I checked my MT5 client and all my custom data is enabled. I suspect that it could possibly be an unnecessary repetition in the code? I am pretty sure this is where pipes || come into play here. I just don't know where to place them.

      https://fxdreema.com/shared/sRgGL7lwe

      if(market == "AUDCAD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 2;
      }
      if(market == "AUDJPY_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 2;
      }
      if(market == "AUDJPY_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 3;
      }
      if(market == "AUDUSD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 2;
      }
      if(market == "AUDUSD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 3;
      }
      if(market == "CADCHF_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 2;
      }
      if(market == "CADJPY_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 2;
      }
      if(market == "CADJPY_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 3;
      }
      if(market == "EURAUD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 2;
      }
      if(market == "EURCHF_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 2;
      }
      if(market == "EURCHF_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 3;
      }
      if(market == "EURGBP_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 2;
      }
      if(market == "EURGBP_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 3;
      }
      if(market == "EURGBP_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 4;
      }
      if(market == "EURGBP_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 5;
      }
      if(market == "EURUSD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 2;
      }
      if(market == "EURUSD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 3;
      }
      if(market == "EURUSD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 4;
      }
      if(market == "GBPAUD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 2;
      }
      if(market == "GBPAUD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 3;
      }
      if(market == "GBPAUD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 4;
      }
      if(market == "GBPAUD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 5;
      }
      if(market == "GBPJPY_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 2;
      }
      if(market == "GBPJPY_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 3;
      }
      if(market == "GBPJPY_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 4;
      }
      if(market == "GBPJPY_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 5;
      }
      if(market == "NZDCAD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 2;
      }
      if(market == "NZDCAD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 3;
      }
      if(market == "NZDCAD_QDM_FTMO_II")
      {
      	TF = PERIOD_D1;
      	rsi_target = 4;
      }
      
      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      While tinkering with the project, I just realized that the first condition (candle close above 200 length moving average) does have to be on the same timeframe as the RSI.

      If H1 EURUSD LV30 is on the H1 timeframe, the first condition has to be on the same timeframe.

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      @roar thats correct. different RSI timeframes and different RSI levels for each symbol.

      Just to be clear, the big orange condition block replaced the RSI block and now it will check each market listing in the block. looks like it'll check symbol && RSI_H variables in the modify variable block. got that part. but how does it know to check the levels? I see the RSI TF variables in the variables block but nothing to draw a reference for the RSI levels.

      748d21f0-1d5c-43cd-b260-d7e89acb82ed-image.png

      Ive created another modify variable block to include the RSI levels. also, markets variable. how does that work?

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: How to do I build a multi timeframe\symbol portfolio?

      image.png

      Ok, I removed all constants for symbols and groups. how about TF? is it okay to set in the blocks like in the picture? How about the constants? they are fixed per iteration. its just a RSI static level. The If position\close position blocks are global. its supposed to close any open position once it reaches a fixed price target. I could probably leave that disconnected because I have the setting within each of those blocks to watch all open positions, so I can probably disconnect it from the symbol block.

      posted in Questions & Answers
      gooseman
      gooseman
    • How to do I build a multi timeframe\symbol portfolio?

      I have checked high and low on youtube and the internet on how to build a multi tf\symbol portfolio in fxdreema. in fact, searching "fxdreema portfolio" a lot of the search results contain my previous threads about this. Needless to say but there is pretty much nothing on learning material for constructing a portfolio in fxdreema. I've tried restructuring the portfolio in fxdreema (DRY) by "logically" using the same blocks but could not get it to work the way I want. I have a portfolio. It's a simple RSI-based system with over 200 iterations of this. @fxDreema and @roar suggested using arrays and variables to reduce the number of blocks. I still could not get it to work. here is how the portfolio works like this

      https://fxdreema.com/shared/LP0IvbCbe

      Group 1
      H1 EURUSD RSI Level 30
      Group 2
      H2 GBPJPY RSI Level 35
      Group 3
      H3 CADCHF RSI Level 40
      Group 4
      H4 AUDNZD Rsi Level 35

      and so on. Each group is in its own universe. I have over 200 groups of specific TF\symbol combinations. The system has 2 entry conditions. 1. close above 200MA and condition 2. RSI level blow different levels. Once those 2 are met, robot goes long. nothing complicated. The way I currently have the portfolio constructed is causing MT5 to produce the error code 4806. Ive split the project into 2 different EAs and at first, it worked but after a few days, with no change in coding, the error returned. There are all kinds of videos on youtube on creating martingale, grid, single systems. but no portfolio construction videos!

      Im at my wits end and asking assistance. I just need the framework on getting portfolios to work with fxdreema without throwing code. I have zero programming experience and managed to get this far and not giving up! I'm so close!

      posted in Questions & Answers
      gooseman
      gooseman
    • RE: Is this a resolution to the error code=4806?

      @fxDreema said in Is this a resolution to the error code=4806?:

      If you are using the same indicator with all the same settings in multiple blocks, make a "double" variable. Then, in "on Tick" before all other blocks set the value of that variable to be the indicator's value. For this use "Modify Variables" block with low block number, so it runs before the other blocks. And then in the blocks where the indicator is used, use the variable instead.

      Is this okay? The variable is found in the condition 1 block. I am not sure where to connect the Modify Variables block.

      https://fxdreema.com/shared/LP0IvbCbe

      posted in Bug Reports
      gooseman
      gooseman
    • RE: Is this a resolution to the error code=4806?

      @fxDreema

      Thank you for your insight into this problem. I kind of figured out that having many of the same blocks can cause issues, especially since it's just a moving average indicator. I've noticed any system I build with the moving average indicator in a portfolio setting, backtesting slows down to a crawl, due to the MA calculations.

      I will proudly wear that newbie badge! haha. I have zero programming skills. I did my best using the website documents, youtube, and here on the forums. I admit, I have avoided using variables..mainly because I couldn't wrap my head around how to use them. I knew there was going to be a point where I did need to eventually start to use them, guess that time is now! I really want to get my project live and spent some years getting this far. almost there!

      As far as your suggestions, I have tried re-using the same group of blocks to avoid the DRY rule (I will never forget what the DRY rule is, thanks!) but you're right it is tricky. I still have a lot to learn but its looking like I'm reaching the threshold of my fxdreema knowledge.

      posted in Bug Reports
      gooseman
      gooseman
    • 1
    • 2
    • 3
    • 4
    • 2 / 4