| New signals service! | |
|
|||||||
| 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 |
|
![]() |
|
|
LinkBack (2) | Thread Tools | Display Modes |
|
||||
|
Quote:
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 |
|
|||
|
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 |
|
|||
|
Ask and Bid history - witchazel
Quote:
If you have a solution, please post it. Many thanks. |
|
|||
|
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 |
|
|||
|
need some more help : storing bid-ask history
Quote:
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 |
|
||||
|
Quote:
![]()
__________________
David Michael H "Trader helps traders with sincerity, honesty and integrity" |
|
|||
|
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 } |
|
||||
|
Quote:
![]()
__________________
David Michael H "Trader helps traders with sincerity, honesty and integrity" |
![]() |
| Bookmarks |
| Tags |
| histogram, forex, ZUP_v1.mq4 |
| Thread Tools | |
| Display Modes | |
|
|
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 | |