Page 1 of 2 12 LastLast
Results 1 to 10 of 12
 1 Attachment(s)    

Thread: Code to remove standard arrow in EA

  1. #1

    Default Code to remove standard arrow in EA

    Hi there,i new here.Great we have another forum but more focus on programming.I really like it.

    I have some question,can i put any code inside the EA to remove standard arrow for buy,sell and modified stoploss and take profit?Example like picture bellow.Can anybody show how it can be done?

    I dont really like this arrow because it will make my chart messy

    thanks!
    Attached Images Attached Images Code to remove standard arrow in EA-dontwant-gif 

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

    Default

    Quote Originally Posted by darkkiller View Post
    Hi there,i new here.Great we have another forum but more focus on programming.I really like it.

    I have some question,can i put any code inside the EA to remove standard arrow for buy,sell and modified stoploss and take profit?Example like picture bellow.Can anybody show how it can be done?

    I dont really like this arrow because it will make my chart messy

    thanks!
    Hi darkkiller and welcome,

    Good question.

    I don't know, but I think that the main idea is here : Removing Arrows or Xs etc from the Chart - MQL4 forum

  3. #3
    Junior Member MiniMe's Avatar
    Join Date
    Oct 2008
    Posts
    21

    Wink

    Quote Originally Posted by funyoo View Post

    I don't know
    finally something I know that you don't in coding


    PHP Code:
    ObjectsDeleteAll(); 

    BTW good work on the site funyoo

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

    Default

    Finally it was easy !

    Well done.

  5. #5

    Default

    Quote Originally Posted by MiniMe View Post
    finally something I know that you don't in coding


    PHP Code:
    ObjectsDeleteAll(); 

    BTW good work on the site funyoo
    Hah, i was thinking about this when i in toilet do some big business
    thanks!!!

    I still beginner in mq4 coding,hope one day, i can share good ea here
    Last edited by darkkiller; 02-13-2009 at 01:57.

  6. #6

    Default

    The only problem with using ObjectsDeleteAll() is that they will delete trendlines and other things that you may have drawn either manually or through a script on the chart.

    The trade arrows themselves are created through an instruction in the OrderSend() function. It's the last parameter and you should be able to either leave it blank or use CLR_NONE to stop the arrows from drawing.

  7. #7

    Default

    Quote Originally Posted by jezzer1961 View Post
    The only problem with using ObjectsDeleteAll() is that they will delete trendlines and other things that you may have drawn either manually or through a script on the chart.

    The trade arrows themselves are created through an instruction in the OrderSend() function. It's the last parameter and you should be able to either leave it blank or use CLR_NONE to stop the arrows from drawing.
    Yes thanks jezzer

    like code bellow

    before
    Code:
    Ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,EntryLong,Slippage,SLLong,TPLong,Text,MN,0,Blue);
    after
    Code:
    Ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,EntryLong,Slippage,SLLong,TPLong,Text,MN,0,CLR_NONE);

  8. #8

    Default

    Is it possible to code: to remove the trade Open (BUY/SELL) Arrow after the trade is close?

    Regards,

  9. #9

    Default

    Quote Originally Posted by jidonk View Post
    Is it possible to code: to remove the trade Open (BUY/SELL) Arrow after the trade is close?

    Regards,
    Yes, count the open orders and if the count is greater than 0, you can use either ObjectDeleteAll() to delete all objects (this might cause a problem with other things on the chart as in a previous post) or ObjectDelete() to delete just the arrows.

    This will work fine for EAs that just run 1 position at a time, but won't work for those EAs that run multiple positions together because the count of open orders will probably always be >0.

    In this case, it would be more complicated as you would need to use the OrderSelect() function to check the history pool for closed orders and then delete the arrows relating to the closed orders. One way to do this would be to use the bar shift of the OrderOpenTime() function, but there are probably other methods that I can't think of right now.

  10. #10

    Default

    Thanks Jezzer....

    I understand the logic but unfortunately I'm not a coder and if a master coder like you thinks that this is complicated, then I just have to keep my messy chart....

    Regards,
    Jdk

Similar Threads

  1. Remove mystartsearch from Firefox
    By fxtester in forum General discussion
    Replies: 0
    Last Post: 02-13-2015, 12:24
  2. Ea Arrow rsi-8 cross 55-45
    By cococho in forum Ideas for expert advisors
    Replies: 1
    Last Post: 11-19-2010, 22:33
  3. Indicator remove ea from chart
    By Trint in forum Ideas for expert advisors
    Replies: 0
    Last Post: 09-15-2010, 07:11
  4. Standard Slope Direction Line EA
    By stevensouders in forum Ideas for expert advisors
    Replies: 7
    Last Post: 02-09-2010, 18:06

Tags for this Thread

beginner, coding, eas, main, mq4, mql, profit, programming, slippage, stop, stoploss, 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
  •