close code

 
I am trying to generate stoploss code. If 1% loss occurs, the position should be closed. but I want it according to the closing price. that is, not just any price in the bar. The position should be closed only if the closing price is at 1% loss.
 
  1. Wait for the candle to close, and then you have your price. or:

  2. You can't know when a candle closes. Only when a new tick arrives that starts a new bar is the old bar closed.

    Wait until you are close to the end of the bar and then check. You may want to use the timer as there can be minutes between ticks during the Asian session

 
William Roeder :
  1. Mumun kapanmasını bekleyin ve ardından fiyatınızı alın. veya:

  2. Bir mumun ne zaman kapandığını bilemezsiniz. Sadece yeni bir bar ortaya çıktığında eski bar kapanır.

    Çubuğun için yaklaşana kadar bekleyin ve ardından kontrol edin . Asya seansı sırasında tikler arasında dakikalar olabileceğinden zamanını kullanmak isteyebilirsiniz.

Should I use 'close' or 'iclose' as the closing code?

 
Kutluhan Yesilkaya: Should I use 'close' or 'iclose' as the closing code?

Yes

Reason: