how to add indicator code into expertadvisor code ?? - page 7 12345678910 New comment Simon Gniadkowski 2012.05.17 12:48 #61 onewithzachy: Just the lot size, the take profit and stop loss must be calculated based on Ask or Bid price (or buy or sell) :) Sure, but a Function isn't needed for that, the calculation can be placed directly into the OrderSend() or used with the intermediate variable . . . This . . . double GetTakeProfitBuy() { return(Ask+longTradeTP*Point); } and this . . . ldTake = GetTakeProfitBuy(); and this . . . OrderSend(Symbol(),OP_BUY,ldLot,Ask,Slippage,ldStop,ldTake,lsComm,0,0); can be replaced with this . . . OrderSend(Symbol(),OP_BUY,ldLot,Ask,Slippage,ldStop, Ask+longTradeTP*Point ,lsComm,0,0); longTradeTP is an extern onewithzachy 2012.05.17 12:55 #62 RaptorUK: Sure, but a Function isn't needed for that, the calculation can be placed directly into the OrderSend() or used with the intermediate variable . . . This . . . and this . . . and this . . . can be replaced with this . . . longTradeTP is an extern You're right, there are two OrderSend (), I thought there's only one :(. albert_lim83 2012.05.17 14:47 well, i trying demo since last week, my ea could gain around 15-30% daily. Don't believe in backtesting, forward test them. :) Simon Gniadkowski 2012.05.17 12:57 #63 onewithzachy: Don't believe in backtesting, forward test them. :) Forward testing is just a slow form of back testing, didn't we have this discussion before ;-) onewithzachy 2012.05.17 13:02 #64 RaptorUK: Forward testing is just a slow form of back testing, didn't we have this discussion before ;-) Yeah I read, it's just that I have this EA which is horrible in back testing but not bad in forward. So I don't believe in back testing since :) [Deleted] 2012.05.17 13:40 #65 how to do if i want to enter on highest/lowest of zigzag and exit on lowest/highest of it ?? now my system is just exit depend on tp/sl 。。。 [Deleted] 2012.05.17 13:50 #66 bool ExistPositions() { for (int i=100; i<OrdersTotal(); i++) { if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)&&(ZigZagHigh())/(ZigZagLow())) { if (OrderSymbol()==Symbol()) { return(True); } } } return(false); } do this correct ?? but it cant compile ... error show ZigZagHigh / ZigZagLow - function is not defined Simon Gniadkowski 2012.05.17 14:14 #67 Anything with () after it is a Function . . . for example OrderSymbol() [Deleted] 2012.05.18 20:21 #68 reading mql4 reference book, really tired ~~ [Deleted] 2012.05.18 22:15 #69 '\end_of_program' - unbalanced left parenthesis it's really drive me crazy...... Simon Gniadkowski 2012.05.19 07:59 #70 albert_lim83: '\end_of_program' - unbalanced left parenthesis it's really drive me crazy...... It will if you are not prepared to listen and learn . . . short cuts do not work . . . you need to learn. 12345678910 New comment
Just the lot size, the take profit and stop loss must be calculated based on Ask or Bid price (or buy or sell)
:)
Sure, but a Function isn't needed for that, the calculation can be placed directly into the OrderSend() or used with the intermediate variable . . .
This . . .
and this . . .
and this . . .
can be replaced with this . . .
longTradeTP is an extern
Sure, but a Function isn't needed for that, the calculation can be placed directly into the OrderSend() or used with the intermediate variable . . .
This . . .
and this . . .
and this . . .
can be replaced with this . . .
longTradeTP is an extern
You're right, there are two OrderSend (), I thought there's only one :(.
well, i trying demo since last week,
my ea could gain around 15-30% daily.
Don't believe in backtesting, forward test them.
:)
Don't believe in backtesting, forward test them.
:)
Forward testing is just a slow form of back testing, didn't we have this discussion before ;-)
Yeah I read, it's just that I have this EA which is horrible in back testing but not bad in forward. So I don't believe in back testing since
:)
how to do if i want to enter on highest/lowest of zigzag and exit on lowest/highest of it ??
now my system is just exit depend on tp/sl 。。。
do this correct ??
but it cant compile ...
error show ZigZagHigh / ZigZagLow - function is not defined
reading mql4 reference book,
really tired ~~
'\end_of_program' - unbalanced left parenthesis
it's really drive me crazy......
'\end_of_program' - unbalanced left parenthesis
it's really drive me crazy......