[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 87

 

Transferred from a separate thread.

bercut0077 09.02.2011 18:47
Доброго времени суток. Подскажите пожалуйста, ситуация следующая. Иногда в момент выхода новостей дилер (Альпари) увеличивает значения для установки стоп лос и тейк профит со стандартных 20-30 до 200-300 пунктов. Как можно в советнике до открытии ордера обнаружить изменения? Заранее спасибо за ответ.

 
granit77:

Transferred from a separate thread.


if ( MarketInfo(Symb,MODE_STOPLEVEL)>50 )

50 is set at random, as the stop is either to 30 or exactly 300, where Symb is the instrument symbol.

 
volshebnik:

Hello !

Can you please tell me what's wrong ? I am using the tester on GBPUSD - it opens trades as it should be. I am using it on the dollar index DXH1 - it does not open many deals, the error "130" - Incorrect stops. Moreover, it is not clear what is wrong - it opens and does not open in similar situations, but more than that. Spread and stop level for Dollar Index -100 and 200. Spread and stop level for GBPUSD -3 and 4. Prices in the dollar index, e.g. 78.150, in the pair - 4 decimal places. But it is accounted for.

Here is part of the code :


Try to subtract the spread from the SL because the buy opening is at the ask and you actually have a stop of 100, not 200, because the close is at the bid.
 

Good evening everyone!

I have a simple question, why when I create files, whether it's Expert Advisors or uploading stock information, it is saved in VirtualStore on drive C and not in the root of MetaTrader Finam?

I.e. here -

C:\Users\Виктор\AppData\Local\VirtualStore\Program Files\MetaTrader Finam\experts\files

and not here

C:\Program Files\MetaTrader Finam\experts\files

Thank you in advance for your feedback!

 

Transferred from separate branch.

bercut0077 09.02.2011 19:40

it's not clear what is passed to int ai_0 and what happens in check_bar(2) check_bar(1), please make sense of it.

int check_for_open() {
if (check_bar(2) == 1 && check_bar(1) == 1) gi_320 = TRUE;
else
if (check_bar(2) == 0 && check_bar(1) == 0) gi_324 = TRUE;
return (-1);
}
//-----------------------------
int check_bar(int ai_0) {
double l_ima_4 = iMA(Symbol(), PERIOD_M30, MA_big, 0, g_ma_method_228, g_applied_price_232, 0);
double l_ima_12 = iMA(Symbol(), PERIOD_M15, MA_big, 0, g_ma_method_228, g_applied_price_232, 0);
double l_ima_20 = iMA(Symbol(), PERIOD_M5, MA_big, 0, g_ma_method_228, g_applied_price_232, ai_0);
double l_ima_36 = iMA(Symbol(), PERIOD_M30, MA_small, 0, g_ma_method_228, g_applied_price_232, 0);
double l_ima_44 = iMA(Symbol(), PERIOD_M15, MA_small, 0, g_ma_method_228, g_applied_price_232, 0);
double l_ima_28 = iMA(Symbol(), PERIOD_M5, MA_small, 0, g_ma_method_228, g_applied_price_232, ai_0);
double ld_52 = (High[ai_0] + Low[ai_0]) / 2.0;
if (High[ai_0] < l_ima_28 && l_ima_28 < l_ima_20 && l_ima_44 < l_ima_12 && l_ima_36 < l_ima_4 && High[ai_0] < l_ima_44 && High[ai_0] < l_ima_36) return (1);
if (Low[ai_0] > l_ima_28 && l_ima_28 > l_ima_20 && l_ima_44 > l_ima_12 && l_ima_36 > l_ima_4 && Low[ai_0] > l_ima_44 && Low[ai_0] > l_ima_36) return (0);
return (-1);
}
 
BBSL:

Good evening everyone!

I have a simple question, why when I create files, whether it's Expert Advisors or uploading stock information, they are saved in VirtualStore on drive C and not in the root of MetaTrader Finam?


You need to disable account control and then the files will be saved in the root of the terminal

http://imglink.ru/pictures/09-02-11/f523a5bec03c0aeb73582105d1eb7831.jpg

 
IgorM:


disable account control and then the files will be saved in the terminal folder

https://www.mql4.com/go?http://imglink.ru/pictures/09-02-11/f523a5bec03c0aeb73582105d1eb7831.jpg


thanks))
 
NameLess:

Try to subtract the spread from the SL as well, because the buy opening is on the asc, and in fact your stop is not 200, but 100, because the close is on the bid.
In general I set stop-loss and TP of 400 points to test it, but it didn't affect me .... Same results
 

Hello. Please help. I uninstalled the mt and all the indicators along with it, all of them. Now I installed it and everything is still there. What should I do? Maybe there are copies of indicators and everything else stored somewhere?

 
I load the template and everything appears, although I have deleted everything