[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 614

 
tolik73:
any tips for the newbie!!!! the advisor is disabled in the terminal but the stoploss is triggered is it possible ?

Of course it is.
 
tolik73:
any tips for the newbie!!!! the advisor is disabled in the terminal but the stoploss is triggered is it possible ?

Not possible, it is a must. Stop Loss is on the server and does not depend on the operation of your terminal, unlike the trailing stop.
 
lottamer:

and even though your code gave out 24 errors in the compiler!!! still thanks even for the careless help.... for the idea... (it works now - although I tried to do it that way in principle, but the punctuation was a problem)

actually this is your code , partially corrected by another person.
 
Help me write a script to display a line on the chart every week at the opening price of the week.
 

TarasBY

int init()

{

{
fGet_MineGV();
}
void fGet_MineGV (string fs_PrefName = "") // variable name prefix
{
string ls_Name = StringConcatenate (fs_PrefName, Symbol(), "_N_1");
if(GlobalVariableCheck (ls_Name) SUA = GlobalVariableGet (ls_Name);
ls_Name = StringConcatenate (fs_PrefName, Symbol(), "_N_2");
if (GlobalVariableCheck (ls_Name)) SUA1 = GlobalVariableGet (ls_Name);
ls_Name = StringConcatenate (fs_PrefName, Symbol(), "_N_3");
if (GlobalVariableCheck (ls_Name)) BUA = GlobalVariableGet (ls_Name);
ls_Name = StringConcatenate (fs_PrefName, Symbol(), "_N_4");
if (GlobalVariableCheck (ls_Name)) BUA1 = GlobalVariableGet (ls_Name);
//----
}

//... there's more...

}

second part in int start()

Is what's done right?

 
Macros:
Help me write a script to display a line on the chart every week at the opening price of the week.

Can you help or write it? If help, what have you already written?
 
xant:

TarasBY

second part in int start()

Is what's done right?

If this init():
int init()
{
    {
    fGet_MineGV();
    }
    void fGet_MineGV (string fs_PrefName = "") // префикс имени переменной
    {
        string ls_Name = StringConcatenate (fs_PrefName, Symbol(), "_N_1");
        if (GlobalVariableCheck (ls_Name)) SUA = GlobalVariableGet (ls_Name);
        ls_Name = StringConcatenate (fs_PrefName, Symbol(), "_N_2");
        if (GlobalVariableCheck (ls_Name)) SUA1 = GlobalVariableGet (ls_Name);
        ls_Name = StringConcatenate (fs_PrefName, Symbol(), "_N_3");
        if (GlobalVariableCheck (ls_Name)) BUA = GlobalVariableGet (ls_Name);
        ls_Name = StringConcatenate (fs_PrefName, Symbol(), "_N_4");
        if (GlobalVariableCheck (ls_Name)) BUA1 = GlobalVariableGet (ls_Name);
        //----
    }
    //... там еще много чего...
}

I recommend you to look for a difference between what I have written and what you have done. And do it the way I wrote. I can't help you with anything else.

 
xant:

TarasBY

int init()

{

{
fGet_MineGV();
}
void fGet_MineGV (string fs_PrefName = "") // variable name prefix
{
string ls_Name = StringConcatenate (fs_PrefName, Symbol(), "_N_1");
if (GlobalVariableCheck (ls_Name)) SUA = GlobalVariableGet (ls_Name);
ls_Name = StringConcatenate (fs_PrefName, Symbol(), "_N_2");
if (GlobalVariableCheck (ls_Name)) SUA1 = GlobalVariableGet (ls_Name);
ls_Name = StringConcatenate (fs_PrefName, Symbol(), "_N_3");
if (GlobalVariableCheck (ls_Name)) BUA = GlobalVariableGet (ls_Name);
ls_Name = StringConcatenate (fs_PrefName, Symbol(), "_N_4");
if (GlobalVariableCheck (ls_Name)) BUA1 = GlobalVariableGet (ls_Name);
//----
}

//... there's more...

}

second part in int start()

Is what's done right?



In general {} they're not for beauty.
 

Gentlemen, I suddenly encountered a problem. Quite unexpectedly. I mean where I didn't expect it...

I want to check the level of stop loss on the current symbol this way:

int init()
  {
   step=MarketInfo(Symbol(),MODE_STOPLEVEL);
   Comment("Стоп не ближе ",step," пунктов, Текущий символ ",Symbol());
  }

but during the test I get zero on the screen.

While replacing MODE_STOPLEVEL with MODE_SPREAD, viz:

int init()
  {
   step=MarketInfo(Symbol(),MODE_SPREAD);
   Comment("Стоп не ближе ",step," пунктов, Текущий символ ",Symbol());
  }

Outputs a normalhuman digit.

Alpari, five digits, floating spread. Can their stoplevel be equal to zero? I don't think so...

 
ECN account?