You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Just wanted to make sure i understood. Yes i will post the code when i get home today. Thanks again
Hey Alain, so this is what I have:
(I declared MathAbs as a double in the set up area)
I keep getting the errors: '-' illegal operation use and, '-' parameter conversion not allowed
On the second piece of code I posted:
I have placed this at the absolute bottom of the EA (outside of the OnTick area) and now have taken off the '[]', I have the warning that 'expression has no effect'.
What I want it to do is for each bar just gone 'PriceDataTable[1]', if that price is > the maximum price found in the array from [2]-[9], then enter a trade. So i changed it to this:
...but it still says: 'expression has no effect'
I'm not sure where to go from here?
Thanking you in advance!
Mathabs is a local variable and it don't need to be defined.
I took off the declaration and still got the same message. What i did try is doing the subtraction outside of the MathAbs and it worked. It is not working because PriceDataTable[] is MqlRates i think? Instead of a double? Is it possible to query MqlRates within the MathAbs? As i need to query the different prices of the candles?
And in the second piece of code you need an int viable that take the value of ArrayMaximum. Ex:
int arrayindex = ArrayMaximum(PriceDataTable, 2, WHOLE_ARRAY); << i defined that in the set up area and tried at the bottom outside of the OnTick area, both gave the
message: 'possible loss of data due to type conversion' as a warning and still the warning: 'expression has no effect'
int arrayindex = ArrayMaximum(PriceDataTable, 2, WHOLE_ARRAY); << i defined that in the set up area and tried at the bottom outside of the OnTick area, both gave the
message: 'possible loss of data due to type conversion' as a warning and still the warning: 'expression has no effect'
Not with that line of code. Post all the relevant code and indicate what line the message refers to. That includes your definition of PriceDataTable.
Not with that line of code. Post all the relevant code and indicate what line the message refers to. That includes your definition of PriceDataTable.
Ok so below is my EA. I have put '========= For Issue 1 ' y next to all the relevant parts, and my function issue is right at the bottom of the EA.
Thank guys I appreciate your assistance.
The error log says:
'PositionInfo.mqh' PositionInfo.mqh 1 1
'DealInfo.mqh' DealInfo.mqh 1 1
'-' - illegal operation use Mariah 1.2.mq5 211 36 <<<<<<<<<<<<<<<<<<<<<<<<<< Issue 1
'-' - parameter conversion not allowed Mariah 1.2.mq5 211 36 <<<<<<<<<<<<<<<<<<<<<<<<<< Issue 1
expression has no effect Mariah 1.2.mq5 286 7 <<<<<<<<<<<<<<<<<<<<<<<<<< Issue 2 (warning)
2 error(s), 1 warning(s) 3 2
I would like to open a new feed to see if anyone else can help, how do i close this one?
Don't double post