Ask! - page 113

 

I am having some headache now...the current indicator doesn't really do what I want it to do....

what I want is...

Buy

Sellflag != 1 (Sellflag is not 1)

OzFX Buy signal

If ADX>25, Set Buyflag=1

SELL

Buyflag != 1 (buyflag is not 1)

OzFX Sell signal

If ADX>25,Set sellflag=1

When ADX<25, reset the buy/sellflag=0

By Doing so, we can filter out fake/weak breakout!!!

I have attached, the source code for the guru to help me out!!

sonic

Files:
 

I start to change things... but...

your main loop is wrong, and your logic "and" and "or" functions are not fitted well in the code... so I think there is something wrong with the logic...

can you tell me about AC and STOCH and ADX in your own words?

The way it's programmed now will give a big load on your pc to calculate... have to change almost everything...

...

sonicdeejay:
I am having some headache now...the current indicator doesn't really do what I want it to do....

what I want is...

Buy

Sellflag != 1 (Sellflag is not 1)

OzFX Buy signal

If ADX>25, Set Buyflag=1

SELL

Buyflag != 1 (buyflag is not 1)

OzFX Sell signal

If ADX>25,Set sellflag=1

When ADX<25, reset the buy/sellflag=0

By Doing so, we can filter out fake/weak breakout!!!

I have attached, the source code for the guru to help me out!!

sonic
 
IN10TION:
I start to change things... but...

your main loop is wrong, and your logic "and" and "or" functions are not fitted well in the code... so I think there is something wrong with the logic...

can you tell me about AC and STOCH and ADX in your own words?

The way it's programmed now will give a big load on your pc to calculate... have to change almost everything...

...

the for loop is correct???

int start()

{

for (k = Bars - 205; k >= 0; k --)

{

 

Thanks for the reply,

This is the section of code. It's just a moving average envelope that I would like to have mark the high and low points on each bar. Since I am using about six or eight points on each bar, the dash would crowd the screen less than the current smallest arrow I could find (the "110" square arrow shape).

//---- indicators

IndicatorBuffers(2);

SetIndexBuffer(0,ma1);

SetIndexBuffer(1,ma2);

SetIndexStyle(0,DRAW_ARROW,0,0);

SetIndexStyle(1,DRAW_ARROW,0,0);

SetIndexArrow(0,110);

SetIndexArrow(1,110);

SetIndexShift(0,shift);

SetIndexShift(1,shift);

SetIndexLabel(0,"MA Down");

SetIndexLabel(1,"MA Up");

//----

return(0);

I have attached a pic with two MA's indicated. You can see what I have once I activate all 4 of them.

IN10TION:
can you send your code, the way it is now... and if possible make a picture in what you want... it's a little unclear about the result... Have a nice weekend!
Files:
chartpick.gif  19 kb
 

I've searched long enough now ... the only solution I see and also the best is using ObjectCreate, I came to that conclusion also few months ago, if you're happy with the bitmap code 110 or other sign, use that... I use in my software much times ObjectCreate, it's doing a great job and even better, don't worry about slowing down your application, even 200.000 objects will not slowing down. Also, your index buffers will be free to do other data calculations if needed (you have only 8). With objectCreate you have more free choices to color sign special points on your chart, unlimited ...

share your thoughts, I'm here ...

little extra: SetIndexArrow(0,59); (change 110 in 59, it looks like a dash, with the "width" you can make it a little bigger)

kiromano:
Thanks for the reply,

This is the section of code. It's just a moving average envelope that I would like to have mark the high and low points on each bar. Since I am using about six or eight points on each bar, the dash would crowd the screen less than the current smallest arrow I could find (the "110" square arrow shape).

//---- indicators

IndicatorBuffers(2);

SetIndexBuffer(0,ma1);

SetIndexBuffer(1,ma2);

SetIndexStyle(0,DRAW_ARROW,0,0);

SetIndexStyle(1,DRAW_ARROW,0,0);

SetIndexArrow(0,110);

SetIndexArrow(1,110);

SetIndexShift(0,shift);

SetIndexShift(1,shift);

SetIndexLabel(0,"MA Down");

SetIndexLabel(1,"MA Up");

//----

return(0);

I have attached a pic with two MA's indicated. You can see what I have once I activate all 4 of them.
Files:
screen_.jpg  52 kb
 

it is correct... but...

if you have 10.000 bars per chart and/or multiple charts... every time, if there is a tick from new quotes, it will recalculate the total indicator from the beginning, that will make the performance much slower and unneeded...

There is also a fault in your stochastic signal OzFX_Regular part between UP and DOWN differences ( if function )

sonicdeejay:
the for loop is correct???
int start()

{

for (k = Bars - 205; k >= 0; k --)

{

 

Multi indicator question

Hello

I have a system that I have trading live but manually it has 5 indicators.

Slope Direction for general trend direction. And 4 others.

With the 4 others I only enter a position only if any 3 out of the 4 have fire a signal and are in the same direction as the Slope Direction indicator When coding can this sort or discretion be coded into an EA.

I would like to think it can be after seeing some of the fantastic EA's the are knocking around this forum

 

I'm all ears, you can send me a private message or bring it in the open...

if your indicators are well coded your finishing EA is not so far away.

Beno:
Hello

I have a system that I have trading live but manually it has 5 indicators.

Slope Direction for general trend direction. And 4 others.

With the 4 others I only enter a position only if any 3 out of the 4 have fire a signal and are in the same direction as the Slope Direction indicator When coding can this sort or discretion be coded into an EA.

I would like to think it can be after seeing some of the fantastic EA's the are knocking around this forum
 

in10tion,

Couldn't see the "tree" for the "forest" (I said it backwards on purpose), the 59 arrow code does just fine. I just like simpler whenever I can get it. The objectcreate function involves a little more if I'm going to create and leave it on the chart. Plus I use the different levels through iCustom.

Much obliged.

May the pip gods look upon you favorably.

IN10TION:
I've searched long enough now ... the only solution I see and also the best is using ObjectCreate, I came to that conclusion also few months ago, if you're happy with the bitmap code 110 or other sign, use that... I use in my software much times ObjectCreate, it's doing a great job and even better, don't worry about slowing down your application, even 200.000 objects will not slowing down. Also, your index buffers will be free to do other data calculations if needed (you have only 8). With objectCreate you have more free choices to color sign special points on your chart, unlimited ...

share your thoughts, I'm here ...

little extra: SetIndexArrow(0,59); (change 110 in 59, it looks like a dash, with the "width" you can make it a little bigger)
 
IN10TION:
try this one...

Thank you very much for your help. Sincerely appreciated.