Experts: SupportResistTrade

 

SupportResistTrade:

Support\resistance levels, trend direction — bullish\bearish.

Author: Vladimir Karputov

 
Automated-Trading:

SupportResistTrade:

Author: Vladimir Karputov

can you implement the same for mt4 ?
 
NightTrader:
can you implement the same for mt4 ?
I have no desire to support the old terminal. Your question can be reinterpreted as follows: would you like to switch from a Mercedes back to a Zaporozhets?
 

During testing it opens only long positions. Can you tell me what I need to change to open short positions as well?

 
Goss Eugene:

During testing it opens only long positions. Can you tell me what I need to change to open short positions as well?


Read the description:

Support/resistance levels are based on the last numBars bars.

The trend is determined by the Moving Avarage indicator (the period is set by the maPeriod parameter): if the price is below the MA, then the trend is bearish, otherwise it is bullish.

If the trend is defined as bullish, the position is opened when the resistance level is broken.

If the trend is bearish, then the position is opened when the support level is broken.

"Not opening" and no trades are two big differences. "No open" means that there is an attempt to open, but it fails.

No trades means that at this stage the conditions for opening a position in this direction have not been formed.

 

The conditions for shorting are in place, the price is below the MA. The Chart also shows Sup/Reslines configured in numBars, but it does not open Positions. As soon as the price jumps over the MA in Longs, everything works as it should.

 
Goss Eugene:

The conditions for shorting are in place, the price is below the MA. The Chart also shows Sup/Reslines configured in numBars, but it does not open Positions. As soon as the price jumps over the MA in Longs, everything works as it should.


Let's check: symbol, timeframe, tick generation mode, testing period from ... to .... And an approximate date when there are no trades.
 

I tested the DAXFutures ( DDH7) Minute Chart. Trading mode Without delay/OHLC on M1. С 06.03.2017. numBars 2, MA 50. Lot 1

 
Goss Eugene:

I tested the DAXFutures ( DDH7) Minute Chart. Trading mode Without delay/OHLC on M1. С 06.03.2017. numBars 2, MA 50. Lot 1


I do not have such symbols. From you: login, investor password and server name.
 

Server : AMPGlobalClearing-Demo-CQG

Login : 110390

If the Investor Password is the Password to the Trading Account, I don't have it. I have Demo version for Test and connection is made automatically.

 
Goss Eugene:

Server : AMPGlobalClearing-Demo-CQG

Login : 110390

If the Investor Password is the Password to the Trading Account, I don't have it. I have Demo version for Test and the connection is made automatically.


Thanks for the message, the code is fixed: now support and resistance levels are defined from bar "1" + numBars (it was from bar "0" + numBars). The iLowest and iHighest functions have also been fixed.