[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 12

 

artem86 23.03.2012 09:28

Please tell me why I cannot open a deposit!


//--------------------------------------------------------------------
int start()
{
double Price =Ask+20*Point;
Alert (Price);


OrderSend(Symbol(), OP_BUYSTOP, 0.1, Price,2, Bid-15*Point, Bid+15*Point);
Alert (GetLastError();
return; // Exit from start()
}
//--------------------------------------------------------------------

I've been worried for two days!

 
Mathemat:


artem86 23.03.2012 09:28

Please tell me why I cannot open a deposit!


//--------------------------------------------------------------------
int start()
{
double Price =Ask+20*Point;
Alert (Price);


OrderSend(Symbol(), OP_BUYSTOP, 0.1, Price,2, Bid-15*Point, Bid+15*Point);
Alert (GetLastError();
return; // Exit from start()
}
//--------------------------------------------------------------------

I've been worried for two days!

And what is the error code? i assume wrong stops. Because you put both TP and SL for your order _below_ the opening price
 
ilunga: What's the error code? I'm guessing wrong stops. Because you put both TP and SL for your order _below_ the opening price
yep, just like there is no normalised price
 

Decided to start learning C,C++,C#, who can suggest a good compiler and editor.

Thank you.

 
Zhunko:

double Sredn(double& ArrSr[]) - I used the & sign that way.

 
TarasBY:

Vadim, you put such a small (&) that you can't see it straight away!..! :)))

I wonder how the author (in the author's version) this function was performed in one place and not in another! ;)

Apparently there was an error somewhere during transfer from Lib1. I'm trying to combine all similar functions into libraries now.
 
ilunga:

There is no error as such in calculating the whole indicator. Just think what is faster:

1) to count Bars (about 10000) bars every tick

2) count 20 bars 1 time per minute (or even more)

I understand the speed of execution. But it doesn't work at all) and I'm trying to understand what the fundamental error is.
 
r772ra:


I repeat, the opening price of OP_BUY==Ask, OP_SELL==Bid.

And you have Close[i].

It came from my indicator, I also wanted to make Ask's calculation, but it didn't work. I had to use Close.

I will try it that way.

 
A big THANK YOU to everyone for their help! I'm off to think things over)
 
rustein:

Decided to start learning C,C++,C#, who can suggest a good compiler and editor.

Thank you.

Of the proprietary ones, probably MS VisualStudio, there are also free ones, CodeBlocks, for example, is quite good.