Or you could start a counter once dragging has been detected there are many ways to do it.,
( I just " have " one way for now to do it for me - that way in your latest comment )Mr. Marco you saved my day, thanks a lot man.
Not for now but I will try later which one I want to add additionally few functions to this ' SL and TP ' functions. I just really really need to research a lot of things about that before I start to write script for that.
All the best to you man!
If I remember right - I seen a long time ago one " Order Modifier " EA's work like this: which one it was not updates while dragging, when I " Drag OFF " drag line, after dragging and then " Stop Loss and Take Profit " values could change just once.So I three and more times read your latest comment and also tried change a little a bit more that I could stop updates while I dragging.
Q: So is it not possible, please?
Thanks in advance.
Well for as long as the boolean flag drag == 1 you could use this same flag for disabling updates.
Like i said you can also start a counter here's an example of that:
Or simply use a while loop this one works very well:
Well for as long as the boolean flag drag == 1 you could use this same flag for disabling updates.Like i said you can also start a counter here's an example of that:Or simply use a while loop this one works very well:It's just saying while (i'm dragging) update the price until they become both equal (when i stop dragging)
( and your codes )
What a brilliant examples man?! That is really very very useful comment, thanks a lot. And now I am trying to add more things for that lines ( designs and functions ).( Please, do not blame me for my this question: I have " graphics() " which is I am using it for graphical objects, and I am calling it through Init() and I need to call it through OnTimer(), so my question is: Am I doing wrong, please? )
All the best to you!
You can run into error 4200 which is failed to create object because it already exists.
So you have to see if the object exists before you try to (re)-create or modify it.
You can use:
Hmm, this is really new Function for me.I could try after I research about that. ( I saw it a lot of times but I never use it for me. )
Thanks a lot.
#Convert Price to Pixels - Open
I use " HLine " for Take Profit function.I have few objects ( Label, RecLabel... and so on ) and I would like to that objects could moves with " HLine " object. So I has been found below function. But I would not like to convert " X ". I want to convert only Price to Y. I never tried anything with below code.Q: Cause I want to be sure could it be help me for my this concern? ( if I know it could help me then I will start to try it for my concern ).Q: And is there any methods for some objects could moves with " HLine "?
Thanks in advance.
You will have to be a bit more specific you can do many things in many ways.
These functions are used in the OnChartEvent() function.
ChartPriceToXY - will give you the price time conversion to coordinates , is this really what you need ?
Maybe you mean ChartXYToTimePrice() ?
If you don't need the value, you can just pass it as a zero see example below.
I already read that documentation but I was not clearly figured out it until your latest comment. Actually but I do not tried yet, because I struggle below code, I already tried few ways for good results, but I can't.Mr. Marco thanks for your latest great comment which is I feel I can use it to my objects moves issue.
I really spent a lot time to find solution to my concern, I can't get good results.But anyway I can get ( currently opening positions ) Take Profit Prices which is I want to " hline " objects could call Take Profit prices to itself, and it's work. And it is just works initial times. Yes I know because it is in " Init() ". But I tried put it in " OnTimer() " but id does not work correctly.
Please let me know something that help me to figure out what I could learn, and do for my this issue.I will start to research again about this issue after 7 hours later.If I get good comment that will be better for me.
Thanks in advance.All the best to you!
Please use the styler it's under the Tools tab.
I have no idea what you are trying to accomplish so i have to guess what you want to do this is never good.
But you can look at the example here:
So you can see that you can use ObjectGetDouble directly, there is no need to copy the value to another double because the object itself holds the value, and when you drag the line that value changes automatically, and will be seen the next time you read it.