stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Fratelli EA by Dragos and magft
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=77
Page 7 of 23
Author:  magft [ Mon Nov 28, 2011 9:14 am ]
Post subject:  Re: Fratelli EA by Dragos and magft

gaheitman wrote:Mike,

I think the issue is with your error filter. You currently have:

Code: Select all

            if (err!=0||err!=1)
With this, if err = 1, the err!=0 side will evaluate to true, which makes the whole statement true.

I think you want to say:

Code: Select all

            if (err!=0 && err!=1)
Or you could say:

Code: Select all

            if (!(err==0||err==1))
But that's not exactly easier to read. :> Perhaps a simple:

Code: Select all

            if (err>2)
I saw it quite a few times before the switch went off. :D

George
George as usual your help has pointed out the obvious blunder in my logic, though i have chosen

Code: Select all

            if (err>1)
as i am not sure what error code 2 means. I had this running a few hrs now and no more errors :D

UPDATE in post #1.

Tex, i'll look into later on, i have had a few losing trades and now 3 winners, have you put a value in the ATR section as this overrides other settings?

Mike
Author:  tex [ Mon Nov 28, 2011 9:15 am ]
Post subject:  Re: Fratelli EA by Dragos and magft

no sir, the ATR settings are OOTB.


magft wrote:
gaheitman wrote:Mike,

I think the issue is with your error filter. You currently have:

Code: Select all

            if (err!=0||err!=1)
With this, if err = 1, the err!=0 side will evaluate to true, which makes the whole statement true.

I think you want to say:

Code: Select all

            if (err!=0 && err!=1)
Or you could say:

Code: Select all

            if (!(err==0||err==1))
But that's not exactly easier to read. :> Perhaps a simple:

Code: Select all

            if (err>2)
I saw it quite a few times before the switch went off. :D

George
George as usual your help has pointed out the obvious blunder in my logic, though i have chosen

Code: Select all

            if (err>1)
as i am not sure what error code 2 means. I had this running a few hrs now and no more errors :D

UPDATE in post #1.

Tex, i'll look into later on, i have had a few losing trades and now 3 winners, have you put a value in the ATR section as this overrides other settings?

Mike
Author:  magft [ Mon Nov 28, 2011 9:24 am ]
Post subject:  Re: Fratelli EA by Dragos and magft

I have noticed a bug, one of my losing trades earlier happened due to the arrow appearing out of hrs. I think this is wrong so i'll check out the rules, unless anyone else knows, and report back later. It is a simple fix to check time.

I like the way the profits run if we go further on, nice addition Dragos from spider ea.

Ive put my set files here as well, ea defaults are my eu settings, though i think SL and TP need updating, cant remember.

PS any winning pips are most definately welcome though you can keep the losers :lol:

edit: the pic was meant to show the tp line near top, moved to 2nd tp, but in the time i took to save pic it close :roll:

Mike
Author:  gaheitman [ Mon Nov 28, 2011 9:25 am ]
Post subject:  Re: Fratelli EA by Dragos and magft

magft wrote: George as usual your help has pointed out the obvious blunder in my logic, though i have chosen

Code: Select all

            if (err>1)
as i am not sure what error code 2 means. I had this running a few hrs now and no more errors :D


Mike
I meant "err>1", I just mistyped. Though apparently error # 2 is ERR_COMMON_ERROR, which, as you probably guessed stands for "Common error." I think it means your crappy broker can't give you a good data feed so keeps disconnecting you. At least that is what I am getting from Cowboy IBFX this morning. grrrr.

George
Author:  magft [ Mon Nov 28, 2011 9:39 am ]
Post subject:  Re: Fratelli EA by Dragos and magft

gaheitman wrote:
magft wrote: George as usual your help has pointed out the obvious blunder in my logic, though i have chosen

Code: Select all

            if (err>1)
as i am not sure what error code 2 means. I had this running a few hrs now and no more errors :D

Mike
I meant "err>1", I just mistyped. Though apparently error # 2 is ERR_COMMON_ERROR, which, as you probably guessed stands for "Common error." I think it means your crappy broker can't give you a good data feed so keeps disconnecting you. At least that is what I am getting from Cowboy IBFX this morning. grrrr.

George
Mistyping is far to easy with this code :D

Can you have a look at the Breakeven code as there is still an error. I have a loop now that the is changing the SL from the early one to the updated one i think. Some thing in the logic is wrong but
i cant look at it now, got to do the day job!

