Post your code blocks here - page 2

 

Testing Buy Or Sell Right At Close Of Current Bar

This is a great little test to see whether the current bar meets or exceeds your buy or sell condition on the current bar right near the close of the current bar.

Without this test the condition may have been met earlier in the current bar and is already reversing in the wrong direction by the close of the current bar. To wait for the next bar may result in a rapid gap up or down in the desired direction leaving you behind in the dust or rapid gapping up or down in the undesired direction!

Dave

Have a Blessed Day in the Lord!

 

Found this .zip on the forum - A bunch of custom .wav files for custom sounds to include in your ea. Open the zip and view!

Dave

Files:
 

View buffer values of indicator buffers easily!

Ctrl-D

Dave

 

Hi, Dave!

very god idea - and as Omelette mentioned - different cases- different solutions - we also need to add link to whole indi where problem was solved in certain way

 

I would have to think about that - Very limited time on my hands, and I am still struggling to find or create a ea system that works reliably. I used the Best ea's recently listed on this forum along with my own creation ea and both got beat up last night in demo trading.

Dave

 
if ((todayGap>=10) && isTradingTime) Order = SIGNAL_BUY;

if ((todayGap<=10) && isTradingTime) Order = SIGNAL_SELL;

whats todayGap>=10?

whats todayGap<=10?

whats &&?

whats isTradingTime?

can u tell me the meaning of this code?

thanks

 
MANSTIR:
if ((todayGap>=10) && isTradingTime) Order = SIGNAL_BUY;

if ((todayGap<=10) && isTradingTime) Order = SIGNAL_SELL;

whats todayGap>=10?

whats todayGap<=10?

whats &&?

whats isTradingTime?

can u tell me the meaning of this code?

thanks

todayGap has got to be defined somewhere else in the code, find that and it will tell you what it means.

>=10 (greater than or equal to 10)

<=10 (less than or equal to 10)

&& (simply means and)

if ((todayGap<=10) && isTradingTime) Order = SIGNAL_SELL;

This ifstatement simply says that if todayGap is less than or equal to 10 and isTradingTime(if time falls within set trading time parameters) then Order = SIGNAL_SELL.

 

thanks so much my friends... many hours need to learn this language...

Reason: