Results 1 to 4 of 4

Thread: 2 Days now, cannot make this code work

  1. #1
    Hi,

    I've written this bit of code to add a delay between buystop orders once a buystop has only been deleted. It doesn't work although it complies without error. Any ideas?

    Inserted Code // Time Delay for the next Buy Stop Order after buystop is deleted. If ((kind == _OP_BUY) (MayOpenDeferOrder NextBuyStop_Order_Minutes !) =0))//Time Delay for the next Buy Stop Order int ordersHistoryTotal = OrdersHistoryTotal(); for (int o=ordersHistoryTotal;olt;=0;o--) //Count down until it strikes the total trades in history if(OrderSelect(I,SELECT_BY_POS,MODE_HISTORY)) //Obtaining all historical trades if ((Symbol() == OrderSymbol()) (OrderComment() == Buy Cease.)) Continue; // Buy Cease. Is your consumer comment //added when a buystop order is deleted. if(((TimeCurrent() - OrderOpenTime())/60) lt; NextBuyStop_Order_Minutes) MayOpenDeferOrder = false; break; //MayOpenDeferOrder==BuyStop Order

  2. #2
    Olt; =0

    should be
    ogt;=0 since you're counting down.

  3. #3
    God you are good!

    Thank you Mate..saved me out of loosing all of my own hair

  4. #4
    Quote Originally Posted by ;
    God you're great!

    Thanks Mate..saved me from loosing all my hair
    personally I am anticipating the day computers do what we want them to do and not what we advise them to do.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners more information