How to code? - page 31

 

EA will show trades in the popup window but...

I'm a newbie programmer. I've programmed an EA that will work in the strategy tester and will pop up a buy or sell window live. The problem is that no trades show up on the chart or in the account. Any ideas on why this might be happening?

Thanks

 
phasna:
I'm a newbie programmer. I've programmed an EA that will work in the strategy tester and will pop up a buy or sell window live. The problem is that no trades show up on the chart or in the account. Any ideas on why this might be happening? Thanks

Hi. Well, if there are not trades shown in your account, it is obviously a problem with the trading logic - ie. it could be anything!

Apart from the obvious and posting the code for someone to look at, you should get an idea from the 'Journal' window during backtests as to why it is not opening trades (error messages).

 
 
 
 

Hi,

thank you very much, that i, what i need!

 

You're welcome.

 

Dear Friends,

I need some help.

Can somebody create custom indicator as follows :

Line 1a

Price Open - (Previous Range / 5)

Line 1b

Price Open - (Previous Range / 2)

Line 2a

Price Open + (Previous Range / 5)

Line 2b

Price Open + (Previous Range / 2)

The line can changed automatic for all time frame, its mean can automatic change with each period (M30, H1 or H4).

Thank you for your help.

Kind Regards,

Herly

 

Very important question

What is the code for this?

if Bid was(not is)greater or equal to 1.3450, then.........???

Thanks all!

 
High:
What is the code for this?

if Bid was(not is)greater or equal to 1.3450, then.........???

Thanks all!

If by "was(not is)" you mean during the previous bar then you can use:

iHigh(NULL,0,1) to return the highest bid price of the previous bar to see if the Bid "was" greater than X price. If you want to see if a bid during the current bar but not the current price was greater than X price that can also be done but is a little more tricky but easy enough. PM if you need more help.