MQL Framework : Preventing Expert Advisors from Making Multiple Trades

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 36

  • @catherinefabian2171
    @catherinefabian2171 2 года назад +1

    I am in Framework_2.04. I am following your tutorial and proud of myself for not having any error. Thank you so much. Please don't be tired of teaching and posting. All the best!

    • @OrchardForex
      @OrchardForex  2 года назад +2

      If all goes well I have a new framework coming next year.

    • @catherinefabian2171
      @catherinefabian2171 2 года назад

      @@OrchardForex Wishing you and your family a blessed Christmas and Happy New Year!

  • @RameshJavaneGowdaDr
    @RameshJavaneGowdaDr 4 года назад +3

    Works perfect with trend combination. Thank you for the all the time and effort you put in to educate us.

    • @OrchardForex
      @OrchardForex  4 года назад +1

      My pleasure!

    • @wajahatkhan4010
      @wajahatkhan4010 3 года назад

      @@OrchardForex sir please send me.ur gmail.so that i.can.send.u my project,,,actually if i run this with only MA Crossovers like in the video,it runs successfully but when,,i tried this limited trade EA with trend combination ,,there is problem.....

    • @OrchardForex
      @OrchardForex  3 года назад

      @@wajahatkhan4010 Use our web contact form, but with free advice if the problem takes more than a few minutes you may not get a reply. orchardforex.com/contact-us/

    • @johnbobbypringle
      @johnbobbypringle Год назад

      @@wajahatkhan4010 Did you ever resolve this? I think it may be because the SignalCombination class isn't checking for SIGNAL_BOTH in the signals. for example SIGNAL_BOTH will never == mEntrySignal or mEntrySignal and the signal will always result in SIGNAL_NONE

  • @cjjr85
    @cjjr85 2 года назад

    Thanks for all these videos. It is tough to find such a detailed tutorial on RUclips and, best of all, for free. It is so helpful that I watch it repeatedly for some videos to custom the coding for my use. I have one question about this video, how can I make the trade limit variable that can I change in the tester? Currently, the only way I amend it is in the coding itself.

    • @OrchardForex
      @OrchardForex  2 года назад

      Just add an input and compare that to the count of existing trades.

  • @orkayen
    @orkayen 2 года назад

    Hello Richard, What is wrong with this ontick() code lines? It is making multiple trades even though I specified the condition. When I compile it gives no error.
    {
    if(Close[1] > iMA(Symbol(),0,10,1,1,PRICE_CLOSE,0) && Close[2] < iMA(Symbol(),0,10,1,1,PRICE_LOW,0))
    {

    OrderSelect(0,SELECT_BY_POS);
    OrderClose(OrderTicket(),0.1,Bid,100,clrWhite);
    OrderSend(Symbol(),OP_BUY,0.1,Ask,100,0,0,NULL,0,0,clrForestGreen);


    }
    if(Close[1] < iMA(Symbol(),0,10,1,1,PRICE_CLOSE,0)&& Close[2] > iMA(Symbol(),0,10,1,1,PRICE_HIGH,0))
    {
    OrderSelect(0,SELECT_BY_POS);
    OrderClose(OrderTicket(),0.1,Ask,100,clrWhite);
    OrderSend(Symbol(),OP_SELL,0.1,Bid,100,0,0,NULL,0,0,clrForestGreen);

    }

    • @OrchardForex
      @OrchardForex  2 года назад

      I don't see anything here to prevent this from trading on every tick once the condition is met.

    • @orkayen
      @orkayen 2 года назад

      @@OrchardForex Thanks. I thought the candle ref [2] prevents it.

    • @orkayen
      @orkayen 2 года назад

      @@OrchardForex Does your code "How to run MQL4 code only one time per each bar" resolve this issue?

    • @OrchardForex
      @OrchardForex  2 года назад

      @@orkayen No, they are different concepts. You can run once per bar and still place multiple trades.

  • @jonathanmiles3806
    @jonathanmiles3806 2 года назад

    So if I only wanted one trade running at a time my inputs would be 1,1,1 right?

  • @collinowen2535
    @collinowen2535 2 года назад

    So I did everything and I didn't have any errors but when i run it on metatrader 4 nothing shows up in results and no trades where taken. i am on Framework_2.04. Do you by chance know why it would be doing that. Thanks

    • @OrchardForex
      @OrchardForex  2 года назад

      This video is only about preventing multiple trades, it is not about making trades. The idea is to take the technique from here and add it to your existing expert if needed.

    • @collinowen2535
      @collinowen2535 2 года назад

      @@OrchardForex Is your Crossover video have making trades. I am just trying to recreate the demonstration you have at the end of this video but i'm just so lost in the sauce right now. What videos do you recommend to watch to do that and that you have and what order. I really appreciate you responding I have been lost in the sauce for like three days now

    • @OrchardForex
      @OrchardForex  2 года назад

      @@collinowen2535 Try this as a starter for MA cross.
      ruclips.net/video/wlvMHOLYJXw/видео.html
      MA Cross is very simple and not really a good strategy. I use it as a base to demonstrate other code only because it is so simple and easy to adapt.

    • @johnbobbypringle
      @johnbobbypringle Год назад

      Did you resolve this? I think it is because the SignalCombination class isn't taking into consideration SIGNAL_BOTH so when it finds a signal with SIGNAL_BOTH, it sets mEntrySignal to SIGNAL_NONE as it doesn't match any of the other signals

  • @reasonforge9997
    @reasonforge9997 3 года назад

    Good stuff, but wondering why the code is not in github repos?

  • @allanhenrique6275
    @allanhenrique6275 3 года назад

    Master, do you have any groups in the study Telegram? Thanks in advance for passing on your great knowledge.

    • @OrchardForex
      @OrchardForex  3 года назад

      Jim uses the Telegam channel to post trading ideas from time to time but we don't have any active disciussion group on programming.

  • @yellowbear6485
    @yellowbear6485 3 года назад

    hey so i ended up being able to build working eas with the tutorials but how do you optimize the ea afterwards? nothing shows if i try to run it in slow complete algo

    • @OrchardForex
      @OrchardForex  3 года назад

      I don't know what you meany by nothing shows.

    • @yellowbear6485
      @yellowbear6485 3 года назад

      @@OrchardForex so when i would try to test in the slow complete algo with different inputs in the mt5 and it would instantly be "done" and there's no results in the result tab. but I am able to backtest other eas that i did not create.

  • @yellowbear6485
    @yellowbear6485 3 года назад

    how would you code something like rsi divergence or macd divergence if that's even possible and more specific request would be if ma for example in the 1hr crossed and the rsi is above a certain level the bot would enter the trade on a RSI divergence on a lower timeframe like 15 min, and exit or reverse the trade bullish rsi divergence occurs on a specific tf.

    • @OrchardForex
      @OrchardForex  3 года назад

      For divergence or convergence first just create a class that gives a trend for the indicators, then a class that compares the trends of 2 indicator classes.

    • @yellowbear6485
      @yellowbear6485 3 года назад

      i actually dont quite understand. i am pretty new to the expert advisors. could you let me know what you mean by trend for indicators? can't find anything when i google that but indicators for trends

  • @olamideodedina134
    @olamideodedina134 2 года назад

    Hello sir. how can I send you a personal message?

    • @OrchardForex
      @OrchardForex  2 года назад

      You can't. I don't do personal messages. If you have a suggestion there is a topic request page on our website.