How to code? - page 173

 
todonnelliv:

Are you able to code an EA that takes multiple timeframes into consideration?

really

Yip, no probs. Either pm me or just post the details here

 
Enforcer:
Use as valid cross only cross on previous bar.

I mean like this

Files:
 
 

You've got...

IndicatorBuffers(3);

but you're using 4 buffers. Change it to 4 and you should be OK. Also test for EMPTY_VALUE before using the times and be ready for a lot of re-painting

Good luck

Lux

 

Mods to our EA

Hey Bob, I tried to post a reply before but it seems it didn't go through or something.

I came across an EA which I beleave could add something to the system you and I are working on. The EA is called "EASY.ex4" What is does, is once a trade is opened with the EA attached to the chart, it draws a TP and SL trendline on the chart that can be moved and manipulated like any other trendline. The only difference is once the candle hits THIS trendline it closes the trade. (it also has some other options) it can be found here Forex Factory - View Single Post - "EASY" EA-Trading made easier!!!

As of now it only manages one trade at a time successfully. Unfortunately the author of the "EASY EA" did not include their code. However, there is a similar one called "Trendline trader" located here: Forex Factory - View Single Post - "EASY" EA-Trading made easier!!! I don't personally use this second EA I simply included it as a reference for trendline codes.

What I propose be added to the EA we're working on is to change our "dCloseAllPrice" option into one of these trendlines. So that when the line is crossed it closes all, and stops trading just like before, however in a movable trendline.

I also feel it would be useful to have an additional trendline drawn to initiate trading. This would give the EA almost a Start and Finish point to be determined by the user. Please let me know what you think, and thanks again for everything.

 

Mods to our EA

Hey Bob, I tried to post a reply before but it seems it didn't go through or something.

I came across an EA which I beleave could add something to the system you and I are working on. The EA is called "EASY.ex4" What is does, is once a trade is opened with the EA attached to the chart, it draws a TP and SL trendline on the chart that can be moved and manipulated like any other trendline. The only difference is once the candle hits THIS trendline it closes the trade. (it also has some other options) it can be found on another site

As of now it only manages one trade at a time successfully. Unfortunately the author of the "EASY EA" did not include their code. However, there is a similar one called "Trendline trader" located on the same forum as the first one. I don't personally use this second EA I simply included it as a reference for trendline codes.

What I propose be added to the EA we're working on is to change our "dCloseAllPrice" option into one of these trendlines. So that when the line is crossed it closes all, and stops trading just like before, however in a movable trendline.

I also feel it would be useful to have an additional trendline drawn to initiate trading. This would give the EA almost a Start and Finish point to be determined by the user. Please let me know what you think, and thanks again for everything.

I originally included links but it didnt post with them included, they're on ForexFactory

 

Point return zero

Hi,

I am new at this. Why is my statement Comment(Point) returning zero.

Thanks for your help.

 
Saab59:
Hi,

I am new at this. Why is my statement Comment(Point) returning zero.

Thanks for your help.

What exactly are you using Point for? Include some code or explanation.

 

Point return Zero

wolfe:
What exactly are you using Point for? Include some code or explanation.

I try to get an understanding of the Point predefined variable. Since there is no debugger available I would like to extract the value and then displayed it so that I can get a feeling for it for different currencies.

If I execute a simple statement like:

double point =MarketInfo(Symbol(),MODE_POINT); then try to display the value of point or using the predefined variable in a statement like

Comment(Point) it's returning zero.

I appreciate your help.

 
Saab59:
I try to get an understanding of the Point predefined variable. Since there is no debugger available I would like to extract the value and then displayed it so that I can get a feeling for it for different currencies.

If I execute a simple statement like:

double point =MarketInfo(Symbol(),MODE_POINT); then try to display the value of point or using the predefined variable in a statement like

Comment(Point) it's returning zero.

I appreciate your help.
double point =MarketInfo(Symbol(),MODE_DIGITS)*Point;

Comment("\nPoint = ",point);