how to get Last tick,Current tick and Next tick value in current candle?

43

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?

void OnStart()
{
double tickLast;
double tickCurrent;
double tickNext;

if(tickLast < tickCurrent > tickNext)
{
Sell Order
}

if(tickLast > tickCurrent < tickNext)
{
}

return(0);
}

7109

1. Use the SRC button if yo0u post code
2. May be you should start reading the reference and the examples there
3. Use and study the examples in from ..\Experts and ..\Indicators
4. Learn to understand the error messages of the compiler
5. What tick do you mean Bid or Ask?
6. ...
15592

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(tickLast < tickCurrent > tickNext)

 Play video Please edit your post. For large amounts of code, attach it.

1. The "current candle's high" could change because the candle is still forming. And the current candle's high may nor may not be the same as the current tick.
2. You have only four choices: We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using SRC) and the nature of your problem.
3. There is no tickNext, the future is not knowable. If you save the current tick (static/global) then, when you get a new tick, you have the last tick.
4. Last line is meaningless, learn to code. True = 1 and false = 0 so you get
 ```if( 3 < 2 < 1 ) if( false < 1 ) if(     0 < 1 ) if(     true  )``` ```if( 3 > 2 > 1 ) if( true > 1 ) if(     1 > 1 ) if(     false ) ```
43

```if(Buy Condition Come true) //buy
{

{
}
{
}
}

if(Sell Condition Come true)//Sell
{
static double LastBid=Bid;