Forum

Tester ticks question

Hi, i would know if in Tester, when using " Every ticks based on real ticks" mode, the EA and its indicators (called using iCustom) are processed for each tick without escaping some ticks as happen in live charts. Maybe i need to add property "tester_everytick_calculate" on both EA and indicators

Randomically prev_calculated set to 0 by terminal

Hi, i know that terminal could set prev_caclulated=0 when " If the price data have been changed since the last call of the OnCalculate() function (a deeper history has been loaded or gaps in the history have been filled), the value of the prev_calculated input parameter is set to zero by the

Same Indicator Handle value for different indicators on same chart. Bug?

Hi, should not an indicator handle value be unique for each Indicator on the same chart ? I have this scenario: - EA create indi A using iCustom in onInit, and add A to chart using ChartIndicatorAdd (0,0,A) - indi A, in its onInit, create indi B using iCustom and add B to chart using

ArrayCopy on same array: data corruption?

Hi, I read that using ArrayCopy on the same array could cause data corruption when the initial source index is lower than the target index, due to the left-to-right copy. I tried, but no data corruption was detected. Can I be sure this won't happen under any circumstances? Here a simple script

OnCalculate code not working in Strategy Tester

Hi, this is an example code that is working correctly in terminal, but it is not working in stratey tester. It give me error 4004 on CopyTicks call, but if i code it whitout "while" it is working correctly. Can someone explain me the reason, please? ulong last_tick_time = 1 ; int to_copy = 2000 ;

OrderSend and Trade Server return Code

Hi, i readed this book's reference page, and now i'm really confused. It's clear that OrderSendAsync doesn't get any in the result but "request id", but it seems that with OrderSend we cannot have guarantee on what we can get on result data. Reading these two statements: "It's important to note

Slippage in Market Execution Mode

In market execution mode, we can't specify an opening price and a maximum deviation, but the broker sets the openprice for the trade. This raises two questions for me: 1. Cannot we set a limit to slippage? Could the broker set an open price significantly different from the one I got before opening

Margin check: OrderCalcMargin vs OrderCheck

Hi, reading documentation it seems (maybe i'm wrong) there is no EXACT way to know, before a trade is open, how much margin the trade will take. Reading OrderCalcMargin , doc specify: The function calculates the margin required for the specified order type, on the current account, in the current

Synch CopyBuffer in EA using iCustom

Hi, i have a doubt about reliability of data obtained via CopyBuffer in EA. Considering this example. Let's assume we have a custom indicator where each tick in onCalculate sets 3 buffer: double A[]; double B[]; double C[]; ..... //set buffers in OnInit ..... int onCalculate(....){ //initialize

IVolume vs iTickVolume ve iRealVolume

Hi, I'm a little confused about what exactly these functions return. If I understand correctly: - iTickVolume returns the count of ticks used to build a bar. It is also passed by onCalculate with the "tick_volume" array. It's also shown in the data window as " Tick volume ". Right? - IRealVolume