FrenchyTrader: before entering... I would check if market can sustain this level for 10 sec at least.
How are you going to test for a duration? You only check Bid above HV once per bar and once it is, you've lost any previous "duration" so there is nothing to test with. You use a local variable, so once you return the value is lost. "Duration" is a datetime so it can't be a duration (elapsed time,) use better variable names. You need something more likeif ( Bid > highValue || Bid < lowValue ) {Duration = TimeCurrent(); }
static datetime lastBreakout = 0; if ( Bid <= highValue && Bid >= lowValue ) lastBreakout = 0; // No longer else{ // Breakout. if(lastBreakout == 0) lastBreakout = TimeCurrent(); // first one else if( // still going. TimeCurrent()-Duration>=10 // When I had this... it's not working && countTrades() == 0 && Short_Scalping && TimeCurrent() - Short_lastclosedtime > Time_btw_2_Short_Min*60 ){ openShortTrade(); } }
Ok thank you

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I have a signal if price cross a level.
before entering... I would check if market can sustain this level for 10 sec at least.
Cheers