Job finished
Specification
Hello,
This order is really sample. But i want to be able to use the indicator and EA on both metatrader platforms (MQL4 and MQL5). 4 files to create.
The indicator:
It has its own window. At 0 without signal...
Parameters
X : The number of candlesticks to check
Y : a multiplier (default: 1)
Z : sleep after signal -> true or false
The indicator checks HIGH minus LOW for each of the last X candlesticks. Then, it select the MAX range detected.
NB : not the global range of the last X candlesticks... Only the MAX range of one candlestick (included in the last X candlesticks)
If the current candlestick range is higher than Y * MAX range detected : the indicator value is
+1 if the current candlestick is bullish
-1 if the current candlesticks is bearish
NB: the indicator do NOT wait the close of the current candlestick to define its value.
If Z is "true", the indicator will wait at value 0 at least X candlesticks.
If Z is "false", the indicator can have a +1/-1 value during several candlesticks... (if the range of the current
The Expert advisor :
Parameters:
- P : Position size
- N: Number of candlesticks to wait after the trade openning to auto close the position
- H : variable to define a stop loss at H pips over/under the current hight/low candlesticks
If Indicator = +1
EA Buy. Stop loss at H pips under the LOW of the current candlestick.
If Indicator = -1
EA Sell. Stop loss at H pips over the HIGH of the current candlestick.
A position is auto closed after N candlesticks.
NB: the indicator is working on the current candlestick, so its value can change several times (ex : 0/+1/0/+1/0/+1...) if the range of the current candlestick reach with difficulty the MAX range detected... I don't want the expert advisor to open several position on the same way... If a position is openned the system go to bed and wait for the next candlestick.