[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 106

 
biss писал(а) >>

Can you suggest an EA that deletes pending deals after one of the pending deals triggers, but it ignores open deals and triggers only if a new deal opens after the pending deal triggers?

If there is an open trade on this pair it can be done or just changed its settings.

And also an EA which removes pending orders after any trade closing on a pair (tp, sl, trawl, manual close)

It is not the first thread with similar question. I don't know how to do it. I do not have them ready. Willing seems to be available. Although it depends on your gratitude.

 

Does anyone know how to make this function close only open Buy and Sell orders at the same time, so it would not close one directional order like Buy, Buy, etc. Right now this function closes any order, i need it to close only Lok orders. Show me how to do it)


if (( Ostanov)&&( Balance("buy", "Balance")+ Balance("sell", "Balance"))>= Limit){
   int slippage=3;
   for (int i=OrdersTotal()-1; i>=0; i--)
   {
    if (!OrderSelect( i, SELECT_BY_POS, MODE_TRADES)) break;
    if (OrderType()==OP_BUY ) OrderClose (OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_BID), slippage);
    if (OrderType()==OP_SELL) OrderClose (OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK), slippage);
    }
    }
 
1Rakso писал(а) >>

Does anyone know how to make this function close only open Buy and Sell orders at the same time, so it would not close one directional order like Buy, Buy, etc. Right now this function closes any order, i need it to close only Lok orders. Show me how to do it)

>> Create a magic number for your Loko orders and track them when you are done!

 
vvavva >> :

create a specific magic number for locking orders and keep track of that number when closing!

Thank you! I'll give it a try.

>> Does anybody know if there is a function which shows overall balance when there is a buy sell order, when there is a unidirectional order it would show zero, or maybe something can be done with this function?


I need it to show only the lock balance, and the balance of unidirectional orders would be shown as zero or would not work.......)).

DoubleToStr((Balance("buy", "Balance")+Balance("sell", "Balance")), 2)
 

Hi all!

Please help me with optimizing the code of signal indicator.

The idea is to build a signal indicator based on two standard indicators - Macd and AC. The signals of the Macd indicator should be filtered by AC indicator, in case there is a Macd signal, I should check if there was a signal from AC indicator max 5 bars ago, if there was, I should draw an arrow, no - do not draw anything.

I attach the indicator below. For the simplicity of working out the algorithm, I use only one signal from the Macd - histogram crossing the zero line.

Please advise how to simplify this code.

Files:
 
1Rakso >> :

...I guess that's the realm of science fiction)))

From the realm of searching before you ask. The GetProfitOpenPosInPoint(...) function from KimIV's b-Positions library, if you set the required parameters, will show you the profit of open positions in any section: by wizard, by symbol, by order type, etc.

 

Good afternoon everyone...

Help me with this error, I can't get to the bottom of it.


TestGenerator: unmatched data error (high value 1.3536 at 2009.04.06 11:00 is not reached from the lowest timeframe, high price 1.3536 mismatches)

 
The quotes need to be uploaded, starting with the smallest ones.
 

Good afternoon!

double x =5;

double stochastic =iStochastic(...0);

double stochastic1 =iStochastic(..0,+1);

//-------------+

The essence of the question: how to implement it correctly: [if indicator's value has increased by x points && if indicator's value has decreased by x]

//-------------+

for(int i=0; i < stochastic; i++){

if(stochastic - x <= stochastic1) SignalMinus =true;
if(stochastic + x >= stochastic1) SignalPlus =true;

} // Is this incorrect?

In advance tnx!

 
Latique >> :

The essence of the question: how to correctly implement: [if indicator's value has increased by x points && if the indicator's value has decreased by x]

//-------------+

for(int i=0; i < stochastic; i++){

if(stochastic - x <= stochastic1) SignalMinus =true;
if(stochastic + x >= stochastic1) SignalPlus =true;

} // Isn't this correct?

In advance tnx!

But the stochastic scale isn't measured in points at all!

It's measured in simple abstract units.

And you subtract points from the stochastic? Or do you?



Reason: