Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 826

 
pycha:

I don't know why it would do that if it worked correctly before.

There are older versions of EA where MODE_TICKVALUE did not exactly return zero but the correct value. now it returns zero. it looks like something is wrong with the terminal. who can tell me how to fix it?

Contact the service desk in the private area on the 5th!
 
The problem is solved in a strange way. been testing on a demo account for a week now and a couple of days ago started to return zero. now switched to a real one, just in case - it showed correct. switched back to a demo account - all shows correct. anyway sorry for wasting a bit of time))))
 

Help, code like this:

(I don't know where or how to write the end of line sign, so that new data is written on a new line)

void OnStart()
  {
   int file_handle=FileOpen("16.csv",FILE_WRITE|FILE_CSV);
   FileWrite(file_handle,Symbol());
   FileClose(file_handle);
  }
 

Already racking my brain! Please help.

This code does not open the order.

In my journal it says: '1419717': order buy 0.01 EURUSD opening at market sl: 1.13720 tp: 1.13842 failed [Invalid S/L or T/P]

I don't understand what kind of mistake I made at stoploss or takeprofit?

double Lots=0.01;
double TakeProfit=100;
double StopLoss=10;
int tk=0;

void start()
{
   if (OrdersTotal()==0)
      {
         tk=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-StopLoss*Point,Ask+TakeProfit*Point,0,0,0,Green);
         if(tk<0) 
         {
            Print("OrderSend завершилась с ошибкой #",GetLastError());
         }
         else         
         {
            Print("Функция OrderSend успешно выполнена");
         }
      }
}

 
qee:

Help, code like this:

(I don't know where or how to write the end of line sign, so that new data is written on a new line)

Where you got it from, ask there!
 
favidu:

Already racking my brain! Please help.

This code does not open the order.

In my journal it says: '1419717': order buy 0.01 EURUSD opening at market sl: 1.13720 tp: 1.13842 failed [Invalid S/L or T/P]

I don't understand what kind of mistake I made at stoploss or takeprofit?


Stops and Take Profit should be normalized!
 

Hello! I don't understand why an error is coming up when declaring an array outside of functions.

Error: '[' - invalid index value

How do I declare a two-dimensional non-dynamic array with variables as indexes?

I tried setting const instead of static. I also tried [][]. Still an error (

Poke a tutorial where to look up this question once and for all, please.

//--- глобальные переменные
static int      time_frame;

static int      initial_history_bars = MathFloor(initial_history_hours / time_frame * 60);

double initial_population_array[][ initial_history_bars];
 
alexeymosc:

Hello! I don't understand why an error is coming up when declaring an array outside of functions.

Error: '[' - invalid index value

How do I declare a two-dimensional non-dynamic array with variables as indexes?

I tried setting const instead of static. I also tried [][]. Still an error (

Poke a tutorial where to look up this question once and for all, please.


In the last line, there are a lot of brackets. Maybe try removing the empty ones.
 
alexeymosc:

Hello! I don't understand why an error is coming up when declaring an array outside of functions.

Error: '[' - invalid index value

How do I declare a two-dimensional non-dynamic array with variables as indexes?

I tried setting const instead of static. I also tried [][]. Still an error (

Poke a tutorial where to look up this question once and for all, please.

:From the link maybe ?
 
Veterros:

In the last line, there are a lot of brackets. Maybe try removing the empty ones.
You can never have too many brackets, as long as there are as many opening and closing brackets as there are closing brackets.
Reason: