Jump to content

Cable Run from Profitable FX


Recommended Posts

Dear fancy, take note the solid rock code I just scripted when inspiration came today.. The while (wild) loop force below clean up all open trades & pending orders when the MinProfit is hit..

happy coding...

 

double Pips = TotalProfit(Magic);

if (Pips >= MinProfit){

while(MyOrdersTotal(Magic) != 0){

CloseAllTrades(1, Magic);

CloseAllTrades(2, Magic);

DeletePendingOrders(Magic);

}

Link to comment
Share on other sites

  • Replies 921
  • Created
  • Last Reply

Top Posters In This Topic

This is the latest setting from muruku.... i use this on my live account start from today :D

 

http://www.multiupload.com/YYJMQK9FB2

 

give thanks to muruku for his great setting :D

 

 

 

Hi, thank you for sharing but when i tried to test it, it showed me this message

2010.09.22 15:38:25 Cannot open file 'C:\Program Files\FXDD Malta - MetaTrader 4\experts\indicators\ATR_Pips.ex4' on the GBPUSD,M15

 

although i am using i on the one hour and also i am 5digits.

i even tried to look for this indicator couldn't find it.

can you please help me?

Regards,

Link to comment
Share on other sites

Dear fancy, take note the solid rock code I just scripted when inspiration came today.. The while (wild) loop force below clean up all open trades & pending orders when the MinProfit is hit..

happy coding...

 

double Pips = TotalProfit(Magic);

if (Pips >= MinProfit){

while(MyOrdersTotal(Magic) != 0){

CloseAllTrades(1, Magic);

CloseAllTrades(2, Magic);

DeletePendingOrders(Magic);

}

 

 

can you please share with all the new features?

i also used to get this error from version 4

 

2010.09.22 15:38:25 Cannot open file 'C:\Program Files\FXDD Malta - MetaTrader 4\experts\indicators\ATR_Pips.ex4' on the GBPUSD,M15

 

i use 5digits.

 

please help

 

Thank you all

Link to comment
Share on other sites

ATR_Pips.ex4 can be found in www.

we no need this indicator to attach to any chart... as the robot will able to read this indicator's reading via icustom statement.

 

 

 

Hi, thank you for sharing but when i tried to test it, it showed me this message

2010.09.22 15:38:25 Cannot open file 'C:\Program Files\FXDD Malta - MetaTrader 4\experts\indicators\ATR_Pips.ex4' on the GBPUSD,M15

 

although i am using i on the one hour and also i am 5digits.

i even tried to look for this indicator couldn't find it.

can you please help me?

Regards,

Link to comment
Share on other sites

Zone C in actual rarely happens.. the theory behind slicing to each zone is ensure ATR_pips lines is FLATTEN & fall within any of these zones indicates market back to ranging phase again & where our bot come to the play...

 

Look's like you able to cope up with this ATM machine ... what an amazing !

 

 

 

hi muruku,

 

i`m still using the Zone A & zone B coding on my cent live account ....

 

 

 

but maybe now i`ll try your new setting ..... :D

Link to comment
Share on other sites

too many fancy of C@bleR** here ..

Here's the ATR pips logic i have...

 

 

Global variables

double ATRPeriod1 = 3.0;

double ATRPeriod2 = 4.0;

 

double ATRUpLimit1 = 13.0;

double ATRDnLimit1 = 7.0;

 

double ATRUpLimit2 = 21.0;

double ATRDnLimit2 = 16.0;

 

double ATRUpLimit3 = 26.0;

double ATRDnLimit3 = 24.0;

 

..

..

 

RefreshRates();

 

double ATRPips =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,0);

double ATRPrePips1 =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,ATRPeriod1);

double ATRPrePips2 =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,ATRPeriod2);

 

int MySignal = 0;

 

if (ATRPrePips1 >= ATRDnLimit1 && ATRPrePips1 <= ATRUpLimit1

&& ATRPrePips2 >= ATRDnLimit1 && ATRPrePips2 <= ATRUpLimit1

&& ATRPips >= ATRDnLimit1 && ATRPips <= ATRUpLimit1

) MySignal =1;

 

 

if (ATRPrePips1 >= ATRDnLimit2 && ATRPrePips1 <= ATRUpLimit2

&& ATRPrePips2 >= ATRDnLimit2 && ATRPrePips2 <= ATRUpLimit2

&& ATRPips >= ATRDnLimit2 && ATRPips <= ATRUpLimit2

/*|| HowTight >= HowTightDnLimit && HowTight <= HowTightUpLimit*/) MySignal =1;

 

 

