Advertisement
Guest User

Untitled

a guest
Jul 1st, 2015
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1.     // Bollinger Bands
  2.     double dBandsLong = iBands(NULL,0,10,1,1,PRICE_OPEN,MODE_UPPER,0);
  3.     double dBandsShort = iBands(NULL,0,10,1,1,PRICE_OPEN,MODE_LOWER,0);
  4.     // Relative Strength Index
  5.     double dRSI = iRSI(NULL,0,7,PRICE_OPEN,0);
  6.     double dRSI2 =iRSI(NULL,0,7,PRICE_OPEN,1);
  7.     // MACD
  8.     double dMACD = iMACD (NULL,0,13,26,9,PRICE_OPEN,MODE_MAIN,0);
  9.    
  10.     // hier, werden die Indikatoren eingelesen, jetzt kann man einfach ihre Variablen Namen weiter benutzen.
  11.    
  12.     if(Open[0]>dBandsLong && dMACD>0) & (dRSI<70 && dRSI2>70)// prüfen ob Long Order
  13.       {
  14.        SendOrder("Long"); // Die Funktion "OrderSend()" wird aufgerufen mit dem Parameter "Long"
  15.       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement