Snelle scripthulp...
Results 1 to 8 of 8

Thread: Snelle scripthulp...

  1. #1
    Je if-statement is nogal vreemd en je hebt een parameter over het tweede RSI-statement gemist.. hier is hoe ik het zou schrijven:

    Code ingevoegd int start() { if (iRSI(NULL,0,21,PRICE_CLOSE,0) gt; 49 iRSI(NULL,0,21,PRICE_CLOSE,0) lt; 51) { PlaySound(sirenhilo.wav); } terugkeer (0); }

    Quote Originally Posted by ;
    Wat is er mis met het volgende?

    // ------------------------------------------------------------ -------------------
    //| RSIAlert.mq4 |
    //| |
    //|
    http://www|
    // ------------------------------------------------------------ -------------------
    #eigendom auteursrecht

    // ------------------------------------------------------------ -------------------
    //| scriptprogramma startfunctie |
    // ------------------------------------------------------------ -------------------
    int begin()
    {
    //----
    als(iRSI(NULL,0,21,PRICE_CLOSE,0) gt;49 als(iRSI(NULL,0,21,PRICE_CLOSE,)lt; 51;
    {
    PlaySound(sirenhilo.wav);
    }
    retour (0);
    }
    // ------------------------------------------------------------ -------------------
    Quote Originally Posted by ;
    Wat is er mis met het volgende?

    // ------------------------------------------------------------ -------------------
    //| RSIAlert.mq4 |
    //| |
    //|
    http://www|
    // ------------------------------------------------------------ -------------------
    #eigendom auteursrecht

    // ------------------------------------------------------------ -------------------
    //| scriptprogramma startfunctie |
    // ------------------------------------------------------------ -------------------
    int begin()
    {
    /----
    als(iRSI(NULL,0,21,PRICE_CLOSE,0) gt;49 als(iRSI(NULL,0,21,PRICE_CLOSE,)lt; 51;
    {
    PlaySound(sirenhilo.wav);
    }
    retour (0);
    }
    // ------------------------------------------------------------ -------------------

  2. #2
    Hallo, ik weet absoluut niets van scripting... Zou je alsjeblieft het volledige script willen posten, want ik ben zeer ge�nteresseerd om dit uit te proberen. Bedankt, Salie

  3. #3
    Werkt als een kampioen, bedankt jongens..

  4. #4
    Bedankt jongens! Ik ben nu op het normale werk en kan dit pas dit weekend controleren. ik laat het je weten....

  5. #5
    Quote Originally Posted by ;
    Je hebt gelijk, ik was gewoon bezig met het vertalen van zijn code ... als je het gewoon wilt wanneer het de eerste kruis maakt en niet daarna, zou iets als dit kunnen werken: Code ingevoegd int start() { double rsiNow = iRSI(NULL,0 ,21,PRICE_CLOSE,0); dubbele rsiBefore = iRSI(NULL,0,21,PRICE_CLOSE,1); if ((rsiNow gt; 49 rsiNow lt; 51 rsiBefore lt;= 49) || (rsiNow lt; 51 rsiNowgt;49 rsiBefore gt;= 51)) { PlaySound(sirenhilo.wav); } terugkeer (0); } Net als jij heb ik geen terminal voor me om het te testen, maar probeer het toch. Als u alleen zoekt naar rsi gelijk aan 50 .. dan is het eenvoudiger: Code ingevoegd int start() { double rsiNow = iRSI(NULL,0,21,PRICE_CLOSE,0); dubbele rsiBefore = iRSI(NULL,0,21,PRICE_CLOSE,1); if ((rsiNow == 50 rsiBefore != 50) { PlaySound(sirenhilo.wav); } return (0); }
    Ja, dat zou moeten werken
    Ik was niet kritisch, wist zelfs niet eens dat die code door jou was gepost. Ik heb zojuist een opmerking gemaakt, omdat ik me voorstel dat dat de volgende vraag zal zijn.

  6. #6
    Ik heb momenteel geen platform bij me om het zeker te testen, maar ik denk dat deze code bij elke tik een geluidssignaal zal geven terwijl aan de RSI-criteria wordt voldaan, in plaats van een enkele waarschuwing te geven wanneer het magische kruis optreedt (dwz wanneer aan de criteria begint te worden voldaan)........

  7. #7
    You are right LightKeeper, I was just straight translating his code ... if you just want it when it makes the initial cross and not after then something like this might work: Inserted Code int start() { double rsiNow = iRSI(NULL,0,21,PRICE_CLOSE,0); double rsiBefore = iRSI(NULL,0,21,PRICE_CLOSE,1); if ((rsiNow gt; 49 rsiNow lt; 51 rsiBefore lt;= 49) || (rsiNow lt; 51 rsiNowgt;49 rsiBefore gt;= 51)) { PlaySound(sirenhilo.wav); } return (0); } Like you I don't have a terminal in front of me to test it, but give it a go anyway. If you are only looking for rsi to equal 50 .. then it is simpler: Inserted Code int start() { double rsiNow = iRSI(NULL,0,21,PRICE_CLOSE,0); double rsiBefore = iRSI(NULL,0,21,PRICE_CLOSE,1); if ((rsiNow == 50 rsiBefore != 50) { PlaySound(sirenhilo.wav); } return (0); }

  8. #8
    Misschien wil je een tijdsbeperking op die code zetten (dwz alleen einde van de maat), anders denk ik dat het steeds opnieuw en opnieuw en opnieuw en opnieuw en opnieuw zal spelen ......

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.