- Use the SRC button if yo0u post code
- May be you should start reading the reference and the examples there
- Use and study the examples in from ..\Experts and ..\Indicators
- Learn to understand the error messages of the compiler
- What tick do you mean Bid or Ask?
- ...
BinarySchool: after that need to find current candle's high to sell order or current candle’s low to buy order in same current candle. How to write code? double tickNext;
|
|
if(Buy Condition Come true) //buy { static double LastAsk=Ask; double CurrentAsk=Bid; if(CurrentAsk<LastAsk) { LastAsk=CurrentAsk; } if(CurrentAsk>(LastAsk+2*Point)) { tkt=OrderSend(Symbol(),OP_BUY,Lots,NormalizeDouble(Ask,Digits),0,0,0,"BO exp:"+IntegerToString(BOExpiry*60),0,0,clrGreen); } } if(Sell Condition Come true)//Sell { static double LastBid=Bid; double CurrentBid=Ask; if(CurrentBid>LastBid) { LastBid=CurrentBid; } if(CurrentBid<(LastBid-2*Point)) { tkt=OrderSend(Symbol(),OP_SELL,Lots,NormalizeDouble(Bid,Digits),0,0,0,"BO exp:"+IntegerToString(BOExpiry*60),0,0,clrRed); } }

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
when some condition come true and after that need to find current candle's high to sell order or current candle’s low to buy order in same current candle. How to write code?
please guide me.
void OnStart()
{
double tickLast;
double tickCurrent;
double tickNext;
if(tickLast < tickCurrent > tickNext)
{
Sell Order
}
if(tickLast > tickCurrent < tickNext)
{
Buy Order
}
return(0);
}