Edit Your Comment
Limit trade quantity to one
तबसे मेंबर है Jul 11, 2011
38 पोस्टों
Dec 23, 2015 at 00:13
तबसे मेंबर है Jul 11, 2011
38 पोस्टों
Hello guys,
I have an EA that works fine, it is a price action strategy, however, I am having a little problem.
Once the signal is generated, the trade is placed and the limit reached, it places another trade again, and again, and I end up losing what I made.
I need to tell the EA to just place one trade per signal, and ignore all subsequent trades until an opposite trade arises.
Can anyone help me with this?
Thanks!
I have an EA that works fine, it is a price action strategy, however, I am having a little problem.
Once the signal is generated, the trade is placed and the limit reached, it places another trade again, and again, and I end up losing what I made.
I need to tell the EA to just place one trade per signal, and ignore all subsequent trades until an opposite trade arises.
Can anyone help me with this?
Thanks!
To win you have to risk loss

forex_trader_249603
तबसे मेंबर है May 13, 2015
81 पोस्टों
तबसे मेंबर है Sep 05, 2013
49 पोस्टों
Dec 27, 2015 at 17:30
तबसे मेंबर है Sep 05, 2013
49 पोस्टों
another switch ... limit reached 1/0 or true/false .... at the beginning of your trade signal place this switch .... trade or return{0}
“Everybody should have a dream. What if that dream comes true?” – Jack Ma
तबसे मेंबर है Mar 02, 2010
95 पोस्टों
Dec 29, 2015 at 07:08
तबसे मेंबर है Mar 02, 2010
95 पोस्टों
-time based
-bar based
-order based (open,closed, history)
-profit based
many many options....
no one can fix this without code!
-bar based
-order based (open,closed, history)
-profit based
many many options....
no one can fix this without code!
ixbone@
तबसे मेंबर है Apr 10, 2015
17 पोस्टों
Jan 03, 2016 at 08:12
तबसे मेंबर है Apr 10, 2015
17 पोस्टों
@IXBONE yes i like the different option with the above mention on referring ones with the decision to gives with the chance on ea to work with the new order on creating position.
तबसे मेंबर है Jul 11, 2011
38 पोस्टों
Jan 04, 2016 at 18:54
तबसे मेंबर है Jul 11, 2011
38 पोस्टों
It would be order based, with a profit.
Thanks guys.
Help?
Thanks guys.
Help?
To win you have to risk loss
तबसे मेंबर है Mar 02, 2010
95 पोस्टों
Jan 05, 2016 at 12:05
तबसे मेंबर है Mar 02, 2010
95 पोस्टों
buy history sample, must be extended with tp code
int CountBuyHistoryOrders(){
int buycount=0;
if(OrdersHistoryTotal()>0){
for(int w=OrdersHistoryTotal()-1;w>=0;w--){
if(OrderSelect(w,SELECT_BY_POS,MODE_HISTORY))
if(OrderSymbol()!=Symbol() || OrderMagicNumber()!=Magic)continue;
if(OrderOpenTime()=iTime(NULL,1440,0))buycount++;
}
}
return(buycount);
}
int CountBuyHistoryOrders(){
int buycount=0;
if(OrdersHistoryTotal()>0){
for(int w=OrdersHistoryTotal()-1;w>=0;w--){
if(OrderSelect(w,SELECT_BY_POS,MODE_HISTORY))
if(OrderSymbol()!=Symbol() || OrderMagicNumber()!=Magic)continue;
if(OrderOpenTime()=iTime(NULL,1440,0))buycount++;
}
}
return(buycount);
}
ixbone@
तबसे मेंबर है Apr 10, 2015
17 पोस्टों
Jan 05, 2016 at 15:30
तबसे मेंबर है Apr 10, 2015
17 पोस्टों
IXBONE posted:the framing with the conservatism on leaving of the different offers with the focus of objection on referring ones to work with the initials on trader to gains of the limitation on order creation with the notice of preference as recognizing alert of incoming option.
-time based
-bar based
-order based (open,closed, history)
-profit based
many many options....
no one can fix this without code!
तबसे मेंबर है Jul 11, 2011
38 पोस्टों
Jan 05, 2016 at 16:14
तबसे मेंबर है Jul 11, 2011
38 पोस्टों
Thanks IXBONE,
But, where do I place this code?
Should I send you the EA via pm so you can add?
Thanks!
But, where do I place this code?
Should I send you the EA via pm so you can add?
Thanks!
To win you have to risk loss
तबसे मेंबर है Mar 02, 2010
95 पोस्टों
Jan 06, 2016 at 08:22
तबसे मेंबर है Mar 02, 2010
95 पोस्टों
lawners1791 posted:
the framing with the conservatism on leaving of the different offers with the focus of objection on referring ones to work with the initials on trader to gains of the limitation on order creation with the notice of preference as recognizing alert of incoming option.
no idea what you talking about...
ixbone@
तबसे मेंबर है Mar 02, 2010
95 पोस्टों
Jan 06, 2016 at 08:22
तबसे मेंबर है Mar 02, 2010
95 पोस्टों
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.
ixbone@
तबसे मेंबर है Apr 06, 2014
11 पोस्टों
Jan 06, 2016 at 08:36
तबसे मेंबर है Apr 06, 2014
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;
}
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;
}
तबसे मेंबर है Jul 11, 2011
38 पोस्टों
Jan 06, 2016 at 13:40
तबसे मेंबर है Jul 11, 2011
38 पोस्टों
IXBONE, then charge me.
How much?
How much?
To win you have to risk loss
तबसे मेंबर है Jul 11, 2011
38 पोस्टों
Jan 06, 2016 at 13:45
तबसे मेंबर है Jul 11, 2011
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
तबसे मेंबर है Apr 10, 2015
17 पोस्टों
Jan 06, 2016 at 15:39
तबसे मेंबर है Apr 10, 2015
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?
तबसे मेंबर है Apr 06, 2014
11 पोस्टों
Jan 08, 2016 at 18:16
तबसे मेंबर है Apr 06, 2014
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.
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.
तबसे मेंबर है Apr 06, 2014
11 पोस्टों
Jan 08, 2016 at 18:17
तबसे मेंबर है Apr 06, 2014
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.
तबसे मेंबर है Apr 06, 2014
11 पोस्टों
Jan 08, 2016 at 18:21
तबसे मेंबर है Apr 06, 2014
11 पोस्टों
For some reason my posts are not being uploaded when attaching files.
तबसे मेंबर है Apr 06, 2014
11 पोस्टों
Jan 08, 2016 at 18:33
तबसे मेंबर है Apr 06, 2014
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.

forex_trader_296600
तबसे मेंबर है Jan 08, 2016
1 पोस्टों
Jan 08, 2016 at 18:33
तबसे मेंबर है Jan 08, 2016
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.
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.

*व्यवसायिक इस्तेमाल और स्पैम को ब्रदाश नहीं किया जाएगा, और इसका परिणाम खाता को बन्द करना भी हो सकता है.
टिप: किसी चित्र या यूट्यूब या URL को पोस्ट करने से वे अपने आप आपके पोस्ट में आजाएगा!
टिप: @ चिन्ह को टाइप करें उपभोगता के नाम को अपने आप करने के लिए जो इस चर्चा में भाग ले रहा है.