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
I dont? is there a function that "shows" the "wick-length"? and I can check that on the last bar when new bar is detected or something?
(Thank you very much for the arrayresize quick lesson :) )
I think sharing with you my goal would help this a lot.
I would like to identify the bars where ther last price is the highest or lowest in the bar (basicly that means in a japancandelstick graph that there is no little "wick"? or how its called on the top or bottom of the candle, coming to the conclusion that the market is on a up or down trend respectively (at least for the next few ticks) and I try to use zeromemory if i find newbars.
Opening the position and close it shortly after (with relativly low take profit)
Example for upper wick :
Example for upper wick :
Thank you, I think I follow all but one aspect of the example code you posted.
whats the reson for the For cycle? shouldn't I just use if(high[1]=close[1]) to determine if there is no "upper wick" and the same with CopyLow I assume? (since I want to see if the last closed bar had a wick at the end and try to open a position according to it on the next bar)
edit: or I misunderstand the meaning of high_ and low_ arrays , and also shouldn't i use MathMax if i search for the highest price that I want to check if its = to the close price?
Thank you, I think I follow all but one aspect of the example code you posted.
whats the reson for the For cycle? shouldn't I just use if(high[1]=close[1]) to determine if there is no "upper wick" and the same with CopyLow I assume? (since I want to see if the last closed bar had a wick at the end and try to open a position according to it on the next bar)
edit: or I misunderstand the meaning of high_ and low_ arrays , and also shouldn't i use MathMax if i search for the highest price that I want to check if its = to the close price?
Hopefully I succesfully handled the arrays, but I have one and a half problems.
The half problem is that the EA tries to open a position instantly when its started succesfully (I assume both arrayvalue is zero therefore they are equal, I should add if xy = 0 then return something)
but my real problem is that I get error 4756.
I found this articel about it: https://www.mql5.com/en/forum/5431
I had the ZeroMemory where the thread suggest it and changed int STP to double.
I can only suspect that I have some problem with my account settings (im on a demo account) but I have no idea what can cause it or even where should I look in to it)
Here is my code: (I even tried stoploss=0 from tha thread I linked)
and my OnTick:
PS.: I'm sorry if I should have opened a new thread for this, if a moderator comes along and tells me so I move it in to a new one, but I'm actually not sure if these are linked or not to the original problem, probably not.
PS2.: Also I know I should do the copied or not check somewhere after I actually copied....