Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //+------------------------------------------------------------------+
- //| Nowy.mq4 |
- //| Copyright 2015, MetaQuotes Software Corp. |
- //| https://www.mql5.com |
- //+------------------------------------------------------------------+
- #property copyright "Copyright 2015, MetaQuotes Software Corp."
- #property link "https://www.mql5.com"
- #property version "1.00"
- #property strict
- #property script_show_inputs
- //--- input parameters
- input int Price;
- //+------------------------------------------------------------------+
- //| Script program start function |
- //+------------------------------------------------------------------+
- int OrderSend( string symbol, int cmd, double volume, double price, int slippage,
- double stoploss, double takeprofit, string comment=NULL, int magic=0,
- datetime expiration=0, color arrow_color=CLR_NONE );
- extern int TakeProfit = 20;
- extern int StopLoss = 2000;
- extern double Lots = 0.1;
- extern int CustomPeriod = 1; // In Minutes: 1, 5, 15, 30, 60, 240, 1440
- extern double Distance = 20;
- extern int Ilosc_zlecen = 1;
- void OnStart()
- {
- int zlecenie ;
- if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES)==true)
- {
- zlecenie=OrderSend(Symbol(), OP_SELL, 1, Bid-0.0010, 3, 0, 0, "Moje zlecenie kupna", 16384, 0, Green);
- }
- else
- {
- Print("Nie udało się otworzyć pozycji ");
- }
- }
- //+------------------------------------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement