forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Expert Advisor Modifications → Ea Studio with Indices ?

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 15

Topic: Ea Studio with Indices ?

Hi,

i have generated strategies on Dax. But my Problem is Stop Loss and Take Profit cause they are in Pips. I have checked out if i enter 10000 pips it is like 100 points.  What kind of code did i have to change in exported strategie that i can input points instead of pips.

Re: Ea Studio with Indices ?

SL and TP are in pips. The conversion between pips and points depends on the number of the decimal digits.

If the broker quotes on 2 or 4 digits, pip = point.
If it is 3 or 5 digits, pip = 10 x point

Re: Ea Studio with Indices ?

Popov wrote:

SL and TP are in pips. The conversion between pips and points depends on the number of the decimal digits.

If the broker quotes on 2 or 4 digits, pip = point.
If it is 3 or 5 digits, pip = 10 x point

So when it quotes on 2 digits what i have to change?

Re: Ea Studio with Indices ?

So when it quotes on 2 digits what i have to change?

Just enter the Stop Loss value you want.

If you have questions, please post screenshots and we will help.

Re: Ea Studio with Indices ?

@Popov: The DAX does not have any decimal digits on most brokers, it is quoted in whole numbers just like at the stock exchange (for example: 8143). It seems like FSB / EA Studio are unable to handle this situation in where there are 0 digits after the comma.

Re: Ea Studio with Indices ?

If you have digits set to 0, it must correctly.

What issue do you experience with such symbols?

Re: Ea Studio with Indices ?

OK, I will report back this evening when I have fully tested it. My broker quotes the DAX with 1 digit after the comma.

Re: Ea Studio with Indices ?

double GetPipValue(int digit)
  {
   if(digit==2 || digit==1)
      return (1);
   return (1);
  }

I have changed this part and it is working. Now i can set input values in points Is there any future updates for eastudio that we can distinguish between forex and indices?

Re: Ea Studio with Indices ?

I'll check what is the problem when digits = 0.

Re: Ea Studio with Indices ?

isn't it better to say directly in the onInit()

pip       = _Point;

instead of

   pip       = GetPipValue()

11 (edited by deadlef 2018-04-05 08:21:54)

Re: Ea Studio with Indices ?

i have checked the data

2018.04.05 09:17:13.932    2015.02.16 18:00:00  test [DAX30],H1: Contract specification for [DAX30]:
   SYMBOL_DIGITS = 2 (number of digits after the decimal point)
   SYMBOL_POINT = 0.01 (point value)
   SYMBOL_SPREAD = 80 (current spread in points)
   SYMBOL_TRADE_STOPS_LEVEL = 0 (minimal indention in points for Stop orders)
   SYMBOL_TRADE_CONTRACT_SIZE = 1 (contract size)
   SYMBOL_TRADE_TICK_SIZE = 0.010000 (minimal price change)
   SYMBOL_SWAP_MODE = 2 (by interest)
   SYMBOL_SWAP_LONG = -1.130000 (buy order swap value

did i have to change this now like that?

double GetPipValue(int digit)
  {
   if(digit==2 || digit==1)
      return (0.01); //   SYMBOL_POINT = 0.01 (point value)
   return (1);
  }

Re: Ea Studio with Indices ?

The original code must work well.

   if(digit==2 || digit==3)
      return (0.01);

I don't see discrepancy here. What is the exact problem you want to solve?

Re: Ea Studio with Indices ?

double GetPipValue(int digit)
  {
  pip =_Point;
if(digit==2 || digit==4 || digit==6) pip = 100*_Point;
else if( digit==1 || digit==3 || digit==5) pip = _Point;
return(pip);
  }

Thats the code ..can someone check if it work in dax or dow with 1 digit

14 (edited by deadlef 2018-04-05 12:18:46)

Re: Ea Studio with Indices ?

Popov wrote:

The original code must work well.

   if(digit==2 || digit==3)
      return (0.01);

I don't see discrepancy here. What is the exact problem you want to solve?

Indices are working in points, so i want to chamnge the input value in points instead of pips. and 80 points are 8000 pips. but instead of 8000 want to enter points. and that must be calculated automatically for different brokers and different indices

Re: Ea Studio with Indices ?

i have checked with gold...

Thats Gold settings from broker:

2018.04.05 21:17:47.424    test GOLD,H4: Contract specification for GOLD:
   SYMBOL_DIGITS = 3 (number of digits after the decimal point)
   SYMBOL_POINT = 0.001 (point value)
   SYMBOL_SPREAD = 210 (current spread in points)
   SYMBOL_TRADE_STOPS_LEVEL = 0 (minimal indention in points for Stop orders)
   SYMBOL_TRADE_CONTRACT_SIZE = 100 (contract size)
   SYMBOL_TRADE_TICK_SIZE = 0.001000 (minimal price change)
   SYMBOL_SWAP_MODE = 0 (in points)
   SYMBOL_SWAP_LONG = -70.800000 (buy order swap value)
   SYMBOL_SWAP_SHORT 

when i enter now 100 pips stop loss i get this results

https://s17.postimg.org/p2ncqs8rf/digit.png

shouldnt be 100 pips Gold price: 323.144 than 100pips 323.044 but instead of that it is like in the picture. so is that pip or point?

Posts: 15

Pages 1

You must login or register to post a reply

Forex Software → Expert Advisor Modifications → Ea Studio with Indices ?

Similar topics in this forum