Advertisement
Guest User

Kod Mql

a guest
Nov 8th, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.65 KB | None | 0 0
  1. //+------------------------------------------------------------------+
  2. //|                                                         Nowy.mq4 |
  3. //|                        Copyright 2015, MetaQuotes Software Corp. |
  4. //|                                             https://www.mql5.com |
  5. //+------------------------------------------------------------------+
  6. #property copyright "Copyright 2015, MetaQuotes Software Corp."
  7. #property link      "https://www.mql5.com"
  8. #property version   "1.00"
  9. #property strict
  10. #property script_show_inputs
  11. //--- input parameters
  12. input int      Price;
  13. //+------------------------------------------------------------------+
  14. //| Script program start function                                    |
  15. //+------------------------------------------------------------------+
  16.  
  17. int OrderSend( string symbol, int cmd, double volume, double price, int slippage,
  18. double stoploss, double takeprofit, string comment=NULL, int magic=0,
  19. datetime expiration=0, color arrow_color=CLR_NONE );
  20.  
  21. extern int        TakeProfit     = 20;
  22. extern int        StopLoss       = 2000;
  23. extern double     Lots           = 0.1;
  24. extern int        CustomPeriod   = 1;        // In Minutes: 1, 5, 15, 30, 60, 240, 1440
  25. extern double     Distance       = 20;
  26. extern int        Ilosc_zlecen   = 1;
  27.  
  28. void OnStart()
  29. {  
  30.  
  31.  
  32.  
  33.  
  34.  
  35. int zlecenie   ;
  36.  
  37.  
  38.  
  39. if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES)==true)
  40. {
  41. zlecenie=OrderSend(Symbol(), OP_SELL, 1, Bid-0.0010, 3, 0, 0, "Moje zlecenie kupna", 16384, 0, Green);
  42. }
  43. else
  44. {
  45. Print("Nie udało się otworzyć pozycji ");
  46. }
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.    
  59.   }
  60. //+------------------------------------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement