
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
I have a feeling we lose a little bit control over the code....
No, this is for sure not the right place.
This 'error handling' does not make anything better. Check it again.
This is not created for fun! It should be used to reset the executed flags on a new bar.
What have we learned about comparing doubles and whether this makes any sense here?
So you have decided to delete your post I am referencing to... Well done, that's very helpful !
Sorry but yesterday was problem in internet (mql4.com stop working). I was try correct something and ... collapse
It is not easy to help you. Why won't you try to implement only one strategy for now, but with a proper, Open(), Close(), Count(), NewBar(), Signal() function.
The below block is outside of the start function. I am not sure this is wanted.
I think the same as You, small steps. Let's take just one option BULL4
Sometimes looking like Ea to my on codebase
https://www.mql5.com/en/code/9156 - interesting
I understand these (but not feel), i'ts a flag and I understand its purpose
What dou you think? about small steps
Yes, small steps, so the errors are manageable...
Do you want to highlight something specific from the codebase EA?
I wont see this again - I will not help you anymore if you further ignore the correction steps, I - or someone else - has adviced to do:
Slippage is 0? You'll probably get an error. But the fixed error handling will catch it :-)
This is not wrong, but not ideal and in a worst case it does not what you want inside the loop. Best, don't even start using loops from 0 to OrdersTotal. Read this: Loops and Closing or Deleting Orders
What is your brokers spread and how many digits do you have for the symbol you want to trade? I am not sure you use Point correctly (Read on the first page of your thread).
Yes, small steps, so the errors are manageable...
Do you want to highlight something specific from the codebase EA?
I think no, nothing to light, I understand what I wrote.
I wont see this again - I will not help you anymore if you further ignore the correction steps, I - or someone else - has adviced to do:
Yes. I know what do NormalizeDouble, I thing that I understand ( if I have: euro/usd = 1.2390022129.....09.... And we need: 1,29893 end! not infinity ) but I cant write these, could be these?
if ( NormalizeDouble ( abc(),0 ) )
If ( NormalizeDouble ((Close[1]-Bid) +3*point),0 ) ;
Slippage is 0? You'll probably get an error. But the fixed error handling will catch it :-)
I can have +1 no problem result=OrderSend(Symbol(),OP_BUY,0.41,Ask, 1 ,Close[1]-25*Point,0,"",MAGICMA1,0,Blue);
error will handling, good, we see what will be after
This is not wrong, but not ideal and in a worst case it does not what you want inside the loop. Best, don't even start using loops from 0 to OrdersTotal. Read this: Loops and Closing or Deleting Orders
VERY GOOD ARTICLE ! I sholud read these at begining :)
What is your brokers spread and how many digits do you have for the symbol you want to trade? I am not sure you use Point correctly (Read on the first page of your thread).
I remember these. I have Admiral Market Bid=1,29000 Ask = 1,29001. These is a problem I know,, but I do not have resolution at these moment I not found the good example.
I'm writing code...
Yes. I know what do NormalizeDouble, I thing that I understand ( if I have: euro/usd = 1.2390022129.....09.... And we need: 1,29893 end! not infinity ) but I cant write these, could be these?
if ( NormalizeDouble ( abc(),0 ) )
You can't NormalizeDouble() a bool, the clue is in the function name and in the documentation too . . .
You can't NormalizeDouble() a bool, the clue is in the function name and in the documentation too . . .
It's a pitty we cannot normalize true to be very true :-(
Yes. I know what do NormalizeDouble, I thing that I understand ( if I have: euro/usd = 1.2390022129.....09.... And we need: 1,29893 end! not infinity ) but I cant write these, could be these?
No, you don't have to normalize Bid or Close[1]. What I meant is, you should just not compare it for equality.
Imagine:
Close[1] = 1.31933
New_Bar
Tick1, Bid = 1.31935
Tick2, Bid = 1.31934
Tick3, Bid = 1.31937
Tick4, Bid = 1.31937
Tick5, Bid = 1.31942
Your code does look for a Tick where Bid is 1.31936
You'll miss your signal. This would not happen, if you use > .
I can have +1 no problem result=OrderSend(Symbol(),OP_BUY,0.41,Ask, 1 ,Close[1]-25*Point,0,"",MAGICMA1,0,Blue);
This doesn't make it much better. All your calculation in Points should be Pips from my understanding. However, I have no experience with ECN brokers, so it might work.
This is not wrong, but not ideal and in a worst case it does not what you want inside the loop. Best, don't even start using loops from 0 to OrdersTotal. Read this: Loops and Closing or Deleting Orders
VERY GOOD ARTICLE ! I sholud read these at begining :)
Agree and there are many very good articles more, written by the same author. Also the book is not a bad place to start.
I have Admiral Market Bid=1,29000 Ask = 1,29001. These is a problem I know,, but I do not have resolution at these moment I not found the good example.
On your brokers website is stated, that for EURUSD, the minimal spread is 0,1. The average spread is 0,5. <-- This is meant in pips! So 0,1 is 1 Point. 0,5 is 5 Points.
So in your case, one Pip is 10*Point. The spread will confuse all your mini calculation where you add only 3 points to a price.
Search for 'adjust for 5 digit broker' and you should find a lot of examples.
HI :)
If this code was bad because I was passing signals, it has improved. I thought that the problem is entirely in a different place, not in the sign of equality '=='......... the '>=' is better idea of course
Question 1. Do I have use MyPips in candle, in these function? bool BULL4()
DIGIT problem.
I found these
https://www.mql5.com/en/forum/140097 by WHRoeder
https://www.mql5.com/en/forum/123736 by WHRoeder
What is Digit ? in https://docs.mql4.com/predefined/variables/digits and https://docs.mql4.com/convert/doubletostr
Because you are the expert I should have said something, it might be important.
Now I use the MT4 platform and I see 4 digits after the decimal point (Bid-Ask = 0.0001 usualy). At the moment we programmed in MQL4 let it be.
In MT5, I see 5 digits after the decimal point. threre is differs betwen MQL4 and MQL5. At the moment this spreed does not matter to me. Important to our EA worked well.
I do not want at this time to talk about it (unless necessary)
AND I WROTE PROGRAM for me is good :) how about You?