Forex
Google
New signals service!

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack (2) Thread Tools Display Modes
  #171 (permalink)  
Old 07-11-2006, 02:15 AM
Eaglehawk's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 141
Eaglehawk is on a distinguished road
Question

Quote:
Originally Posted by kidhudi
do you think it is possible to have moving average envelopes that project themselves into the future in a straight line?
moving averages are determined by the past "x" periods average,


for example, if you apply the moving average to the close, one period closes at 1.3417, and the next is 5 pips higher, and the next 5 higher, and etc, a moving average would "average" thoose values to come up with a current value.

and because the price is always changing, only the moving averages that look back for over 100 pips or so, look close to straight most of the time

in answer to your question, if it is possible, please let me know! (lol)
__________________
"One's ability to accomplish his or her goals is limited only by the ingenuity of how one uses what he or she already knows."- Eaglehawk
REMEMBER,
"Genius is nothing but a greater aptitude for patience." –Benjamin Franklin

____________________________________

Have a simple ea you just can't figure out how to code??? Odds are you can make it here. Just remember to push complete when you're done, NOT SAVE!!!

http://sufx.core.t3-ism.net/ExpertAdvisorBuilder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #172 (permalink)  
Old 07-12-2006, 09:52 AM
Junior Member
 
Join Date: May 2006
Posts: 20
witchazel is on a distinguished road
hello, i am working on an EA that I am trying to do a price cross with.

how do i know if it has crossed?
if i do if Ask>iCustom() then it puts in orders any time it is above
if i do if ask=iCustom() then it misses buys because it does it per minute

on dealbook i would do if ask[-1] <iCustom() and ask[0]>=iCustom but i cant fiure it out here as Ask and Bid do not have history
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #173 (permalink)  
Old 07-12-2006, 02:41 PM
kevmcfoster's Avatar
Senior Member
 
Join Date: Jul 2006
Location: Dubai
Posts: 143
kevmcfoster is on a distinguished road
additional charts

hi,
this is probably irrelevant to this thread, but i wanted to know how to add on extra charts for metatrader 4...like silver, audnzd, nzdusd, platanium etc. Someone had given me this attachment once to copy paste in the metatrader folder to get these charts, but it seems i lost it, so can someone please help me out here.

thnx
kev
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #174 (permalink)  
Old 07-14-2006, 09:25 PM
Junior Member
 
Join Date: Jun 2006
Posts: 23
DaytrSuccess is on a distinguished road
retrieving the t_1 bid and ask values

Hello,

I am a newbie in programming and I don't know how to retrieve the value for the previous tick : previous ask and bid values.

Thank you for your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #175 (permalink)  
Old 07-15-2006, 06:51 PM
Junior Member
 
Join Date: Jun 2006
Posts: 23
DaytrSuccess is on a distinguished road
Ask and Bid history - witchazel

Quote:
Originally Posted by witchazel
hello, i am working on an EA ....
.... i would do if ask[-1] <iCustom() and ask[0]>=iCustom but i cant fiure it out here as Ask and Bid do not have history
I have the same question, would like to retrieve ask[-1] and bid[-1]and don't knw how to do so.
If you have a solution, please post it.

Many thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #176 (permalink)  
Old 07-15-2006, 07:10 PM
Member
 
Join Date: Sep 2005
Location: Athens
Posts: 70
Yannis is on a distinguished road
Ask and Bid is the current price at which you can buy or sell (always the latest tick). The only “historical” values you can retrieve for price is Open / High (so far) / Low (so far) for current bar, “so far” meaning that until the bar closes these values might change, and High/Low/Open/Close of any previous bar on any time frame.

Yannis
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #177 (permalink)  
Old 07-15-2006, 08:50 PM
Junior Member
 
Join Date: Jun 2006
Posts: 23
DaytrSuccess is on a distinguished road
need some more help : storing bid-ask history

Quote:
Originally Posted by Yannis
Ask and Bid is the current price at which you can buy or sell (always the latest tick). The only “historical” values you can retrieve for price is Open / High (so far) / Low (so far) for current bar, “so far” meaning that until the bar closes these values might change, and High/Low/Open/Close of any previous bar on any time frame.

Yannis
Thank you for the answer.

So, I will have to store the values. Maybe you can give me a little advice and some code about the array.

This is wat I intend to do

1)int init :
a loop : select by position

declaring a two resizable dimensionnal array :
getting the ticket for each trade
storing the ticket and bid (or ask) value in the array : please help

2) int start
a loop : for each line in the array (first value stores the ticket of a trade
-->select by ticket)
a) retrieve the bid_1 (or ask_1) stored in second value of the line :
b) store new value of bid (or ask) please help

Every help is welcome - Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #178 (permalink)  
Old 07-16-2006, 06:29 AM
firedave's Avatar
Senior Member
 
Join Date: Nov 2005
Location: Jakarta, Indonesia
Posts: 416
firedave is on a distinguished road
Quote:
Originally Posted by Yannis
Ask and Bid is the current price at which you can buy or sell (always the latest tick). The only “historical” values you can retrieve for price is Open / High (so far) / Low (so far) for current bar, “so far” meaning that until the bar closes these values might change, and High/Low/Open/Close of any previous bar on any time frame.

Yannis
Hi Yannis, great to see you here too. All the best
__________________
David Michael H
"Trader helps traders with sincerity, honesty and integrity"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #179 (permalink)  
Old 07-16-2006, 06:08 PM
Member
 
Join Date: Sep 2005
Location: Athens
Posts: 70
Yannis is on a distinguished road
Hi FireDave, Thanks for the warm welcome. Glad to see you here too. Are you a Moderator here ?

DayTrSuccess,
this should get you started:

// Fill your array
MyArray[][3];
ArrayInitialize(MyArray,0);

for (int cnt=OrdersTotal()-1;cnt>=0;cnt--)
{ OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
{ MyArray[cnt][0]=OrderTicket();
if (OrderType()==OP_BUY)
{ MyArray[cnt][1]=1; // Buy
MyArray[cnt][2]=OrderOpenPrice();
}
else
{ MyArray[cnt][1]=2; // Sell
MyArray[cnt][2]=OrderOpenPrice();
}
}
}

// Search your array for OrderTicket
int MyArrayIndex=ArrayBsearch(MyArray,OrderTicket(),WH OLE_ARRAY,0,MODE_ASCEND);
if (MyArray[MyArrayIndex][0]==OrderTicket())
{ // Your code here
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #180 (permalink)  
Old 07-17-2006, 01:48 AM
firedave's Avatar
Senior Member
 
Join Date: Nov 2005
Location: Jakarta, Indonesia
Posts: 416
firedave is on a distinguished road
Quote:
Originally Posted by Yannis
Hi FireDave, Thanks for the warm welcome. Glad to see you here too. Are you a Moderator here ?
Nope, just another holy-grail-searcher
__________________
David Michael H
"Trader helps traders with sincerity, honesty and integrity"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
histogram, forex, ZUP_v1.mq4

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
Posted By For Type Date
OzFx System:) - Page 639 This thread Refback 06-21-2008 10:53 PM
Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart This thread Refback 12-08-2007 12:46 PM


All times are GMT. The time now is 04:22 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.