Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 257
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 want to do the following!
When opened first trade at price for example 1.23455, I want that the second trade would be opened when the price will go to 1.23415
double lastTPask1=NormalizeDouble(Ask-40*Point,Digits);
if (RSI0<RSIDownLevel&&RSIDownLevel<=RSI1){
TP=NormalizeDouble(Ask+takeprofit*Point,Digits);
if (OrderSend(Symbol(),OP_BUY,Lot,NormalizeDouble(Ask,Digits),slippage,0,TP,NULL,Magic)==-1)Print(GetLastError());
if (positionTPask1>lastTPask1){
if (takeprofit!=0)TPm=NormalizeDouble(Ask+takeprofit*Point,Digits);
if (OrderSend(Symbol(),OP_BUY,Lot,NormalizeDouble(Ask,Digits),slippage,0,TPm,NULL,Magic)==-1) Print(GetLastError());
}}
Is this correct? Check it out...
sviter-pro:
And I have 2 orders open at once at the same price...Здраствуйте еще раз! Помогите с этой банальностью для вас, ато я разобраться не могу....
Хочу сделать следующее!
Когда открывается первая сделка по цене к примеру 1.23455, то хочу что бы вторая сделка открывалась когда цена пойдет на 1.23415
Is it done right? Would you look at this...
In the first line, I saw a strange thing. I did not look further.
What's this for?
On a calculator, multiply Ask by Point
I have a very good idea of how to correctly paste the code.
Hello again! Help with this triviality for you, because I can't figure it out....
I want to do the following!
When my first order opens at 1.23455, I want my second order to open when the price will go to 1.23415
double lastTPask1=NormalizeDouble(Ask-40*Point,Digits);
if (RSI0<RSIDownLevel&&RSIDownLevel<=RSI1){
TP=NormalizeDouble(Ask+takeprofit*Point,Digits);
if (OrderSend(Symbol(),OP_BUY,Lot,NormalizeDouble(Ask,Digits),slippage,0,TP,NULL,Magic)==-1)Print(GetLastError());
if (positionTPask1>lastTPask1){
if (takeprofit!=0)TPm=NormalizeDouble(Ask+takeprofit*Point,Digits);
if (OrderSend(Symbol(),OP_BUY,Lot,NormalizeDouble(Ask,Digits),slippage,0,TPm,NULL,Magic)==-1) Print(GetLastError());
}}
Is this correct? Please check...
I haven't worked with indicators much, so this may be a simple question, how do I disable the display of the graphical buffer inthe Data window? I want to remove buffer 3 and 4, here is the code:
This is modified RSI - buffers are needed there, because calculation is based on past data and I don't want to change buffer size every time (if it is not graphical) and add new data there, so graphical buffers are convenient for my purposes.
You should not dance from Ask-40*Point, but from the opening price1position-40*Point.
So read the opening price and dance....
I haven't worked with indicators much, so this may be a simple question, how do I disable the display of the graphical buffer inthe Data window? I want to remove buffer 3 and 4, here is the code:
This is a modified RSI - buffers are needed there, because calculation is based on past data and I don't want to change buffer size every time (if it is not graphical) and add new data there, so graphical buffers are convenient for my purposes.
I don't know if I understood you correctly.
Try it like this:#property indicator_buffers 2
I don't know if I've got it right.
Try it like this:#property indicator_buffers 2
It seems you are right! And out of the goodness of my heart, I thought it had to be declared if a graphical buffer was used for calculations.
Thanks!to disable the display in the Data window, do the following
To disable the output in the data window, do the following
Thank you. Will this move allow to see the buffers prohibited to output to the window via iCustom?
iCustom allows you to see only what is in the data window. The penultimate parameter of the function is exactly the number of the buffer visible in the data window