My stoploss code is not working - page 2

 
bool IsNewBar()
  {
   // your new bar detection code here
  }

void OnTick()
  {
   bool isNewBar=IsNewBar(); // find it in the forum
   if(isNewBar)
     {
      double closePrice=iClose(NULL,0,1); // last bar's close
      // calculate loss of any open position here
     }
  ...

Learn to code or have someone code it for you.

 
lippmaje:

Learn to code or have someone code it for you.

I'm trying to learn to code, but I need support. gave 3 errors againI'm trying to learn to code, but I need support. gave 3 errors again

 
Kutluhan Yesilkaya: I'm trying to learn to code, but I need support. gave 3 errors again
  1. Don't post pictures of code, they are too hard to read.

    Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
              Messages Editor


  2. You are missing the closing bracket of OnTick.

  3. MT4: Learn to code it.
    MT5: Begin learning to code it.

    If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.