# Please Point me in the right direction

Hi

I'm stuck. I want my EA to place a order at a certain price level ( when price is close to multiple price points )

Example

double ClosePrice = iClose(_Symbol,PERIOD_CURRENT,1);

ClosePrice is curretly at 642882.51

When ClosePrice comes within 400 points of 648200.00 place order, but it needs to place a order when it comes close to 638200, 648200, 658200 etc.

I don't need someone to code it for me, but just point me in the right direction please.

:-) dont judge my coding.

```// import Trade Library

void OnTick()
{

double Bid=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits);     //get Bid price
double Balance=AccountInfoDouble(ACCOUNT_BALANCE);     //get account balance
double Equity=AccountInfoDouble(ACCOUNT_EQUITY);       //get account equity
double ClosePrice = iClose(_Symbol,PERIOD_CURRENT,1);  //last candle close price
double LS = 8500;
double LE = 1298200;
double BuyDif = (LS - ClosePrice);                     //get the var in price for last candle close vs lines
double SellDif = (ClosePrice - LS);                    //get the var in price for last candle close vs lin

for(LS;ClosePrice<=LE;LS=LS+10000)
{
Print("Price is ",LS);

if (PositionsTotal()==0)  //no open positions

if (PositionsTotal()==0)  //no open positions

if (SellDif >= 0 && SellDif <= 400.00)

break;
// set a trailing stop

}
}

{
//set the stoploss to 150 points

//go through all positions
for(int i=PositionsTotal()-1; i>=0; i--)
{
string symbol=PositionGetSymbol(i);    //get the symbol of the position

if (_Symbol==symbol)    //if currency pair is equal

{
//get the ticket number
ulong PositionTicket=PositionGetInteger(POSITION_TICKET);

//calculate the current stoploss

{
//move the stoploss
}
} //end if loop

} //end for loop

double Bid=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits);     //get Bid price

// set a trailing stop
CheckSellTrailingStop(Bid);

}

///////////////////////////////////////////////////////////////////////////////////Sell Trailing Stop
void CheckSellTrailingStop(double Bid)

{
//set the stoploss to 150 points
double SL=NormalizeDouble(Bid+1000,_Digits);

//go through all positions
for(int i=PositionsTotal()-1; i>=0; i--)
{
string symbol=PositionGetSymbol(i);    //get the symbol of the position

if (_Symbol==symbol)    //if currency pair is equal

if (PositionGetInteger(POSITION_TYPE)==ORDER_TYPE_SELL)   //if its a Sell Order

{
//get the ticket number
ulong PositionTicket=PositionGetInteger(POSITION_TICKET);

//calculate the current stoploss
double CurrentSellStopLoss=PositionGetDouble(POSITION_SL);

if (CurrentSellStopLoss>SL)
{
//move the stoploss