CyberiaTrader..an amazing EA! - page 16

Linuxser
5921
Linuxser  

Statement updated.

Almost doubled the capital on one week.

v1.60

I will change the lot size to 2 from now.

Files:
statement_2.htm 1653 kb
fxspeedster
434
fxspeedster  
igorad:
Hi,

I tried to create Normalized ATR but I think it's not so simple task.

So you can try to play with inputs.

Igor

PS. Sorry but bug was in the code. Fixed.

Igor, thank you so much for the normalized ATR. It looks good, with the exception that it never goes below 30 (scale 0-100). If you look at the attached screen you will see the iATR go to 0 while ATR_normalized stays around 35. In all instances that iATR reaches zero even for a while, ATR_normalized stays above 30. Can you fix, please? Also wouldn't it be easier to create by using the native iATR and iMA? Maybe that would be easier and I can just use the code in CT as a filter.

fxspeedster
434
fxspeedster  

ATR_normalized screen

Igor I forgot to attach the screen of the ATR_normalized to the response above. Here it is.

Files:
atr_norm.gif 50 kb
Igor Durkin
6735
Igor Durkin  

Hi,

try this one. Must be OK.

Files:
fxspeedster
434
fxspeedster  
igorad:
Hi, try this one. Must be OK.

Ok I will try this one. Also, I was able to do this one very simply:

double normATR=0;

double maxATR=iATR(Symbol(),Period(),14,0);

int i;

for(i=1;i<14;i++)

{

if(iATR(Symbol(),Period(),14,i)>maxATR)

{

maxATR=iATR(Symbol(),Period(),14,i);

}

}

normATR=(iATR(Symbol(),Period(),14,0)/maxATR)*100;

This seems to work good as well. Thanks for your help!!

fxspeedster
434
fxspeedster  
igorad:
I'm testing last version right now and found some bugs. So please wait for updates.

Igor, can you post your version with the fixes for the PIP Timer? It does not work properly in the current form. It starts the PIPcounter at entry and it exits after the time is up regardless of any profit achieved. Please test on ticks instead of seconds since the second count is asynchronous with the ticks coming in. Thank you for your contribution.

Here are the specs again and also the code that I have so far as you originally wrote it with few mods:

1. If EnablePIPTimer=true;

2. When MinPIPProfit >=X activate TakePIPCountdown (SET to Input TakePipTimer). This starts to count down to 0 in ticks.

3. TakePIPCountDown counts down: 60, 59, 58..ticks etc.

4. Declare global variable double BestPIPProfit=0; this holds the best PIP profit that the position has attained so far.

5. Make BestPIPProfit=MinPIPProfit initially;

6. Get BestPIPProfit=current PIP profit

7. If BestPIPProfit > MinPIPProfit make MinPIPProfit = BestPIPProfit (this will be the min. floor PIP profit UPDATED from now on for this open position).

8. When above condition #7 happens restart TakePIPCountDown to initial value (TakePipTimer) and enable it for counting..it is counting again 60, 59, 58 ticks etc. down to 0 with the new floor MinPIPProfit.

9. Once the TakePIPCountDown reaches 0 CLOSE the open order immediately.

10. If the current PIP profit goes below MinPIPProfit stop TakePIPCountDown (and reset to original TakePipTimer value) until again current profit is >= MinPIPProfit (the highest achieved floor) during this run

CODE:

int CheckTakeProfitTimer()

{

double _point = MarketInfo(OrderSymbol(),MODE_POINT);

double PipProfit = 0;

if (EnablePipTimer==true)

{

for (int cnt=0;cnt<OrdersTotal();cnt++)

{

OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);

int mode=OrderType();

if ( OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber)

{

if (mode==OP_BUY)

PipProfit = MathRound((Bid - OrderOpenPrice())/_point); // Calculate Open Profit/Loss for BUY

else

if (mode==OP_SELL)

PipProfit = MathRound((OrderOpenPrice()-Ask)/_point); // Calculate Open Profit/Loss for SELL

MaxPipProfit = MathMax(PipProfit,MaxPipProfit); // Get largest profit, either current or max during the trade

if (MaxPipProfit >= BestPipProfit) // check if floor PIP profit reached

{

if (!StartCount1 || ( StartCount1 && BestPipProfit > MinPipProfit)) // no count in progress and floor PIP profit reached

{

BestPipProfit=MaxPipProfit; // reset to current max. profit achieved so far

TimerStart1 = CurTime()/1000; // freeze current time

TakePipCountDown = TakePipTimer; // initialize counter to set value

StartCount1=true; // start the counter

}

else

if (TimerType == 0) // count in progress..count either seconds or tick

{

TakePipCountDown = TakePipTimer - (CurTime()/1000 - TimerStart1); // Option chosen is Seconds count

}

else

{

TakePipCountDown--; // Option chosen is Tick count

}

} // if (MaxPipProfit..

}// if (Order...

} // for

} // in EnablePipTimer

fxspeedster
434
fxspeedster  

Fixed no trading in CT 1.85

Sorry gang..there was a bug in 1.85 that prevented CT 1.85 to trade after the bad trading hours. I fixed it for now until the new version comes out and I named it 1.85f (fixed). Please use this version with the 1.85 presets posted originally. This is identical to 1.85 and only contains the no trading fix. We should have caught this earlier.

Files:
deeforex
93
deeforex  
fxspeedster:
Sorry gang..there was a bug in 1.85 that prevented CT 1.85 to trade after the bad trading hours. I fixed it for now until the new version comes out and I named it 1.85f (fixed). Please use this version with the 1.85 presets posted originally. This is identical to 1.85 and only contains the no trading fix. We should have caught this earlier.

I couldn't figure out how everyone else was getting such fabulous results but I was hardly getting any orders!

Igor Durkin
6735
Igor Durkin  

Hi,

I've developed separate PipTimerExpert. This Expert can manage trade according to technique described by fxspeedster. This version include counter of secs and ticks. You can use it for CyberiaTrader.

fxspeedster
434
fxspeedster  
igorad:
Hi, I've developed separate PipTimerExpert. This Expert can manage trade according to technique described by fxspeedster. This version include counter of secs and ticks. You can use it for CyberiaTrader.

Igor, thank you for your great work. I am including this code and testing it. You are the best!