Stanislav Korotky: Could you please suggest an algorithm to calculate volumes for a particular bar (maybe it's already described somewhere?). For example, we request with CopyTicksRange all ticks for a particular bar and we need to get as a result of calculations the same volume (both real and ticks) that is displayed in Data Window. I have discrepancies in both volumes for exchange instruments by orders of magnitude (to be specific, take AFLT on MQ-Demo). For forex, the tick volumes are the same, the real volumes are out of the question there.
When summing up the volumes, check the flags - TICK_FLAG. Otherwise, you will count the same volume several times in total.
Dmitriy Skub: When summing up the volumes, you must check the flags - TICK_FLAG. Otherwise, you will count the same volume several times in total.
Of course I watch the flags. That's what I was asking - I just wanted specifics. It has already been answered. It's easier to request _TRADE ticks. It works.
Of course I watch the flags. That's what I was asking - I just wanted specifics. It has already been answered. It's easier to request _TRADE ticks. It works.
You can also apply a flag depending on ENUM_SYMBOL_CALC_MODE
If I need the "LongCondition" and "ShortCondition" functions to use the results of calculations from the TrendTenkan method, and I still can't do it. Does this mean that LongCondition has to call TrendTenkan ?
I can only tweak the obvious errors:
for(i=idx+1;i<idx+21;i++)
{if(DiffKijun(i)>0.0) {value_t=TYPE_TREND_UP; break; return(value_t);}
//здесь явно что-то не так
//return после break не имеет смысла
#import "Test.ex5"void g(); //g(1)#import
void g() {} //g(2)typedefvoid (*fn)();
void f( fn ) {}
void f( int, int ) {}
voidOnStart()
{
f( Test::g ); //нормально
f( ::g ); //error: 'f' - no one of the overloads can be applied to the function call
f( g ); //error: 'f' - no one of the overloads can be applied to the function call//а как иначе указать что g - это g(2) ... и причем здесь overloads ???
fn gg = g; //нормально
f( gg );
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Could you please suggest an algorithm to calculate volumes for a particular bar (maybe it's already described somewhere?). For example, we request with CopyTicksRange all ticks for a particular bar and we need to get as a result of calculations the same volume (both real and ticks) that is displayed in Data Window. I have discrepancies in both volumes for exchange instruments by orders of magnitude (to be specific, take AFLT on MQ-Demo). For forex, the tick volumes are the same, the real volumes are out of the question there.
When summing up the volumes, you must check the flags - TICK_FLAG. Otherwise, you will count the same volume several times in total.
Of course I watch the flags. That's what I was asking - I just wanted specifics. It has already been answered. It's easier to request _TRADE ticks. It works.
Of course I watch the flags. That's what I was asking - I just wanted specifics. It has already been answered. It's easier to request _TRADE ticks. It works.
You can also apply a flag depending on ENUM_SYMBOL_CALC_MODE
You can also apply a flag depending on ENUM_SYMBOL_CALC_MODE
Of course I do.
If I need the "LongCondition" and "ShortCondition" functions to use the results of calculations from the TrendTenkan method, and I still can't do it. Does this mean that LongCondition has to call TrendTenkan ?
I can only tweak the obvious errors:
I don't know where what should be called from
internal error #112
In build 1653, the runtime error has not disappeared, but has moved to a different part of the code:
Cannot find 'f1' in 'Test2.ex5'
Compilation error