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.
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,
RandyI 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.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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