Almost doubled the capital on one week.
I will change the lot size to 2 from now.
I tried to create Normalized ATR but I think it's not so simple task.
So you can try to play with inputs.
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.
Igor I forgot to attach the screen of the ATR_normalized to the response above. Here it is.
try this one. Must be OK.
Ok I will try this one. Also, I was able to do this one very simply:
This seems to work good as well. Thanks for your help!!
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
double _point = MarketInfo(OrderSymbol(),MODE_POINT);
double PipProfit = 0;
for (int cnt=0;cnt<OrdersTotal();cnt++)
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if ( OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber)
PipProfit = MathRound((Bid - OrderOpenPrice())/_point); // Calculate Open Profit/Loss for BUY
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
if (TimerType == 0) // count in progress..count either seconds or tick
TakePipCountDown = TakePipTimer - (CurTime()/1000 - TimerStart1); // Option chosen is Seconds count
TakePipCountDown--; // Option chosen is Tick count
} // if (MaxPipProfit..
}// if (Order...
} // for
} // in EnablePipTimer
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.
I couldn't figure out how everyone else was getting such fabulous results but I was hardly getting any orders!
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!