Where to set up variable parameters ?

 

Hi there !

Were do I configure the pink fields ?

Where do I set its parameters ? (_Points and _Digits)

Thanks !

mrequest.sl=NormalizeDouble(price_info.bid+stop_loss*_Point,_Digits);   // Stop Loss (SELL)
 
YouTrade:

Hi there !

Were do I configure the pink fields ?

Where do I set its parameters ? (_Points and _Digits)

Thanks !

It's not clear what is your question.
 
YouTrade:

Hi there !

Were do I configure the pink fields ?

Where do I set its parameters ? (_Points and _Digits)

Thanks !

You cannot change these values... they depend on the symbol you're using...
 
angevoyageur:
It's not clear what is your question.

Sorry ... I am trying to trade WINM14 and WDOM14 (dollar).

I cannot use the same EA because the SL gives me an error.

Further investigation shown the problem is the _Digits and _Point. Depending on the instrument I have to change it.

Question is ... How can I change it ? :)

 
Malacarne:
You cannot change these values... they depend on the symbol you're using...

So what is the "best practice" here ?

Use an external variable ?

 
YouTrade:

So what is the "best practice" here ?

Use an external variable ?

What exactly are you trying to do ?
 
Malacarne:
What exactly are you trying to do ?
   if(StringSubstr(_Symbol,0,3)=="WIN")
     {
      pontos=0.001;
      digitos=3;
     }

   if(StringSubstr(_Symbol,0,3)=="WDO")
     {
      pontos=1;
      digitos=0;
     }

(...)

To replace here (*)

mrequest.sl=NormalizeDouble(price_info.bid+stop_loss*_Point,_Digits);   // Stop Loss (SELL)
 
YouTrade:

Hummm... Now we're talking about the so-called "market knowledge", and it's not related to programming anymore... :-)

So, my question to you is: how many decimal places do "WIN" and "WDO" have ??

Another question: what is the usage you're trying to make out of _Point?

 
Malacarne:

Hummm... Now we're talking about the so-called "market knowledge", and it's not related to programming anymore... :-)

So, my question to you is: how many decimal places do "WIN" and "WDO" have ??

Another question: what is the usage you're trying to make out of _Point?

Solved ! Thank you !
Reason: