Need help with strategy

 
TWTrader:
I simply need to have an expert that will enter at a specific time. For example if time = 1100 then buy or sell. Is this possible?

Yes...

if(TimeHour(CurTime())==EntryHour && TimeMinute(CurTime())==EntryMin)

{

Buy...

Sell...

}

 

Thanks!

Also is it possible to have the High Low and Close for the day calculated from a certain time? For example:

If Time = 1100 then calculate High, Low and Close for today (last 11 hours)

 

Try something like this:

LookBackHour = 11;

LookBack = MathCeil((LookBackHour*60)/Period());

Hi = iHigh(NULL, 0, Highest(NULL,0,MODE_HIGH,LookBack));

Lo = iLow(NULL, 0, Lowest(NULL,0, MODE_LOW,LookBack));

 

How do I hold the hi and lo values for the last calculation? because right now...when time is not equal to the input time, then it resets to 0.

Also is it possible to set a weekly target/stop?

 

For some reason my EA will only trade once per day. I am trying to get it to enter at two seperate times throughout the day.

 

Post your code here , we will try to help.

 

Ok..I got that problem figured out.

Is it possible to calculate P&L starting from Sunday to Friday and reset back to 0 at the close of Friday.

 

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;

}

Reason: