Have to change these lines
obj_type = ObjectType(ObjectName(objectname));//objectname is a string.It can be used as parameter for instruction ObjectName() if(objectname=="sCommentOpposition" && objectname >= 2)//Why do comparing string objectname to value 2 ?
This line :
if (aspecthargasun>=180.0 && aspecthargasun<=180.0)
is equivalent to :
if (aspecthargasun==180.0)
Let's introduce orb value
If you want
* to check if the flag Show_oppostion is TRUE
* and define 'opposition' when aspect is between 180° - orb and 180° + orb
* and check if planete[0] is in opposition both with planetnature[0] to planetnature[4]
Codes may be changed as :
double orb = 3.0, minOpp=180-orb, maxOpp=180+orb; if (Show_Opposition==true){ sCommentOpposition=""; if (aspecthargasun>=minOpp && aspecthargasun<=maxOpp && Show_Sun==true) sCommentOpposition += planetnature[0] + " "; if (aspecthargamercury>=minOpp && aspecthargamercury<=maxOpp && Show_Mercury==true) sCommentOpposition += planetnature[2] + " "; if (aspecthargavenus>=minOpp && aspecthargavenus<=maxOpp && Show_Venus==true) sCommentOpposition += planetnature[3] + " "; if (aspecthargamars>=minOpp && aspecthargamars<=maxOpp && Show_Mars==true) sCommentOpposition += planetnature[4]; If (StringLen(sCommentOpposition)!=0) sCommentOpposition = planetname[0] + " Opposition with " + sCommentOpposition; }
Same logic for square and semi-square
Thank you for your responses bro paul selvan.
I will try your solution.
all the best
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
Hi guys, I want to count the total number & separate new line from the multiple of label (string) that have same value. Example: Sun Opposition with Mercury & Venus Opposition with Mars.
At the moment, my code use OBJPROP_YDISTANCE & plus the range to separate the lines.
So how to separate the same label, in the example is Opposition?
Here's the code:
Thanks in advanced.