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
All chart events will reset your X,Y coordinates since you commented out the event filter
So imagine a keystroke event setting your x and y to the values appropriate for said event. Now your previous x,y value are overwritten with the wrong type inputs.
All chart events will reset your X,Y coordinates since you commented out the event filter
So imagine a keystroke event setting your x and y to the values appropriate for said event. Now your previous x,y value are overwritten with the wrong type inputs.
Yeah, now I see my wrong thinking, coz I closed bracket after ChartXYToTimePrice as bellow and values was 0, now moved initialization to the global and I have what I should have.
Will test rest of code around live trading.
Thx for uncache me ;]@nicholi shen
Can you confirm for me that trading with repeating of keys like B-buy or S-sell working corect? Coz for me orders are placed only once in case that function by keys is call everytime, eg. modify order working always just order send of any of type working once time.
@nicholi shen
Can you confirm for me that trading with repeating of keys like B-buy or S-sell working corect? Coz for me orders are placed only once in case that function by keys is call everytime, eg. modify order working always just order send of any of type working once time.
Sure post your code.
BTW.. strange, that the convention is diffrent
https://docs.mql4.com/chart_operations/charttimepricetoxy
https://docs.mql4.com/chart_operations/chartxytotimeprice
And '0' - variable expected in ChartXYToTimePrice, so can't be
bool XYtoCTP = ChartXYToTimePrice(0,x,y,0,dt_x,price_y);
must be
int window = 0;
bool XYtoCTP = ChartXYToTimePrice(0,x,y,window,dt_x,price_y);
..heh.. gifts from MQ
Sure post your code.
It was posted in previous post.
In case that ChartXYToTimePrice was related in problem with variables trading calls by keys was ok, just the problem with repeating.
It was posted in previous post.
In case that ChartXYToTimePrice was related in problem with variables trading calls by keys was ok, just the problem with repeating.
You posted a tiny snippet. Need the whole program.
You posted a tiny snippet. Need the whole program.
The snipet was all of program that have problem : )
In attachemnt file of this EA.
The snipet was all of program that have problem : )
In attachemnt file of this EA.
Ok, so here's my feedback.
You need to learn how to use the debugger to step into and trace bugs in your code. Not only do you have an error in the scope of the block that manages the XY to TimePrice, but there are errors in multiple functions; too many for me to continue debugging your code -- but here's just one example.
You are abusing global variables which will always cause you issues. Global variables should be limited as much as possible and should really only be const values. Also you should name them using the convention-prefix of "g_" + "variable_name" (g_variable) so you can figure out which ones are global vs local.