Results 1 to 8 of 8
 0 Attachment(s)    

Thread: JMBuyer Script.

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    13

    Default JMBuyer Script.

    Hello. can someone please tell me how to make a seller script with the one listed below. Thank you.


    //+------------------------------------------------------------------+
    //| JMBUYERv2.mq4 |
    //| Copyright 2008, PRMQuotes Software Corp. |
    //| Jedimedic77@gmail.com |
    //+------------------------------------------------------------------+
    #property copyright "Copyright 2008, PRMQuotes Software Corp."

    #include <stdlib.mqh>
    #include <WinUser32.mqh>

    //+----------------------------------------------------------------------+
    //| To modify Lotsize of script change value listed here, right now |
    //| its set to 1.0 change that value if you desire different lotsize |
    //| I have found that it is important to keep the decimal in place, |
    //| but really dont know why yet, but fractional lots work too (ex... |
    //| 0.1, 0.3, 1.12), you get the picture. |
    //| AGAIN DONT FORGET TO SAVE AND COMPILE AFTER MAKING ANY MODIFICATIONS |
    //+----------------------------------------------------------------------+
    extern double Lots = 0.10; // change this number to change the lotsize
    extern double stoploss = 100; // change this number to change the stoploss
    extern double takeprofit = 100; // change this number to change the takeprofit

    //+---Don't forget to save and compile after changing the Lotsize--------+

    //+------------------------------------------------------------------+
    //| Each of the following lines produces an individual order |
    //| 3 lines produces 3 orders, to increase or decrease the number |
    //| of individual orders either add, or take away identical lines |
    //| within the parenthesis. Again dont forget to save and compile |
    //| time you modify the code. |
    //+------------------------------------------------------------------+
    int start()
    {
    OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Bid+takeprofit*Point,"JMBUYER",0,0, CLR_NONE);
    OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Bid+takeprofit*Point,"JMBUYER",0,0, CLR_NONE);
    OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Bid+takeprofit*Point,"JMBUYER",0,0, CLR_NONE);
    OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Bid+takeprofit*Point,"JMBUYER",0,0, CLR_NONE);
    OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Bid+takeprofit*Point,"JMBUYER",0,0, CLR_NONE);

    }

    //+------------------------------------------------------------------+
    //+------------------------------------------------------------------+

  2. #2
    Junior Member
    Join Date
    Dec 2009
    Posts
    13

    Default

    I have tried this .... but nothing happens.

    OrderSend(Symbol(),OP_SELL,Lots,Ask,5,Bid-stoploss*Point,Bid+takeprofit*Point,"---------",0,0,CLR_NONE);
    OrderSend(Symbol(),OP_SELL,Lots,Ask,5,Bid-stoploss*Point,Bid+takeprofit*Point,"---------",0,0,CLR_NONE);
    OrderSend(Symbol(),OP_SELL,Lots,Ask,5,Bid-stoploss*Point,Bid+takeprofit*Point,"---------",0,0,CLR_NONE);
    OrderSend(Symbol(),OP_SELL,Lots,Ask,5,Bid-stoploss*Point,Bid+takeprofit*Point,"---------",0,0,CLR_NONE);
    OrderSend(Symbol(),OP_SELL,Lots,Ask,5,Bid-stoploss*Point,Bid+takeprofit*Point,"---------",0,0,CLR_NONE);

  3. #3
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by mike2star View Post
    I have tried this .... but nothing happens.

    OrderSend(Symbol(),OP_SELL,Lots,Ask,5,Bid-stoploss*Point,Bid+takeprofit*Point,"---------",0,0,CLR_NONE);
    OrderSend(Symbol(),OP_SELL,Lots,Ask,5,Bid-stoploss*Point,Bid+takeprofit*Point,"---------",0,0,CLR_NONE);
    OrderSend(Symbol(),OP_SELL,Lots,Ask,5,Bid-stoploss*Point,Bid+takeprofit*Point,"---------",0,0,CLR_NONE);
    OrderSend(Symbol(),OP_SELL,Lots,Ask,5,Bid-stoploss*Point,Bid+takeprofit*Point,"---------",0,0,CLR_NONE);
    OrderSend(Symbol(),OP_SELL,Lots,Ask,5,Bid-stoploss*Point,Bid+takeprofit*Point,"---------",0,0,CLR_NONE);
    Hi mike2star,

    Replace Ask by Bid.

  4. #4

    Default

    One more thing, if your broker 5 digits, you have to change order command. First Ordersend commant set 0(zero) Stoploss and Take profit and then you have to modify this order .. you can see ECN=true/false section in Funyoo's EAs...

  5. #5
    Junior Member
    Join Date
    Dec 2009
    Posts
    13

    Default

    OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Bid-stoploss*Point,Bid+takeprofit*Point,"SELL",0,0,CLR _NONE);

    Nope. nothing happens.

  6. #6

    Default

    I mean like that :
    OrderSend(Symbol(),OP_SELL,Lots,Bid,5,0,0,"SELL",0,0,CLR _NONE);

  7. #7
    Junior Member
    Join Date
    Dec 2009
    Posts
    13

    Default

    yeah that works fine. but i need it set up for take-profit and stop loss like the Buy orders.

  8. #8

    Default

    Quote Originally Posted by mike2star View Post
    yeah that works fine. but i need it set up for take-profit and stop loss like the Buy orders.
    you can look Funyoo EAs ECN section..

Similar Threads

  1. Script open buy and sell together
    By naughtybrain in forum Scripts and other tools
    Replies: 3
    Last Post: 01-19-2015, 10:20
  2. Looking for script that will close orders
    By traffik in forum Scripts and other tools
    Replies: 3
    Last Post: 06-28-2012, 01:00
  3. Martingale EA timer script?
    By starlogic in forum Scripts and other tools
    Replies: 1
    Last Post: 12-03-2011, 18:42
  4. Screenshoot script help
    By maxbox in forum MQL programming
    Replies: 1
    Last Post: 09-10-2011, 23:54
  5. Disable EA form EA or script
    By netmastro in forum MQL programming
    Replies: 3
    Last Post: 11-04-2010, 15:31

Tags for this Thread

100, add, broker, change, change order, color, eas, ecn, how to, mq4, profit, software, stop, stoploss, thank you, time

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •