Errors, bugs, questions - page 774

 
Karlson:

Didn't know which thread to write in ))))

Initial depo 10000.This is before yesterday's update.

How did it work out? Can you give the code and description of the testing conditions in the servicedesk?
 
Urain:

Does OnTradeTransaction trigger the Trade event, or does it have its own event?

If both functions are triggered by the same event, what is the order? Which is triggered first by OnTrade() or OnTradeTransaction()?

You can not go on like this.

Put up a printout and see - it will take a minute.

 

It's all there. In addition to my expert...#419548

That's how I started testing silver...

There's an incomprehensible memory consumption of three one-barrels...

 
Renat:

They complement each other, with OnTradeTransaction fully covering the OnTrade functionality.

OnTradeTransaction gives you access to the raw transaction flow and allows you to monitor the trade execution process in detail.

Functions work independently and the transaction flow on OnTradeTransaction is much bigger and more detailed. OnTradeTransaction has its own queue from which commands are issued.

ps: just set an undershoot of these functions and see for yourself

I.e. OnTrade is now a cut version of OnTradeTransaction ?

or is it possible to get something in OnTrade that cannot be in OnTradeTransaction?

 
Urain:

So OnTrade is now a stripped down version of OnTradeTransaction ?

Or is it possible to get something from OnTrade that cannot be from OnTradeTransaction?

OnTrade is the same as it was - just a notification "some changes have occurred in the trade operations database" without any details. The trader has to look up the database himself to see what has actually changed.

OnTradeTransaction gives absolutely accurate and detailed individual transactions step by step. Here each transaction is given on a platter, no need to search for changes in the database.

They have done exactly what they have asked for - they have given full and detailed control of all transactions related to trading operations. And it is easy to catch any changes made on the server side: triggering of stops, orders, rollovers and so on.

 
Renat:

OnTrade is the same as it was - just a notification saying "some changes have been made in the trading operations base" without any details. The trader has to go to the database himself and see what has really changed.

OnTradeTransaction gives absolutely precise and detailed individual transactions step by step. Every transaction is presented on a platter, there is no need to look for changes in the database.

They did exactly what they asked for - they gave full and detailed monitoring of all transactions related to trading operations. And all changes made on the server side are easy to catch: triggering of stops, orders, rollovers, etc.

Thank you, it is very clever. Now I am testing it, it is very convenient and functional.
 

Can you please tell me if the CopyBuffer function can be used in an initialisation function?

input int      n_analyzed_bars=50;

input int      shift_offset=0; 

input string   symb1="GBPUSD";

input ENUM_MA_METHOD   ma_method=MODE_SMA;

input ENUM_APPLIED_PRICE   applied_price=PRICE_CLOSE;  

//--- indicator buffers 

double                   MainMaBuffer[];

double                   MaBuffer1[]; 

//--- MA handles

int                      MainMaHandle;

int                      MaHandle1; 

int OnInit()

  { 

SetIndexBuffer(0,instsymBuffer,INDICATOR_DATA);

SetIndexBuffer(13,MainMaBuffer,INDICATOR_CALCULATIONS);

ArraySetAsSeries(MainMaBuffer,true);

ArraySetAsSeries(MaBuffer1,true);

 

MaHandle1 = iMA(symb1,0,1,0,ma_method,applied_price);

MainMaHandle = iMA(_Symbol,0,1,0,ma_method,applied_price); 

if(CopyBuffer(MaHandle1,0,0,n_analyzed_bars+shift_offset+2,MaBuffer1)<=0) 

    {

      Print("Getting MA is failed! Error",GetLastError());      

      return(0);

    }

error 4806 and 4007

ERR_INDICATOR_DATA_NOT_FOUND

4806

Requested data not found

ERR_ARRAY_RESIZE_ERROR

4007

Not enough memory to redistribute the array or an attempt to resize a static array

 
Neofit:

Can you please tell me if the CopyBuffer function can be used in an initialisation function?

error 4806

ERR_INDICATOR_DATA_NOT_FOUND

4806

The requested data was not found

If you create an indicator in the inite, it's better to move the reading of its data to OnTick or OnCalculate, because you need time after the indicator creation for it to be calculated.

In other words, you have created the indicator in the inite and left. At the operating point OnTick/OnCalculate you check the data availability through the CopyBuffer and also leave the calculation until the data appears.

This is how you initialize and work with complex slave/dependent indicators.

 
Renat:

If you create an indicator in the inite, it is better to move the reading of its data to OnTick or OnCalculate, because you need time after the indicator is created for it to be calculated.

In other words, you have created the indicator in the inite and left. At the operating point OnTick/OnCalculate you check the data availability through the CopyBuffer and also leave the calculation until the data appears.

In this way you need to initialise and work with complex slave/dependent indicators.

Thank you for your feedback.

I'm writing an indicator...unfortunately, the concept of indicator assumes - that by the time we get to OnCalculate the optimal pair will be selected, I suspect it sounds unclear.

In general, in the function OnCalculate we should already use the results of calculations and analyses that were performed in On Init.

We can't transfer these calculations to OnCalculate because we don't have time to perform all the calculations between two consecutive ticks...

 
antt:
Yes. Unfortunately, there is an error in rendering this object in the build. It will be fixed in the next build. We apologize for that.

I see, thank you. What about...

Silent:

...

Will the other objects(Gann fan, arcs) be finished?

On the subject of "straying" when changing the window?