MA cross PRICE level ... EA - page 2

 

Thank You once again for your work ... it's a big step for me to have this EA, any way

 
matrixebiz:
Why this:

PARAMETERS_INDICATOR_TWO = "Price";

extern double Close0buy = 1.2340; // price level for buy order

extern double Close2sell = 1.2250; // price level for sell order

Do you have to set trigger prices ??

Please explain.

mistrz-swiata wanted to have the following EA: MA is crossing the price level.

It's ok. No problem.

Problem is the following: he wants for the order to be reversed every time MA is crossing the price level.

For example we have sell order. And MA is crossing the price for buy. So this sell order should be reversed to be a buy order.

Reversed, or close sell and open buy in the same moment and in the same bar.

He wants the following:

- condition to open buy order = condition to close sell order;

- condition to open sell order = condition to close buy order.

In the other words:

Open the order and close the other order in the same time on the same condition using the same value of MA and price level.

I could not create EA with this rule. I created just something which is very similar.

 

and It is working ! the latest version with "openBUY/closeBUY" and "openSELL/closeSELL" parameters.

F.ex

I want EA to Buy/Sell at X price .... than I set:

openBUY at X (buys when MA crosses X from below)

closeBUY at X-1 pip (closes position when MA crosses X-1 from above)

closeSELL at X-2 pips (closes position when MA crosses X-2 from below)

openSELL at X-3 pips (sells when MA crosses X-3from above)

like in picture below .... (expl_1)

but there is a little problem ... it sometimes opens MORE positions that it is set in "MAXorders" ... why is that ?

like in picture (expl_2)

could You just make a last version without this parametr ? (maxorders)

Files:
expl_1.jpg  65 kb
expl_2.jpg  73 kb
 

Results?

Hi:

Is this for testing only or are you trading Live with this strategy?

Is there result trading this system? Demo or Live?

Thanks for sharing.

mistrz-swiata:
and It is working ! like in picture (expl_2) could You just make a last version without this parametr ? (maxorders)
 

i am testing it for couple of days ... on demo account. When it will work properly I'll go to real.

but as You can see this EA needs to be fed with price level (f.ex. resistance price) .... and it's the most important - how You will estimate those prices.

 
mistrz-swiata:
i am testing it for couple of days ... on demo account. When it will work properly I'll go to real. but as You can see this EA needs to be fed with price level (f.ex. resistance price) .... and it's the most important - how You will estimate those prices.

The main problem with this EA is "reversal" the orders from buy to sell for example. There si the script to reverse the orders and I will try to implement it to the EA.

Anyway it is not easy for me.

 

thank You mqldev !

 
mistrz-swiata:
thank You mqldev !

You're welcome

 

did it work???

mistrz-swiata:
thank You mqldev !

Hi mistrz,

Could I know did it work for you or not?

Reason: