MQL4 -gt R-Project - Interface Library - Page 3
Page 3 of 6118 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 175

Thread: MQL4 -gt R-Project - Interface Library

  1. #21
    Quote Originally Posted by ;
    Maybe you could help me out...

    When attempting to compile the EA you submitted in the first page, I have warnings telling me StartR, StopR, RX, etc. acts are not referenced and will be taken out of the exp file.
    This is nothing to worry about. It does observe it optimized the .ex4 by not including but never used in this EA. (They must be there since other EAs or indiors utilizing mt4R.mqh may need them). Other compilers do so optimizing too without mentioning it (at least not labeled as warning) but the mql4 compiler is somewhat talkative.

    When it compiles but MT4 does instantly crash then the route towards the Rterm binary is not accurate.

    Additionally you require DebugView.exe (from microsoft) should you want to produce your own scripts (and set the debug level in RInit() to two ) since it cannot use Print() it requires this to output debug messages and you have to view what's going on until your script is completely working.

    It also helps for debugging and development to perform a RExecute(manage, save.image('c:/path/to/somewhere/ / file.R')) following some intermediate results to save the whole workspace, which means you can load it in a separate R console to scrutinize it interactively and test matters.

  2. #22
    Quote Originally Posted by ;
    This is nothing to fret about.
    Okay, thanks!

  3. #23
    I came across this today,Sat I am not sure I have everything set up as it is the week end Will the ea show anything without a ticks coming through
    or will it show beyond bar history.... In other words does this just work during trading hours
    Due

  4. #24
    Quote Originally Posted by ;
    I came across this now,Sat I am not sure I have everything setup as it's the week end Will the ea reveal anything with no ticks coming via
    or will it reveal past bar history.... In other words does this just work during trading hours
    Due
    It requires ticks to trigger the start() function. There are scripts which can simulate this on weekends.

    For instance this to deliver a continuous stream of ticks into the chart:
    Inserted Code /** * MT4/experts/scripts/ticks.mq4 * send a bogus tick each 200 ms into the chart and * all its indiors and EA until this script is removed. */ #property copyright © Bernd Kreuss #import user32.dll int PostMessageA(int hWnd, int Msg, int wParam, int lParam); int RegisterWindowMessageA(string lpString); #import int start() int hwnd = WindowHandle(Symbol(), Period()); int msg = RegisterWindowMessageA(MetaTrader4_Internal_Messag e); while(! IsStopped()) PostMessageA(hwnd, msg, 2, 1); Sleep(200); or the subsequent one to send just 1 tick and then exit (I have this attached to a hotkey Alt T on my platform for convenience):
    Inserted Code /** * MT4/experts/scripts/one_tick. Send one bogus tick into the chart and * all its indiors and EA and exit. */ #property copyright © Bernd Kreuss #import user32.dll int PostMessageA(int hWnd, int Msg, int wParam, int lParam); int RegisterWindowMessageA(string lpString); #import int start() int hwnd = WindowHandle(Symbol(), Period()); int msg = RegisterWindowMessageA(MetaTrader4_Internal_Messag e); PostMessageA(hwnd, msg, 2, 1);

    __________
    this appears to be my two ^10th article in this forum


    .

  5. #25
    Thanks that worked just wanted to make sure I have it put right
    this is very interesting and I don't know anything about it

    but I have been playing basket pairs
    like
    AUDUSD,EURUSD,GBPUSD if market
    USDCAD,USDCHF,USDJPY afterward buy or vise versa
    with this I could burden the lot sizes

    but just thinking outloud and studying a lot

  6. #26
    would this imply I'd

    buy AU 2 lots
    sell EU 2 lots
    GU nothing
    Ucad sell 2 lots
    Uchf nothing
    UJ sell 1 lot

    what exactly does the (0) represent?

  7. #27
    Quote Originally Posted by ;
    would this mean I would

    buy AU two lots
    sell EU two lots
    GU nothing
    Ucad sell two lots
    Uchf nothing
    UJ sell 1 lot
    Yes, but you should increase base_lots for larger (and more precise) numbers. You are able to try them onto an oanda demo account next week, there you are able to trade in units and not in lots and have much more flexibility at the lot sizing (1 lot == 100000 units and you are able to exchange as small as 1 device ).

    Also try the other EA I posted in one of the recent postings: trendomat.mq4 it has some experimental new configurations.

  8. #28

  9. #29
    Oh I managed to run it, I mispelled the address. Although the thing seems to not be painting. I wonder ...

    I left it run, Great package! Thanks 7bit

  10. #30
    Quote Originally Posted by ;
    It requires ticks to activate the start() function. There are.

    For instance this to send a continuous stream of ticks to the chart:
    [code]
    / / **
    * MT4/experts/scripts/ticks.mq4
    * send a bogus tick every 200 ms to the chart and
    * all its indiors and EA until this script is removed.
    Decision /

    #property copyright © Bernd Kreuss

    #import user32.dll...
    phwoar that is a wicked hack. Have not used it but can see the possibility.

    Question 1: can this be used to'create' a bogus emblem and then stream data to it? An program could be installed as the'host' sending data?

    Or, you might stream bogus data to a fresh exotic emblem you'd not actually need to trade but can load to mt4... that way you aren't breaking any data on your own real-traded charts.

    Question two: can this be used to set a custom spread? (or was that the stage and I am too tired to realise?)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.