Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-07-2006, 01:50 AM
BluePearl's Avatar
BluePearl BluePearl is offline
Senior Member
 
Join Date: Oct 2005
Posts: 203
BluePearl is on a distinguished road
Deleting arrows on chart

How does one delete arrows on the chart with MT 4?

I have tried ObjectDeleteAll(0,0) and that deletes the vertical lines but not the buy and sell arrows.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-07-2006, 05:40 AM
moneyline moneyline is offline
Senior Member
 
Join Date: Mar 2006
Posts: 509
moneyline is on a distinguished road
Quote:
Originally Posted by BluePearl
How does one delete arrows on the chart with MT 4?

I have tried ObjectDeleteAll(0,0) and that deletes the vertical lines but not the buy and sell arrows.

Hi BluePearl,

Select them with a left click and then right click and choose "Delete." (You can also choose "delete all selected," if more than one)

moneyline
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-07-2006, 06:20 AM
Kalenzo's Avatar
Kalenzo Kalenzo is offline
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 692
Kalenzo is on a distinguished road
Quote:
Originally Posted by BluePearl
How does one delete arrows on the chart with MT 4?

I have tried ObjectDeleteAll(0,0) and that deletes the vertical lines but not the buy and sell arrows.
Try this:

for(int i=0;i<ObjectsTotal();i++)
{
if(ObjectType(i) == OBJ_ARROW)
ObjectDelete(ObjectName(i));
}
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-07-2006, 08:08 AM
deepdrunk's Avatar
deepdrunk deepdrunk is offline
Senior Member
 
Join Date: Apr 2006
Posts: 310
deepdrunk is on a distinguished road
deletin all

hi,
i was about to ask the sme question.

Can someone make a code to delete all items(objects) from the chart that are not from the last day or maybe to choose how many days back to be left?

I have 6 charts open at same time with max bars in history with bunch of objects and i think it is slowing my computer pretty much.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-07-2006, 08:25 AM
Kalenzo's Avatar
Kalenzo Kalenzo is offline
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 692
Kalenzo is on a distinguished road
Quote:
Originally Posted by deepdrunk
hi,
i was about to ask the sme question.

Can someone make a code to delete all items(objects) from the chart that are not from the last day or maybe to choose how many days back to be left?

I have 6 charts open at same time with max bars in history with bunch of objects and i think it is slowing my computer pretty much.
This should work but I didnt test it:

datetime currentDay = StrToTime(Year()+"."+Month()+"."+Day()+" 00.00");

for(int i=0;i<ObjectsTotal();i++)
{
if(ObjectType(i) == OBJ_ARROW && ObjectGet(ObjectName(i),OBJPROP_TIME1)>currentDay)
{
ObjectDelete(ObjectName(i));
}
}
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 06-07-2006, 08:40 AM
deepdrunk's Avatar
deepdrunk deepdrunk is offline
Senior Member
 
Join Date: Apr 2006
Posts: 310
deepdrunk is on a distinguished road
ths Kalenzo but can you make an script of it or what ever we need to get this work ?I am still learning mql4 and it would take me lot of time to make it work.
This code is verry clear to me but i still can't be sure how to implement it and i dont have to much time.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 06-07-2006, 08:49 AM
Kalenzo's Avatar
Kalenzo Kalenzo is offline
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 692
Kalenzo is on a distinguished road
Quote:
Originally Posted by deepdrunk
ths Kalenzo but can you make an script of it or what ever we need to get this work ?I am still learning mql4 and it would take me lot of time to make it work.
This code is verry clear to me but i still can't be sure how to implement it and i dont have to much time.
Ye the time is the biggest problem, but ye, when I will find some I can make such a script.
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 06-07-2006, 11:15 AM
Pip Trip Pip Trip is offline
Senior Member
 
Join Date: Apr 2006
Posts: 211
Pip Trip is on a distinguished road
Quote:
Originally Posted by BluePearl
How does one delete arrows on the chart with MT 4?

I have tried ObjectDeleteAll(0,0) and that deletes the vertical lines but not the buy and sell arrows.
Well, there are 2 things you can do:

1) If you don't want your trades to show on chart:

a)Tools -- Options -- Charts -- Show Trade Levels (Undo)

2)If you want them on your chart, then simply delete after trade:
a)right click on chart select Objects List, find arrows and delete. or;

b)click on the arrows/checkmarks button near the "T" up on the tool bar, select "delete all arrows"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 06-07-2006, 12:23 PM
elihayun's Avatar
elihayun elihayun is offline
Senior Member
 
Join Date: Jan 2006
Posts: 350
elihayun is on a distinguished road
Quote:
Originally Posted by BluePearl
How does one delete arrows on the chart with MT 4?

I have tried ObjectDeleteAll(0,0) and that deletes the vertical lines but not the buy and sell arrows.
Another way do not see it on the chart, but still see it when testing

color SellColor = Red, BuyColor = Blue, SlColor = Yellow;
if (!IsTesting())
{
SellColor = CLR_NONE; BuyColor = CLR_NONE; SlColor = CLR_NONE;
}
if (Buy){
if(StopLoss==0){SL=0;}else{SL=Ask-StopLoss*Point; if (FractalLow>0) SL = slBuy;}
if(TakeProfit==0){TP=0;}else{TP=Ask+TakeProfit*Poi nt;}
Print("About to open buy order. S/L ",SL, " Fractal = " , FractalLow);
OrderSend(Symbol(),OP_BUY,lots,Ask,1,SL,TP,OrderCm t,IDT,0,BuyColor);
}
if (Sell){
if(StopLoss==0){SL=0;}else{SL=Bid+StopLoss*Point;i f (FractalHigh>0) SL = slSell;}
if(TakeProfit==0){TP=0;}else{TP=Bid-TakeProfit*Point;}
Print("About to open sell order. S/L ",SL, " Fractal = " , FractalHigh);
OrderSend(Symbol(),OP_SELL,lots,Bid,1,SL,TP,OrderC mt,IDT,0,SellColor);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 06-07-2006, 12:45 PM
Kalenzo's Avatar
Kalenzo Kalenzo is offline
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 692
Kalenzo is on a distinguished road
Quote:
Originally Posted by deepdrunk
ths Kalenzo but can you make an script of it or what ever we need to get this work ?I am still learning mql4 and it would take me lot of time to make it work.
This code is verry clear to me but i still can't be sure how to implement it and i dont have to much time.
Here U go - put this in your script directory and compile. This script removes all type of objects from previous days.

Enjoy!
Attached Files
File Type: mq4 ObjectsRemover_v1.mq4 (1.3 KB, 24 views)
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change arrows fxbs Indicators - Metatrader 4 1 03-23-2007 04:12 AM
Indicator DMI - Arrows profeta Suggestions for Trading Systems 7 03-02-2007 06:10 AM
Stop Repeating Arrows Pervaz Indicators - Metatrader 4 1 02-11-2007 01:18 PM
Arrows in EA? arashas Metatrader 4 4 02-04-2007 07:47 AM
Help managing/deleting tester arrows... Aaragorn Questions 1 08-01-2006 06:38 PM


All times are GMT. The time now is 08:02 AM.