"I think it's quite simple when you know how to program, but I am not a
programmer so i need some help."
.
At the top of every site page, you see Book -> click it and become at least a novice programmer OR many tutorials on web...
.
see also: https://www.mql5.com/en/forum/125104
.
enjoy the journey!
.
At the top of every site page, you see Book -> click it and become at least a novice programmer OR many tutorials on web...
.
see also: https://www.mql5.com/en/forum/125104
.
enjoy the journey!
What you start with is
int start() { int ticket,expiration; double point; //---- point=MarketInfo(Symbol(),MODE_POINT); expiration=CurTime()+PERIOD_D1*60; //---- while(true) { ticket=OrderSend(Symbol(),OP_SELLSTOP,1.0,Bid-100*point,0,0,0,"some comment",16384,expiration,Green); if(ticket<=0) Print("Error = ",GetLastError()); else { Print("ticket = ",ticket); break; } //---- 10 seconds wait Sleep(10000); } //---- return(0); }You are asking to change the OrderSendSend parameter Bid-100*point to the one pip above the current bar (here starts problems because the current bar is changing and the OrderSend parameters need to be a legal distance from the Ask/Bid price). The high of the current bar is High[0]. So replace "Bid-100*point" with High[0]+point

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
Right now the script makes a pending order 10 pips from the current price.
I need this script to be changed to be able to find out the high and the low of the current bar and then place one pending order 2 pips above the high of the bar and one pending order 2 pips below the low of the bar.
Can anyone help me with the code? I think it's quite simple when you know how to program, but I am not a programmer so i need some help.
Thanks!