object_text help a beginner - Page 2
Page 2 of 732 FirstFirst 12
Results 11 to 12 of 312

Thread: object_text help a beginner

  1. #11
    Quote Originally Posted by ;
    quote Think of the include directive as a copy and paste mechanism. It literally tells the compiler to go paste its contents and grab this document. If the contain uses angle brackets then it's accessing files from an absolute path (include directory), and with MQL that will always be the MQL\Include folder. Therefore, if you wanted to observe the code you would visit the include folder and start the subfolder and document to glimpse the definitions. You can even have files using quote marks which informs the compiler to loe the document in the...
    obtained it and invite you.
    I guess I'll Be Back is probably going to happen Sooner or Later

  2. #12
    Hello
    Pleased to say made some improvement since my last trip.
    I have managed to open transactions successfully in MQL at given points, (I understand large woo) but for a reason I can't shut any .
    I'm in MT4 Strategy Tester, running it through to where the trade should shut.
    The Text Objext Cls appears as it should but the one open order is not closed.
    All under void OnTick()
    There are errors 0 warnings.
    I am not getting any Alert windows popping up but presume that's because everything is in test mode.

    I put a Comment from the loop to see if the code has been running to it ok . To me it seems to affirm everything should operate, with there being one short trade open prepared to be shut, however, the bool reslt factor returns 0.

    The Comment shows on screen:
    String = Short
    Reslt = 0
    Open Orders = 1

    Please would you help.

    Inserted Code for(int I=OrdersTotal(); igt;=0;I--) //all available orders if (OrderSelect(I,SELECT_BY_POS)== true) if (OrderSymbol() ==Symbol()) bool reslt; if (str ==Long) reslt= OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(),Bid),3, clrMagenta); if (str ==Short)reslt= OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(),Ask),3, clrMagenta); if (reslt == false) Alert(Error Closing Order(s)); else Alert(Orders Closed Successfully); Opinion(String = ,str \n, Reslt = ,reslt \n,Open Orders = ,OrdersTotal() ); ObjectCreate (AtClose,OBJ_TEXT,0,CurrentTime, High#91;0#93; 0.0004); ObjectSetText (AtClose, Cls:,10,Calibri,clrMagenta); }

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.