Market Entry Conditions implementation (MA & CCI Filters) New comment OTMT Howard 2022.07.02 07:44 // Buy entry if(MABuyFilter&&CCIBuyFilter) { //here we are assuming that the TakeProfit and StopLoss are entered in Pips ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, vSlippage, Bid - StopLoss * vPoint, Bid + TakeProfit * vPoint, "Set by Process Expert Advisor", Magic, 0, Blue); if(ticket < 0) { comment = comment + " " + "Error Sending BUY Order"; } else { comment = comment + " " + "BUY Order Executed Succesfuly"; } } else { comment = comment + " " + "Reason Order Not Opened: MA Filter Not Passed"; } } else if(Open[1] > Open[StartHour] + MinPipLimit * MyPoint) //v3.0 { //--------------------------------- // Sell entry if(MASellFilter && CCISellFilter) { //here we are assuming that the TakeProfit and StopLoss are entered in Pips ticket = OrderSend(Symbol(), OP_SELL, Lots, Bid, vSlippage, Ask + StopLoss * vPoint, Ask - TakeProfit * vPoint, "Set by Process Expert Advisor", Magic, 0, Blue); if(ticket < 0) { comment = comment + " " + "Error Sending SELL Order"; } else { comment = comment + " " + "SELL Order Executed Succesfuly"; } } } else { comment = comment + " " + "Reason Order Not Opened: MinPipLimit Filter Not Passed"; } myAlert("EA", comment); } Comment(comment); Print(comment); } return; } Hello MQL5 Community, I had an EA built and would appreciate your assistance in providing your expert solution to my inquiry: Is there another way to simplify the entry conditions logical operators so that they can function independently of one another? My initial entry conditions follow this sample provided below: In terms of entry, I'd like to separate these conditions so that when one is selected, the other should not be true if it is not selected. I make use of two conditions which are the MA and the CCi Filter. // Buy entry if(MABuyFilter&&CCIBuyFilter) // Sell entry if(MASellFilter&&CCISellFilter) I greatly appreciate your support in this regard, Implement 2 MA Cross with CCI filter Implement two conditions to enter a trade_ MA and CCI. (EA) Locate MA Cross Condition In *** New comment
Hello MQL5 Community,
I had an EA built and would appreciate your assistance in providing your expert solution to my inquiry:
Is there another way to simplify the entry conditions logical operators so that they can function independently of one another?
My initial entry conditions follow this sample provided below:
In terms of entry, I'd like to separate these conditions so that when one is selected, the other should not be true if it is not selected.
I make use of two conditions which are the MA and the CCi Filter.
// Buy entry
if(MABuyFilter&&CCIBuyFilter)
// Sell entry
if(MASellFilter&&CCISellFilter)
I greatly appreciate your support in this regard,