| 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 | Thread Tools | Display Modes |
|
|||
|
Quote:
if(TimeHour(CurTime())==EntryHour && TimeMinute(CurTime())==EntryMin) { Buy... Sell... } |
|
|||
|
I am trying to calculate a pivot point starting at 22:00, at this time it needs to look for the high and low since midnight (00:00) and the close at 22:00. I also would like know this value at any given time. For some reason what I am using below is not working, it stays 0 until 22:00, then if the EA is reloaded it resets to 0 again. Can someone please help?
//--------Calculate P1 Pivot--------// double LookBackHour1, LookBack1 ; static double P1, dHigh1, dLow1, dClose1 ; if(TimeHour(CurTime())==22 && TimeMinute(CurTime())==0) { LookBackHour1 = 22; LookBack1 = MathCeil((22*60)/Period()); dHigh1 = iHigh(NULL, 0, Highest(NULL,0,MODE_HIGH,LookBack1)); dLow1 = iLow(NULL, 0, Lowest(NULL,0, MODE_LOW,LookBack1)); dClose1 = Close[0] ; P1 = (dHigh1 + dLow1 + dClose1)/3; } |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| what the best strategy ??? | jsw2006 | General Discussion | 13 | 09-04-2008 09:21 PM |
| 25-34 strategy | yossi1177 | Expert Advisors - Metatrader 4 | 3 | 08-08-2008 12:03 AM |
| EMA 5 13 62 Strategy | MarvinSk | Expert Advisors - Metatrader 4 | 19 | 03-25-2007 04:08 PM |
| Strategy | frantacech | Metatrader 4 | 0 | 01-05-2007 05:43 PM |
| Need an EA for new GBP/USD strategy... | wadeboxjr | Metatrader 4 | 1 | 08-26-2006 09:12 AM |