Also, i think in LookForTradingOpportunities where we set the price based on high/low of previous candle, i'm wondering if tex's problem is to do with how we add the sl/tp to the calculated price for POs.

I really must get on, but this is more fun than thermodynamic calculations :?

Mike
Author:  gaheitman [ Mon Nov 28, 2011 10:09 am ]
Post subject:  Re: Fratelli EA by Dragos and magft

magft wrote: Can you have a look at the Breakeven code as there is still an error. I have a loop now that the is changing the SL from the early one to the updated one i think. Some thing in the logic is wrong but
i cant look at it now, got to do the day job!

Also, i think in LookForTradingOpportunities where we set the price based on high/low of previous candle, i'm wondering if tex's problem is to do with how we add the sl/tp to the calculated price for POs.

I really must get on, but this is more fun than thermodynamic calculations :?

Mike
In LookForTradingOpportunities, I see two issues. First of all, when you successfully set a pending order, the TP and SL are based on the price you wanted, not what you get when you finally get filled. I struggle with my own trading whether I should update the SL/TP when I have particularly bad slippage, so I don't have any advice for you here. This problem would be apparent if the distance between the TP and SL are still TP+SL pips away and the entry price has slid up or down between them.

The second issue is the same issue, but more apparent in the code. If you find that you have to change to a OP_BUY or OP_SELL, you should probably reset price to Ask (or Bid) and then calculate TP and SL from the new price. I know that seems to go against my last paragraph, but I'm a complex guy. Actually, since the code doesn't check to see how far price has gone above Ask, you could be entering really late in the move and have crummy risk/reward without knowing it.

One other question I have is whether you are supposed to consider the price target (the High of the trigger candle +BuyBufferPips) as the price that the bid has to be at in order to enter the trade or whether the BuyBufferPips includes the spread. If the former, than to be consistent with the methodology you would need to add the spread to your price before calculating everything.

I didn't see anything in BreakEvenStopLoss, but I'll have another look.

George
Author:  DragosDanescu [ Mon Nov 28, 2011 10:30 am ]
Post subject:  Re: Fratelli EA by Dragos and magft

I like the way the profits run if we go further on, nice addition Dragos from spider ea.
No, it's not from Spider. But can be implemented into any EA. It was just an ideea I implemented for testing. It's useful, in situations like this one, when price is climbing like crazy. But sometimes, ExtendTP prevent you to close a trade at full TP.
Author:  magft [ Mon Nov 28, 2011 12:57 pm ]
Post subject:  Re: Fratelli EA by Dragos and magft

DragosDanescu wrote:
I like the way the profits run if we go further on, nice addition Dragos from spider ea.
No, it's not from Spider. But can be implemented into any EA. It was just an ideea I implemented for testing. It's useful, in situations like this one, when price is climbing like crazy. But sometimes, ExtendTP prevent you to close a trade at full TP.
Oh right sorry thought i'd seen it before. It is kind of what BlackEagle suggested letting profits run. I like it but as you said need to debug it to make ure it does what we are after.

There is a bug, i am in a EJ trade that is not valid, see pic. On plus side i am up 136pips this morning, though could be more so need to review trademanagement and trades taken this morning. I am trading the 4 pairs using set files i posted. It has been a good morning :mrgreen:

Also i am using old time settings at the moment, so for tomorrow i will update to 7:10-18:00 GMT.
Mike
Author:  dynel14 [ Mon Nov 28, 2011 1:25 pm ]
Post subject:  Re: Fratelli EA by Dragos and magft

tex wrote:Dragos, Mike,

i think theres a bug in the new 2.5 EA. Look at screenshots. In my EU trade i set the TP=20 and SL=25 acording to the rules. The EA opened a trade but the TP was set to about 14,9P only. Same in the recent EJ trade.
I set the EA to Tp=20, SL = 20. But the EA opened the trade with TP = 15,6p, SL = 32,4p ??

Can u check this please.

thanks
Same here with AU.

Thank you
Author:  PETE [ Mon Nov 28, 2011 1:34 pm ]
Post subject:  Re: Fratelli EA by Dragos and magft

Hi Dragos/Magft
Loaded Version 2.5 but trades are getting error(131) invalid trade volume ,any ideas?
All times are UTC Page 7 of 23