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

 
evillive:

Read the difference between string and interleaver, you should probably declare variables as string type if they are to be output

Yes!) I already understood it, fixed it, but only part of warnings disappeared. But in the code where TimeCurrent()... , sell1>0... , sell2>0... , rsi>0 - the warning implicit conversion from 'number' to 'string' remains
.
 
halk2009:
Yes!) I've already understood that, fixed it, but only part of the warning is gone. But where in code TimeCurrent()... , sell1>0... , sell2>0... , rsi>0 - the warning implicit conversion from 'number' to 'string' remains
.

So convert the data type to the type of variables you are writing the data into.
 
Hello. I don't understand, if the button object is set to background colour (blue) and frame colour (red), I can't see if it's clicked or not. There is no mention in the documentation of changing the colour when clicked.
 
evillive:
So, convert the type of data to the type of variables you're writing it to.

I put zeros in double quotation marks, and on date output I wrote through the variable string MT_time = TimeToString(TimeCurrent());

Thank you! Now everything works!

 
How do I know the symbol restrictions (full access, close only, etc.)? Of course programmatically, but I don't know how to do it with my eyes either.
 
joo:
How do I know the symbol restrictions (full access, close only, etc.)? Of course programmatically, however I don't know how to do it with my eyes.

Eye - in the list of symbols to look at the tooltip when hovering the cursor on the symbol.


Also, forbidden to trade symbol is often painted more pale, but it depends on the dealer.

Programmatically:

if(SymbolInfoInteger(_Symbol,SYMBOL_TRADE_MODE)==SYMBOL_TRADE_MODE_DISABLED)
    Print("Торговать '",_Symbol,"' запрещено, только чтение");
 

Guys, please help. I am writing my first EA, which is incredibly simple, but there is something wrong with it.

1. It gives 2 warnings.

2) It does not open orders. There is an error in the stochastic data, I fixed it but it still gives me the same error.

Please help.

 

Good afternoon, part of the code below, the printers go through - all of them, regardless of the existing order, on Commment the value of the bans"Stop....." all constantly 0. What is wrong in the loop, please advise. In the tester.

for (index=0;index<total;index++)
{
if(OrderSelect(index,SELECT_BY_POS)==true && OrderSymbol()==Symbol())
{
if(OrderType()==OP_SELL||OrderType()==OP_SELLSTOP) StopOpenOrderSell=true;Print("Есть селл");
if(OrderType()!=OP_SELL||OrderType()!=OP_SELLSTOP) StopOpenOrderSell=false;Print("Нет селл");
if(OrderType()==OP_BUY||OrderType()==OP_BUYSTOP) StopOpenOrderBuy=true;Print("Есть бай");
if(OrderType()!=OP_BUY||OrderType()!=OP_BUYSTOP)StopOpenOrderBuy=false;Print("Нет бай");
}
}
 
Pokrov:

Good afternoon, part of the code below, the printers go through - all of them, regardless of the existing order, on Comment the values of the bans"Stop....." all constantly 0. What is wrong in the loop, please advise. In the tester.

The curly brackets are missing.

for (index=0;index<total;index++)
{
if(OrderSelect(index,SELECT_BY_POS)==true && OrderSymbol()==Symbol())
{
if(OrderType()==OP_SELL||OrderType()==OP_SELLSTOP) {StopOpenOrderSell=true;Print("Есть селл");}
if(OrderType()!=OP_SELL||OrderType()!=OP_SELLSTOP) {StopOpenOrderSell=false;Print("Нет селл");}
if(OrderType()==OP_BUY||OrderType()==OP_BUYSTOP) {StopOpenOrderBuy=true;Print("Есть бай");}
if(OrderType()!=OP_BUY||OrderType()!=OP_BUYSTOP){StopOpenOrderBuy=false;Print("Нет бай");}
}
}
 

Hello!

In my Expert Advisor, the previous candlestick is checked and if the conditions allow, the position is opened, if not, it is not opened. The problem is that the position is opened before the previous candle's condition is checked. Then I see the position opening in the journal and then I see that it should not be opened. How to fix it?