[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 766

 
FoxUA:

No, the code I posted last opens without errors, but opens only on sell data there is a clipping from the log and this is not the correct price distribution I described here is the problem

Here they are.

PRAskL=StopLoss orders Buy + Spread
PRAskS=TakeProfit of Buy + Spread orders
PRBidL=StopLoss Sell-Spread orders
PRBidS=TakeProfit Sell-Spread orders

this is how it looks like now

PRAskL=StopLoss Sell order

PRAskS=TakeProfit Sell orders

PRBidL=StopLoss Sell order

PRBidS=TakeProfit Sell order

How many positions do you have in the market at the same time? From which position do you take stops and takes? An open position? From a closed position? The principle or conditions under which a new order should open?
 
artmedia70:
How many positions you have in the market at the same time? From what position do you take stops and takes? An open position? From a closed position? What is the principle or condition to open a new order?

I found the error, thank you for your help in this difficult time of learning such a "simple" programming language.

 
FoxUA:

I found the mistake, thank you for your help in this difficult time of learning such a "simple" programming language.

Glad you could make it on your own - growing up... :)
 
artmedia70:
Go to the other branches of the forum:)
 
sever30:
Go to the other branches of the forum:)
Why?
 
artmedia70:
Glad you were able to do it yourself - you're growing... :)


how does this work?

double Level_stop=MarketInfo(Symbol(),MODE_STOPLEVEL ); //min. distance of stop setting

and where to place it and see the result

 
FoxUA:


how does this work?

double Level_stop=MarketInfo(Symbol(),MODE_STOPLEVEL ); //min. distance of stop setting

and where to place and see result

MODE_STOPLEVEL 14 Minimum stop loss/stake profit level in pips


Please make sure that your level of stop or pending order placement is not less than the value returned by this function and written in the Level_Stop variable.

In a highly volatile market DTs may increase it, as well as the spread, for example.

In a general case:

double Level_stop=MarketInfo(Symbol(),MODE_STOPLEVEL );

if (StopLoss_order < Level_stop) {StopLoss_order = Level_stop;}

Somewhere like this...

 
artmedia70:
MODE_STOPLEVEL 14 Minimum allowable stop loss/stake profit level in pips


Make sure that your level of stops or pending orders is not less than the value returned by this function and written in the Level_Stop variable.

In a highly volatile market, DTs may increase it, as well as the spread for example...

In general case:

double Level_stop=MarketInfo(Symbol(),MODE_STOPLEVEL );

if (StopLoss_order < Level_stop) {StopLoss_order = Level_stop;}

Somewhere like this...


Not to check I never place less than 100 pips so I guess the problem lies elsewhere, eh?

 
FoxUA:

I don't put less than 100 pp to check, so I guess the problem lies elsewhere, eh?

You said you found the "source of evil" ... ;)
 
artmedia70:
You wrote that you already found the "source of evil" ... ;)

Yes, part of the code works and part is talking about 4107 and 130 error and the most interesting thing is that they take the price from one and the same function and work on one and the same opening function

Reason: