I've commented out unnecessary, I compare 2 values - always the last one is drawn...
Interesting... ObjectFind(); returns the number of the chart subwindow where this object is found:
Search for an object with the specified name. The function returns the index of the window to which the object belongs. If it fails, the function will return -1. Call the GetLastError() function to get more information about the error. The chart subwindows (if there are indicator subwindows in the chart) are numbered starting from 1. The main chart subwindow is always present and has the index 0.
Abzasc: Maybe because I'm getting the name of the object, not the value? Then how do I get the value correctly? Confused, it seems.
You are comparing the sub-window numbers in which the objects are drawn. If in one, the function ObjectFind(); returns the number of that window and it will be the same for the two values being compared. Thus you are comparing window numbers. And most likely the same window with itself...
Do you want the total profit of all open positions, or do you want to put a stop on each one when it reaches 20 pips in profit?
Hi. There is an arbitrage strategy, is it perfect? I.e. is it unreal to lose on it or does the price not always reach the right level?
Thank you
I'm doing it wrong again :(
Why isn't it comparing?
I've commented out, I compare 2 values - it always draws the last one...for each one to put its own stop when it reaches 20 pips profit
Igor Kim has a function that sets a stop at the Breakeven level for a given number of pips (it can also be set):
Function MovingInWL()
I'm doing it wrong again :(
Why doesn't it compare?
I've commented out unnecessary, I compare 2 values - always the last one is drawn...Interesting... ObjectFind(); returns the number of the chart subwindow where this object is found:
Search for an object with the specified name. The function returns the index of the window to which the object belongs. If it fails, the function will return -1. Call the GetLastError() function to get more information about the error. The chart subwindows (if there are indicator subwindows in the chart) are numbered starting from 1. The main chart subwindow is always present and has the index 0.
And what are you comparing it to?
I find this construction a bit strange. Why normalize the subwindow number(int), moreover, converted into double , and by the StrToDouble() function?
Why doesn't it compare?
It's interesting... ObjectFind(); returns chart subwindow number
:) I was reading the help too :)
There are text objects, I need to compare them (numbers). How?
One indicator draws a table and the other one has to calculate it.
Maybe because I'm getting the name of the object, not the value? Then how do I get the value correctly? Confused, it seems.
:) I was reading the help too :)
There are text objects, I need to compare them (numbers). How?