Questions from Beginners MQL5 MT5 MetaTrader 5 - page 427

 
-Aleks-:
This is a profile setting, not sure if it can be changed via MQL without intervening in the code... It is possible to open a new profile programmatically.
The profile changes the colour of stops for all trades at once. And I would like to set a separate one for each of them
 
gammaray:
The profile changes the colour of stops on all trades at once. And I would like to set a separate one for each
It's clear - you can't. You can use graphical objects... for debugging.
 
gammaray:
This profile changes colour of stops for all trades at once. And I would like to set a separate one for each

I use an open order (where I set the colour of deal), then I modify 2 take profit (TP colour) and modify stoploss (SL colour), but it gets small line only on the bar which I modify.

 
-Aleks-:
It's understandable - you can't. You can use graphical objects... for debugging.
Yes, already thinking about drawing OBJ_HLINE in each tick in different colours
 
Leanid Aladzyeu:

I use an open order (where I set the colour of the deal), then I modify 2 take profit (I write the colour of TP) and modify the stop loss (I write the colour of SL), but it gets a small line only on the bar which I modify.

Unfortunately it is only a modification and one little dash at the moment of its execution. And I need to see the real current order as a horizontal line of appropriate colour. There is always more than one order and I want to distinguish their stops
 

can't figure it out, please help)

Opening an order:

ZeroMemory(request); 

double bid=(double)SymbolInfoDouble(name,SYMBOL_BID);

request.action=TRADE_ACTION_DEAL;

request.type=ORDER_TYPE_BUY; 

 request.symbol="EURUSD";

request.deviation=30;

request.sl=SLSell;

request.tp=TPSell;

request.volume=0.001;

request.price=bid;

request.type_filling=ORDER_FILLING_FOK;

request.expiration=ORDER_TIME_DAY;

if(OrderCheck(request,result_ch)==false)

     { answer=result_ch.retcode;

      Print ("OrderCheck выявил ошибку: "+IntegerToString(answer)+" / "+result_ch.comment);      }

OrderSend(request,result); 

Print(__FUNCTION__,": ",result.comment," код ответа ",result.retcode,"  end orderopen");

In the log I get:

Ask 1.12759

SLBuy 1.10746

TPBuy 1.14746

OrderCheck identified error: 0 / comment (operation executed successfully)

OrderOpenBuy: AutoTrading disabled by client response code 10027 (AutoTrading disabled)

AutoTrading enabled.

Where is error?

 
pr0gre5:

can't figure it out, please help)

Opening an order:

In the log I get:

Ask 1.12759

SLBuy 1.10746

TPBuy 1.14746

OrderCheck identified error: 0 / comment (operation executed successfully)

OrderOpenBuy: AutoTrading disabled by client response code 10027 (AutoTrading disabled)

AutoTrading enabled.

Where is error?

on the chart right mouse/advisors/properties - highlight checkbox"Allow EA to trade"
 
pr0gre5:

can't figure it out, please help)

Opening an order:

In the log I get:

Ask 1.12759

SLBuy 1.10746

TPBuy 1.14746

OrderCheck identified error: 0 / comment (operation executed successfully)

OrderOpenBuy: AutoTrading disabled by client response code 10027(AutoTrading disabled)

AutoTrading enabled.

Where is error?

Is EA trading allowed on the trading server at the DC?
 

working on a demo account, opened a new demo account MetaQuotes demo,

reinstalled the program)

The problem is still there.

 
pr0gre5:

working on a demo account, opened a new demo account MetaQuotes demo,

reinstalled the program)

The problem still exists.

Forum on trading, automated trading systems & strategy trading test

Questions from Beginners

new-rena, 2015.09.01 20:06

on the chart right mouse/advisors/properties - highlight"allow EA to trade" checkbox

Auto trading enabled:

auto trade

?

Reason: