Buy + Sell Every New Candlestick EA - page 4

 
nicholi shen:

I will assert that the only people 

Well maybe you just don't know about other things.

I guess that is what makes this world work.

If everybody knew and did the same it would come to a complete stop.

One man's trash is another man's treasure.
 
MT4 Trading:

Wow thanks a lot my friend. Please make it to work on MT4 if you can.

Thanks a lot man. You are a star

Cheers

void OnTick ()
{
     static datetime timeBar = 0;
     datetime tBar[];
     CopyTime ( _Symbol, 0, 0, 1, tBar );
     if (timeBar == tBar[0])
           return;
     timeBar = tBar[0];
     
     if ( OrderSend ( _Symbol, ORDER_TYPE_SELL, 0.1, Bid, 5, 0, 0, "", 12345 ) > 0 )
           int ticket = OrderSend ( _Symbol, ORDER_TYPE_BUY, 0.1, Ask, 5, 0, 0, "", 12345 );
}
Did on fact helped?
Write code. just for fun.
 
Konstantin Nikitin:
Did on fact helped?
Write code. just for fun.

Wow. Thanks a lot Man. Got it already

This exactly what i wanted. Thank you so much for your time.

God Bless You Friend

 
How about some test results ?
 
Marco vd Heijden:
How about some test results ?

Here friend


Sorry for late response

Files:
 

Not what i expected.

Did you close also at the end of the candle ?

 
Marco vd Heijden:

Not what i expected.

Did you close also at the end of the candle ?

Kinda looks like they're all left open with a small TP (average 10pt, max 20pts from report) and no SL (well at least none that would be hit)

 
Marco vd Heijden:

Not what i expected.

Did you close also at the end of the candle ?

No. We modified the script a little bit.


What i wanted basically is the EA or script to execute 2 Hedging (Buy + Sell) positions at the beginning of each candlestick.


To give a hint on what is going on with the results you see. This script is on D1 time frame with 10 TPs only. Although i modified the EA a little bit.

 
Okay thanks.
 
Marco vd Heijden:
Okay thanks.
Ok Cheers Man
Reason: