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
Hey Daz & Co,
hothand works on five digit MT4, but not on a four digit platform.
hothand works on five digit MT4, but not on a four digit platform. Any idea what causes this, and any clues on how to fix it?
Alright I am back,
This is the part of my code where trades get executed, I am just going to work with 5 digits for the moment. The idea here is I used my hothand function to pick which pair is best to trade for the day. This code should scan for an inside bar on the 1 hour chart. ( The hothand function returns a string of the pair btw) When it finds an inside bar I have just got it to open a flat out buy or sell trade for testing purposes. I am not sure if the backtester can handle trading multiple pairs from 1 chart? I downloaded the 1min history for all the pairs it uses. But it only seems to open trades on the eurusd which is the chart I have attached it to,
WHRoeder thanks for dropping by and helping again also. So is the correct way to open a trade with an ea to open it then go back and fill in the sl and tp after it has opened? I am sure you can spot a million things wrong with that code also.
Not adjusting slippage for 4/5 digits. Not ECN compatable
Always test return codes so you find out WHY it doesn't work
buystop = iLow(hothand()...
Your stops are based on the pair hothand(), but you're opening an order with Symbol(). If they're not the same the stops are completely bogusAlright I am back,
This is the part of my code where trades get executed, I am just going to work with 5 digits for the moment. The idea here is I used my hothand function to pick which pair is best to trade for the day. This code should scan for an inside bar on the 1 hour chart. ( The hothand function returns a string of the pair btw) When it finds an inside bar I have just got it to open a flat out buy or sell trade for testing purposes. I am not sure if the backtester can handle trading multiple pairs from 1 chart? I downloaded the 1min history for all the pairs it uses. But it only seems to open trades on the eurusd which is the chart I have attached it to,
Some general comments:
you buy at Ask and sell at Bid
if your broker is an ECN type broker you cannot set SL and TP when you place the order (in this case set them to 0), you have to place the order, then modify the order to add the SL & TP
always check the result of placing an order and check for returned errors, you will need to handle these by acting accordingly
if you plan on having this EA on multiple charts, i.e. placing Orders from multiple charts, you will need some kind of Mutex to avoid Order Context Busy (check WHRoeder's posts, he has an excellent Mutex)
But it only seems to open trades on the eurusd which is the chart I have attached it to,
Yep, . . .
Symbol() is the pair that the EA/Indicator is attached to, did you mean to do this instead ?
Yes I did mean to do that, but now I get this error
http://clip2net.com/s/144hq
Like it doesn't recognize the pair output of the hothand function. The hothand function's output is a string so I dont see what it wont work
Like it doesn't recognize the pair output of the hothand function. The hothand function's output is a string so I dont see what it wont work
Hey there guys, I am trying to make some code that does the following
If a pending order has been open for x amount of bars delete it if bar number have exceeded x
Something might be wrong with my logic maybe?