Saeid Reza Bahman Abadi: OBJPROP_ANGLE give me 0.0 value!?
ObjectCreate("Trendbyangle",OBJ_TRENDBYANGLE,0,Time[5],Close[5],Time[1],Close[1]);
All you've done is post the command to create the object. You never set the angle! Then, after you return, the object is created, and you can read the angle.
-
if(iVolume(Symbol(),timeframe,0)<=1) {
For a new bar test, Bars is unreliable (a refresh/reconnect can change number of bars on chart), volume is unreliable (miss ticks), Price is unreliable (duplicate prices and The == operand. - MQL4 programming forum.) Always use time.
New candle - MQL4 programming forum #3 (2014.04.04)I disagree with making a new bar function, because it can only be called once per tick. A variable can be tested multiple times.
Running EA once at the start of each bar - MQL4 programming forum (2011.05.06)
i want read with objectget
this is my problem
ObjectGet("Trendbyangle",OBJPROP_ANGLE)
but when i add this code it,s return 0.0
ObjectDelete(0,"Trendbyangle");
You never set an angle. Only the first coordinate was used in the create.
Perhaps you should read the manual. Especially the example. OBJ_TRENDBYANGLE - Object Types - Objects Constants - Constants, Enumerations and Structures - MQL4 Reference
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi Dear
@Alain Verleyen
@whroeder1
I want get OBJPROP_ANGLE from OBJ_TRENDBYANGLE with this code in open any candel but OBJPROP_ANGLE give me 0.0 value!?
please help me