Hey there
I am quite new to mql5 but i already programmed in c++/java/php.
I am not sure why my code isnt executed, thats why i am asking here:
first of all, i just want to get the last bid- and ask-price.
This code i saved in: MQL5 / Experts / bot1.mq5
When i load it, i get this in my journal: "expert bot1 (CADCHF,M1) loaded successfully.
But there is no output in "expert"-tab, why?
Greetings
Welcome to mql5.com forum,
Market is currently closed. There is no tick, so OnTick() event handler is never executed.
Welcome to mql5.com forum,
Market is currently closed. There is no tick, so OnTick() event handler is never executed.
ah ok of course...one more question:
Is there any possibility to choose the periodicity in code?
Or do i have to configure it in MT5 every time?
Greetings!
ah ok of course...one more question:
Is there any possibility to choose the periodicity in code?
Or do i have to configure it in MT5 every time?
Greetings!
You mean change the timeframe of a chart ? You can change the periodicity of a chart, see ChartSetSymbolPeriod()
- www.mql5.com
You mean change the timeframe of a chart ? You can change the periodicity of a chart, see ChartSetSymbolPeriod()
mhm ok, but is there any chance of getting two last ask-prices every tick?
like this strucuture:
1. 18:00
=> get ask prices (17:59 ; 18:00)
2. 18:01
=> get ask prices (18:00 ; 18:01)
2. 18:02
=> get ask prices (18:01 ; 18:02)
anybody know´s how to do this using onTick? greetings!
sorry i need to change my question:
i dont want the last ask price "onTick", because the last ask-price is changing every moment right?
What i need, is the last stabil ask-price,
so i cant use "onTick" or?
any advices? greetings!
sorry i need to change my question:
i dont want the last ask price "onTick", because the last ask-price is changing every moment right?
What i need, is the last stabil ask-price,
so i cant use "onTick" or?
any advices? greetings!
sorry my fault(english knowledge..),
i just ask again, is it possible to get value´s of last two minutes? :
this strucuture:
1. 18:00
=> get ask prices (17:59 ; 18:00)
2. 18:01
=> get ask prices (18:00 ; 18:01)
2. 18:02
=> get ask prices (18:01 ; 18:02)
can i get them using onTick ? greetings!sorry my fault(english knowledge..),
i just ask again, is it possible to get value´s of last two minutes? :
this strucuture:
1. 18:00
=> get ask prices (17:59 ; 18:00)
2. 18:01
=> get ask prices (18:00 ; 18:01)
2. 18:02
=> get ask prices (18:01 ; 18:02)
can i get them using onTick ? greetings!Ask price aren't save in history data. You can get Bid price and apply saved spread (highest of 1 minute).
double price[1]; int spread[1]; CopyOpen(_Symbol,PERIOD_M1,D'2014.02.17 17:49',1,price); CopySpread(_Symbol,PERIOD_M1,D'2014.02.17 17:49',1,spread); double ask=price[0]+spread[0]*_Point;
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hey there
I am quite new to mql5 but i already programmed in c++/java/php.
I am not sure why my code isnt executed, thats why i am asking here:
first of all, i just want to get the last bid- and ask-price.
This code i saved in: MQL5 / Experts / bot1.mq5
When i load it, i get this in my journal: "expert bot1 (CADCHF,M1) loaded successfully.
But there is no output in "expert"-tab, why?
Greetings