Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Follow us on Facebook Follow us on Twitter Linked In Watch us on YouTube Blogger
Your Banner Here
You cannot rate threads
0
 
Thankx Thankx:  0
Recommend Recommend:  0
Results 1 to 6 of 6

Thread: help ea

  1. #1

    help ea

    Hello friends;

    Please Close the position after 60 seconds, Could you put a tab.



    Thank you in advance...
    Attached Files Attached Files

  2. #2
    Quote Originally Posted by seref View Post
    Hello friends;

    Please Close the position after 60 seconds, Could you put a tab.

    Thank you in advance...
    int start()
    {
    int cmd_8;
    bool li_12;
    int order_total_0=OrdersTotal();
    for(int pos_4=order_total_0-1; pos_4>=0; pos_4--)
    {
    if (OrderSelect(pos_4,SELECT_BY_POS) && OrderOpenTime()+60<=TimeCurrent())
    {
    cmd_8 = OrderType();
    li_12 = FALSE;
    switch(cmd_8)
    {
    case OP_BUY:
    li_12=OrderClose(OrderTicket(),OrderLots(),MarketI nfo(OrderSymbol(),MODE_BID),5,Red);
    break;
    case OP_SELL:
    li_12=OrderClose(OrderTicket(),OrderLots(),MarketI nfo(OrderSymbol(),MODE_ASK),5,Red);
    break;
    case OP_BUYLIMIT:
    case OP_BUYSTOP:
    case OP_SELLLIMIT:
    case OP_SELLSTOP:
    li_12=OrderDelete(OrderTicket());
    }
    if(li_12==FALSE)
    {
    Alert("Order ",OrderTicket()," failed to close. Error:",GetLastError());
    Sleep(3000);
    }
    }
    }
    return (0);
    }

  3. #3
    Quote Originally Posted by skg3007 View Post
    int start()
    {
    int cmd_8;
    bool li_12;
    int order_total_0=OrdersTotal();
    for(int pos_4=order_total_0-1; pos_4>=0; pos_4--)
    {
    if (OrderSelect(pos_4,SELECT_BY_POS) && OrderOpenTime()+60<=TimeCurrent())
    {
    cmd_8 = OrderType();
    li_12 = FALSE;
    switch(cmd_8)
    {
    case OP_BUY:
    li_12=OrderClose(OrderTicket(),OrderLots(),MarketI nfo(OrderSymbol(),MODE_BID),5,Red);
    break;
    case OP_SELL:
    li_12=OrderClose(OrderTicket(),OrderLots(),MarketI nfo(OrderSymbol(),MODE_ASK),5,Red);
    break;
    case OP_BUYLIMIT:
    case OP_BUYSTOP:
    case OP_SELLLIMIT:
    case OP_SELLSTOP:
    li_12=OrderDelete(OrderTicket());
    }
    if(li_12==FALSE)
    {
    Alert("Order ",OrderTicket()," failed to close. Error:",GetLastError());
    Sleep(3000);
    }
    }
    }
    return (0);
    }
    Hello friend,

    [Only registered and activated users can see links. ]compilation error .

  4. #4
    I think the idea was for you to insert the selected code into the existing source code. The specimen code offered is incomplete and will likely not compile

  5. #5
    Use this attachment
    [Only registered and activated users can see links. ]

  6. #6
    Quote Originally Posted by skg3007 View Post
    Use this attachment
    [Only registered and activated users can see links. ]
    thank you very much my friend...

User Tag List

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +3. The time now is 08:10 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.
DragonByte SEO, Advanced @User Tagging, Advanced Post Thanks / Like, Thread Ratings - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
All that information inside Forum does not necessarily reflect the opinion of the Forum Management, but expresses the opinion of the writer.
Advertising positioning by Digital Point