FORTS: To help beginners - page 6

 

Build 1340.

In my experience, it changes in Forex, but may or may not change in FORTS. It changes when the overlap volume has been split and the overlapping trade is of IN type.

Let me give you an example.


There are 2 orders in the Figure (extract from history). The first one is a purchase of 12 contracts. It is executed in portions: the first portion is of the OUT type and the second is of the IN/OUT type. I.e. when the first part has been filled in the market, the previous position has not been completely closed anyway. That is why the second one is IN/OUT. The ID does not change here.

Now for the sale of 2 contracts. It also consists of 2 parts. The first part has completely closed the previous position, so the second part is of the IN type. The ID changes here.


The developer's comment on it is interesting.

 
Dennis Kirichenko:

Build 1340.

In my experience, it changes in Forex, but may or may not change in FORTS. It changes when the overlap volume has been split and the overlapping trade is of IN type.

Let me give you an example.


There are 2 orders in the Figure (extract from history). The first one is a purchase of 12 contracts. It is executed in portions: the first portion is of the OUT type and the second is of the IN/OUT type. I.e. when the first part has been filled in the market, the previous position has not been completely closed anyway. That is why the second one is IN/OUT. The ID does not change here.

Now for the sale of 2 contracts. It also consists of 2 parts. The first part has completely closed the previous position, so the second part is of the IN type. The ID changes here.


The developer's comment on it is interesting.

And you can attach the terminal log for this time (it is interesting what kind of operations you performed and what position was on this instrument before the trades).
 
Can you tell me if it is possible to connect to several signal sellers on one trading account to create an investment portfolio on one account?
 
Taras Petryliak:
Can I connect to several signal sellers on one trading account to create an investment portfolio on one account?
You cannot do it with standard tools.
 
Michael, thank you very much!
 
Mikhail Filimonov:

Frequently used and useful functions:

Redesigned GetPositionPrice() function:

ok, only forgot to select the position, but in general, of course, thanks...

  PositionSelect(aSymbol); 
  ulong pos_id = ulong(PositionGetInteger(POSITION_IDENTIFIER) );
 
Has anyone tried to place a buy stop limit and sal stop limit order? I can't get it to work.
 
TYRBO:
Has anyone tried to place a buy stop limit and sell stop limit order? I can't get it to work.
Where's the code?
 

I am just starting to write, please don't scold me too much, I indent the opening price with an error

void PlaceOrder( string aSymbol,double volume, double price, ENUM_ORDER_TYPE type,int magic,string comment )
{
MqlTradeRequest request = {0};
MqlTradeResult result = {0};
ulong ticket = 0;
//--- Fill structure
request.action = TRADE_ACTION_PENDING;
request.symbol = aSymbol;
request.volume = volume;
request.price = price;
request.type = type;
request.magic = magic;
request.comment = comment;
request.type_filling = ORDER_FILLING_RETURN;
request.type_time = ORDER_TIME_DAY;
//--- Send order
if ( OrderSend( request, result )
{
if ( result.retcode == TRADE_RETCODE_PLACED )
{
ticket = result.order;
}
else
{
Print("PlaceOrder: Order not set!" );
}
}
else
{
Print( "PlaceOrder: The order has not been sent!" );
}
}
 
Anyone have any tips on how to get it right?