View Single Post
  #2 (permalink)  
Old 07-31-2006, 12:04 AM
fxd01 fxd01 is offline
Member
 
Join Date: Nov 2005
Posts: 85
fxd01 is on a distinguished road
Quote:
Originally Posted by rbowles
I am able to show arrows on indicators but I can't figure it out on an expert advisor. It would be nice to see arrows that indicate buy and sell positions as well as closing of a position. Any help would be apreciated.

Thanks,

Randy
I have not tried arrows on Expert. However I have tried placing a 'B' for buy and 'S' for sell on the chart after opening the buy or sell. Here is the code that I use.

int mObjs; // at the beginning where you declare the variables.

Then after opening a Buy,

mObjs=ObjectsTotal()+1;
ObjectCreate(""+mObjs, OBJ_TEXT, 0, Time[0], Ask);
ObjectSetText(""+mObjs, ""+"B", 8, "Arial", Yellow);

After opening a sell,
mObjs=ObjectsTotal()+1;
ObjectCreate(""+mObjs, OBJ_TEXT, 0, Time[0], Bid);
ObjectSetText(""+mObjs, ""+"S", 8, "Arial", Red);

Nothing really fancy, but it gives a visual indication when the order was placed.
Reply With Quote