Question about Operations of Relation "NOT greater than"?? - page 2

 
William Roeder #:

Force it to do what? What is "not greater than all values" of what?

Until you can state your requirements in concrete terms, it can not be coded.

a

 
Ahmed Abd El Aziz #: a
  1. When asked, "what is higher than what," you posted a chart. What “bar in a range” is greatest, is different from asking what “element in an array” is the greatest (your other post).
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

  2. Perhaps you should read the manual. iHighest - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
       How To Ask Questions The Smart Way. (2004)
          How To Interpret Answers.
             RTFM and STFW: How To Tell You've Seriously Screwed Up.

    bool isGreater = iHighest(_Symbol,_Period, MODE_HIGH, length, start) == start; // Bar[start] is highest.
  3. Your other post shows that you are using MT4. Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
    Next time, post in the correct place. The moderators will likely move this thread there soon.

 
William Roeder #:
  1. When asked, "what is higher than what," you posted a chart. What “bar in a range” is greatest, is different from asking what “element in an array” is the greatest (your other post).
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

  2. Perhaps you should read the manual. iHighest - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
       How To Ask Questions The Smart Way. (2004)
          How To Interpret Answers.
             RTFM and STFW: How To Tell You've Seriously Screwed Up.

  3. Your other post shows that you are using MT4. Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
    Next time, post in the correct place. The moderators will likely move this thread there soon.

I mean values of Force index indicator, not prices



This is mql5 code not mql4 by the way

 
Ahmed Abd El Aziz #: I mean values of Force index indicator, not prices

Why haven't you read the documentation?

So read in the values with CopyBuffer and use ArrayMaximum. Again, what is the problem?

 
William Roeder #:

Why haven't you read the documentation?

So read in the values with CopyBuffer and use ArrayMaximum. Again, what is the problem?

I try to read but the language is not help

I hope in the future the site will use Arabic language in explanation 


bool LLLLLLLLLL = true;
for( int l = 1+1; l <= 1+70; l++ ) LLLLLLLLLL = LLLLLLLLLL 

&&iForceMQL4(NULL,0,3,MODE_SMA,VOLUME_TICK,1)>iForceMQL4(NULL,0,3,MODE_SMA,VOLUME_TICK,l)

;
//This code is so good and open deal when current force value is greater than the last 70 values
bool MMMMMMMMMM = true;
for( int m = 1+1; m <= 1+70; m++ ) MMMMMMMMMM = MMMMMMMMMM

&&iForceMQL4(NULL,0,3,MODE_SMA,VOLUME_TICK,1)<iForceMQL4(NULL,0,3,MODE_SMA,VOLUME_TICK,m)

;
//This code is so good and open deal when current force value is lower than the last 70 values
bool JJJJJJJJJJ = true;
for( int j = 1+2; j <= 1+70; j++ ) JJJJJJJJJJ = JJJJJJJJJJ

&&iForceMQL4(NULL,0,3,MODE_SMA,VOLUME_TICK,(1+1)||(2+1)||(3+1))<iForceMQL4(NULL,0,3,MODE_SMA,VOLUME_TICK,j)

;
//This code is my try to open deal when preview force value in candle 2 or preview force value in candle 3 or preview force value in candle 4, is lower than the last 70 values (ex: force value in candle 4 is lower than all force values in candles from 5:75) 

if(JJJJJJJJJJ  &&LLLLLLLLLL )
{
        if(StopLoss>0) TheStopLoss=SymbolInfoDouble(_Symbol,SYMBOL_ASK)-StopLoss*MyPoint;
        if(TakeProfit>0) TheTakeProfit=SymbolInfoDouble(_Symbol,SYMBOL_ASK)+TakeProfit*MyPoint;
        Trade.PositionOpen(_Symbol,ORDER_TYPE_BUY,Lots,SymbolInfoDouble(_Symbol,SYMBOL_ASK),TheStopLoss,TheTakeProfit);
        return;
}


bool KKKKKKKKKK = true;
for( int k = 1+1; k <= 1+70; k++ ) KKKKKKKKKK = KKKKKKKKKK

&&iForceMQL4(NULL,0,3,MODE_SMA,VOLUME_TICK,(1+1)||(2+1)||(3+1))>iForceMQL4(NULL,0,3,MODE_SMA,VOLUME_TICK,k)

;
//This code is my try to open deal when preview force value in candle 2 or preview force value in candle 3 or preview force value in candle 4, is greater than the last 70 values (ex: force value in candle 4 is greater than all force values in candles from 5:75) 



if(  KKKKKKKKKK &&MMMMMMMMMM )
{
        if(StopLoss>0) TheStopLoss=SymbolInfoDouble(_Symbol,SYMBOL_BID)+StopLoss*MyPoint;
        if(TakeProfit>0) TheTakeProfit=SymbolInfoDouble(_Symbol,SYMBOL_BID)-TakeProfit*MyPoint;
        Trade.PositionOpen(_Symbol,ORDER_TYPE_SELL,Lots,SymbolInfoDouble(_Symbol,SYMBOL_BID),TheStopLoss,TheTakeProfit);
        return;
}
//-------------------------------------------------------------------
//The first code is so good and open deal when current force value is greater than the last 70 values

//The second code is so good and open deal when current force value is lower than the last 70 values


//The third code is my try to open deal when preview force value in candle 2 or preview force value in candle 3 or preview force value in candle 4, is lower than the last 70 values (ex: force value in candle 4 is lower than all force values in candles from 5:75) 


//The fourth code is my try to open deal when preview force value in candle 2 or preview force value in candle 3 or preview force value in candle 4, is greater than the last 70 values (ex: force value in candle 4 is greater than all force values in candles from 5:75)