if (ATRPrePips1 >= ATRDnLimit3 && ATRPrePips1 <= ATRUpLimit3

&& ATRPrePips2 >= ATRDnLimit3 && ATRPrePips2 <= ATRUpLimit3

&& ATRPips >= ATRDnLimit3 && ATRPips <= ATRUpLimit3

) MySignal =1;

 

MySignal = 1 ==> enter the trade !

 

Hi muruku,

thanks again for your job and help.

Sorry for this question but I need to be sure : the code above means your EA is using 2 ATRPips period settings (3 and 4) together (in the same time) ? And if the currency pair lays inside one of the 3 bands (ATRUpLimit1 = 3.0;ATRDnLimit1 = 7.0;ATRUpLimit2 = 21.0;ATRDnLimit2 = 16.0;ATRUpLimit3 =26.0;ATRDnLimit3 = 24.0), at least for one of the above ATRPips settings, it triggers(enter) the trade ?

I plotted the two ATRPips but I've seen they never reached (in the last few months) the values of the first band (from 3 to 7) . Probably I didn't got your point !

Please explain.

Link to comment
Share on other sites

This is the latest setting from muruku.... i use this on my live account start from today :D

 

http://www.multiupload.com/YYJMQK9FB2

 

give thanks to muruku for his great setting :D

 

Circumstances that I am not a mql expert or coder......

it doesn't seems to me you code is using the muruku's zones.

However thanks a lot for your contribution.

Link to comment
Share on other sites

These are the 3 ZONES/bands.

When ATR_pips for current bar, (0) & previous 3 & 4 concurrently fall under either these ZONEs. The trade should trigger (MySignal = 1). R u crystal clear ??

 

double ATRUpLimit1 = 13.0;

double ATRDnLimit1 = 7.0;

 

double ATRUpLimit2 = 21.0;

double ATRDnLimit2 = 16.0;

 

double ATRUpLimit3 = 26.0;

double ATRDnLimit3 = 24.0;

 

 

 

 

 

 

 

 

Hi muruku,

thanks again for your job and help.

Sorry for this question but I need to be sure : the code above means your EA is using 2 ATRPips period settings (3 and 4) together (in the same time) ? And if the currency pair lays inside one of the 3 bands (ATRUpLimit1 = 3.0;ATRDnLimit1 = 7.0;ATRUpLimit2 = 21.0;ATRDnLimit2 = 16.0;ATRUpLimit3 =26.0;ATRDnLimit3 = 24.0), at least for one of the above ATRPips settings, it triggers(enter) the trade ?

I plotted the two ATRPips but I've seen they never reached (in the last few months) the values of the first band (from 3 to 7) . Probably I didn't got your point !

Please explain.

Link to comment
Share on other sites

Thank you Muruku... i have got this error 2010.09.22 17:02:21 '2006005': order sell limit 0.10 GBPUSD opening at 1.56702 sl: 0.00000 tp: 0.00000 failed [invalid S/L or T/P]

 

2010.09.22 16:46:35 '2006005': order sell limit 0.10 GBPUSD opening at 1.56805 sl: 0.00000 tp: 0.00000 failed [invalid S/L or T/P]

 

 

what can i do to solve it ?

 

and can you please if you have the newest version with 5digits broker can you share ?

Thank you

Link to comment
Share on other sites

dun be greedy. If i were you, i will turn on max 2 instances during NY-Asian session with 0.1 lots..

The rest of 24 hrs run, 1 instance only to protect the $

i would suggest maintain the same codes for all the instances except each will run with diff magic (change this number everytime before you enter the trade, who knows your broker is nasty one).. also keep your eye open for kind of bugs found like ..

- if Instance A & B open trades almost same time, when their respective MinProfit hit, are ALL of them close up happily with at least greater & equal to MinProfit.. ?, you may want to insert the ordercomment so that visible which to which instances are managing its trades.

- Will Instance A interfere B in its opened trades ?

- We shouldn't expect duplicate entries of buy/sell limit by each instance .. you need to fix its logic to ensure this is not happened.. i 'm still studying if there's a logic to "watchdog" if duplication of pending orders happened, how to delete either one.

 

WOW.. too many wording for today. Cheers !

Hopefully your guys enjoy them !

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...