CABLE Doji Straddle - page 4

 

Thanks PJ

primajaya:
I code it last night,

I'm sure there still a lot of things to do especially with the logic trade, to make this method / ea profitable..

Pj

Cheers for your input PJ... I'll start making some adjustments to the strategy to suit. I think this is more likely to be a reletively good scalper and with decent money management and loss handling could be a winner.

Will post what I find.

 

Issue with the code

I appear to have 'order open error because of: 130'when I run your EA, PJ. Upon looking at your code I see that you are defining the OrderSend directly...

In your code:

void openorder(string simbol, int trade, double lotsize, double price, double sl, double tp,string pesan, int magic)

...

tiket=OrderSend(simbol,trade,lotsize,price,slip,sl,tp,pesan,magic,0,White)

I notice that you do not define the slippage in the openorder function yet it is there in the OrderSend (obviously). Would that have something to do with the error I am receiving?

I am using Cable with various TF's and the issue occurs on all. Am I missing something obvious?

 
Limstylz:
I appear to have 'order open error because of: 130'when I run your EA, PJ. Upon looking at your code I see that you are defining the OrderSend directly...

I notice that you do not define the slippage in the openorder function yet it is there in the OrderSend (obviously). Would that have something to do with the error I am receiving?

I am using Cable with various TF's and the issue occurs on all. Am I missing something obvious?

Slippage = slip, you get my point?

Error code 130: Invalid Stops..

Perhaps:

You set the Stoploss(SL) or take profit(TP) too low..

Pj..

 

Yeah, got that...

primajaya:
Slippage = slip, you get my point?

Error code 130: Invalid Stops..

Perhaps:

You set the Stoploss(SL) or take profit(TP) too low..

Pj..

I realised slip was Slippage... but neither slip, nor slippage is defined in void openorder, which is probably why it confused me...

Nevertheless, I am aware that 130 errors are to do with stops and I thought that as there was no slippage defined, that this would impact further down.

Putting the TP and SL either higher or lower has no bearing on the error at all. Still the same thing.

What pair and TF did you test this on?

 

hi PJ, i never got the chance to say thank you for the mod you did to the indi, thank you.

Can you please do MTF version of this indi?

as for the EA,

i download the EA since the method looks good on my charts, and i would like to suggest few improvements if anyone will find them useful.., So:

what i want to add is a more dynamic SL rather then fixed one, and ofcourse good MM its what this EA really need to.

So,

DaynamicSL_: True\False

when set to True the stop loss would be as long as the range of the doji itself

when set to False the stop loss will be fixed, like the way it is now.

for example: lets say a Doji with a range of 15 pips has been formed, the ea will place the orders as it should but with SL of 15 pips.

Add_X_pipsToSL_:0-100..

Add_X_pipsToSL actually means it will add more pips to our SL.

for example: lets say a Doji with a range of 15 pips has been formed, it means that our SL will be 15 pips, Add_X_pipsToSL will let us add more pips to our 15 pips SL, so if our SL is 15 pips and we write we want to add 2 pips, it will add 2 pips to every SL order and now it will be 17 pips SL.

As for MM method, lets find a good settings first that would give us a good wins% and according to that % we can do a proper MM.

BUT, Firstly we need to make this ea works in his simple form...i'm having the same 130 error type as Limstylz even when the SL\TP has been changed.

Thanks

-m-

 

It's work good on my tester

Still don't know what exactly the real problem,

but it works good on my tester..on EURGBP M30

Pj..

Files:
 

ea

LIM have you been able to find the reason we are getting the order closing error. . i have been traring your system and find it profitable . thanks for what you do. texan

 

Not sure why

Hi Texan,

You shouldn't get an order close error unless you get slippage. You could try altering the slippage in the code. Personally, I'm getting issues with placing orders... i.e. it doesn't place orders when it should when forward testing...

Whilst backtesting however, this EA looks to be quite profitable provided you use good account management, which incorporates increasing lot sizes and ensuring that equity doesn't drawdown beyond your means.

However, I severly lack the necessary programming skills to improve my original EA and I have reverted to using a script which I use to manually place trades when a doji occurs. This does mean that I am sitting in front of my machine all day, but at least this means that I am not in danger of leaving any bad trades too long and accumulating massive drawdowns.

On a side note, can someone tell me how to code for the shortest bar (difference between high and low) within a given range of say the last 6 or 12 bars? This will allow me to use variable take profits which means better returns than using a set take profit of 5-10 pips and also means that I am less likely to see lengthy trades and ultimately longer drawdowns.

 

pj ea

HELLO PJ ....i have a question.. are there any difference in your ea post on \30 and the one on 37. thanks TEXAN

 
texan:
HELLO PJ ....i have a question.. are there any difference in your ea post on \30 and the one on 37. thanks TEXAN

There was no different .........Only to make sure..