要使用聊天,请登录。

Limit trade quantity to one

IXBONE
Jan 06 2016 at 08:22
97帖子
fxmiami posted:
Thanks IXBONE,

But, where do I place this code?

Should I send you the EA via pm so you can add?

Thanks!


sorry bro, you mentioned coding for free..., my suggestions are free! not my time and coding skills, also i do not code for others, sorry again.

price_action
Jan 06 2016 at 08:36
11帖子
Or you could try this.

int Sell = 1,Buy = 2,Last_Order = 1;

if( Last_Order == Sell && OrdersTotal() == 0 && Signal == Buy)
{

    //Place Buy order here.
    
      Last_Order = Buy;
}


if( Last_Order == Buy && OrdersTotal() == 0 && Signal == Sell)
{

    //Place Sell order here.

     Last_Order = Sell;
}


Hector Mestril (fxmiami)
Jan 06 2016 at 13:40
38帖子
IXBONE, then charge me.
How much?

To win you have to risk loss
Hector Mestril (fxmiami)
Jan 06 2016 at 13:45
38帖子
price_action posted:
Or you could try this.

int Sell = 1,Buy = 2,Last_Order = 1;

if( Last_Order == Sell && OrdersTotal() == 0 && Signal == Buy)
{

    //Place Buy order here.
    
      Last_Order = Buy;
}


if( Last_Order == Buy && OrdersTotal() == 0 && Signal == Sell)
{

    //Place Sell order here.

     Last_Order = Sell;
}



Price_action,

Where do I place this code?
I add it to the EA and I get an error 'Signal undeclared Identifier'

Thank you!

To win you have to risk loss
lawners1791
Jan 06 2016 at 15:39
17帖子
is that really ther is string of Last_order to work with the mql scripting? or those are returns of function switching with the initials?

price_action
Jan 08 2016 at 18:16
11帖子
Hector Mestril,

I posted two examples last night and now i don't see them. Here is a re-post.

I wrote two EA examples that demonstrates what you want.

EA_Example1 uses global variables to store the last order as in my previous post.

EA_Example2 uses order history to get previous order as IXBONE had suggested.

Hope this Helps.

附件:


price_action
Jan 08 2016 at 18:17
11帖子
lawners1791 posted:
is that really ther is string of Last_order to work with the mql scripting? or those are returns of function switching with the initials?


Look at EA_Examples should clear things up.

price_action
Jan 08 2016 at 18:21
11帖子
For some reason my posts are not being uploaded when attaching files.

price_action
Jan 08 2016 at 18:33
11帖子

Hi Hector Mestril,

This is price_action for some reason i can not post on this topic with my other username anymore.

I wrote two EA examples that demonstrates what you want.

EA_Example1 uses global variables to store the last order as in my previous post.

EA_Example2 uses order history to get previous order as IXBONE had suggested.

Hope this Helps.

附件:


Ion25
Jan 08 2016 at 18:33
1帖子
Hi Hector Mestril,

This is price_action for some reason i can not post on this topic with my other username anymore.

I wrote two EA examples that demonstrates what you want.

EA_Example1 uses global variables to store the last order as in my previous post.

EA_Example2 uses order history to get previous order as IXBONE had suggested.

Hope this Helps.

请登录以发表评论。