Forum

ranking calculations MQL4

I have a calculation for finding the Price from MA100 and MA50 shown in the formula below. How do i, 1; find all the price points where this has happened so that i can indicate on screen and 2; if MA100-MA50, how do i rank the last three prices from the subtracted difference? for ( int i = 0 ; i

Indicator Cross over to find price MQL4

Trying to find the cross over between the two RSI's, then the Price at the crossover. This is what I've tried to do but comes with a 0 value, i am looking for a price value. Also i need a tolerance so that the difference could be close to 0 which is good enough. int RSI() { double

EA Drawdown extraction mql4

Hi, i need to extract draw down per trade from an EA. I've had a go at the program (below), but i am not sure how to extract the high and low values between each trade execution. also how would i extract this directly to csv? void OnTick () { int HighestCandle= iHighest ( _Symbol , _Period

Place a OP_SELLSTOP at a Previous trade (SL,TP or ENTRY)

if ( OrderSelect ( OrdersTotal (),SELECT_BY_POS,MODE_TRADES)) // if(OrderSymbol()==Symbol()) { // if(OrderType()==OP_BUY) { // if( EQUALITY_TOLERANCE > (Bid == OrderStopLoss())) //&& C1>C2) {

MQL4 platform issue

MQL4 platform opens a trade without a stoploss and take profit and then stops all orders from the EA. Since this Monday, this has happened frequently with a VPS in place

still having Constant Expression Required

This error shows up when i try to find max array from these variables: Constant Expression Required. i've had a go, any ideas? double num_array[ 3 ]; num_array[ 0 ]= RFTPD8; num_array[ 1 ]= RFTPD7; num_array[ 2 ]= RFS3; double num_array[ 3 ]= {RFTPD8,RFTPD7,RFS3}; int maxValueIdx=