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

EA request Heiken Ashi
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3263
Page 5 of 17
Author:  milanese [ Fri Nov 15, 2013 7:19 pm ]
Post subject:  Re: EA request Heiken Ashi

TraderDesk wrote:
milanese wrote:
milanese wrote:
TraderDesk wrote:I just had three buys on EURJPY with a minute of each other... They should not do that as I have the "DelayTheAdditionalEntryForXBars=3" set for bars to close before opening a new position... See below chart...
chart1.png
Should it not wait three bars BEFORE opening a new additional position if conditions are met?

Thanks...
I see the problem it is how the 3 bars are handeled in code later I will take a look

Cheers:)

Tommaso
Ok here comes next update, now the DeltaTime Var are automatic set =TF
the problem you had described should now too be resolved

Cheers :)

Tommaso
Okay, trying it out now... I had posted this above buy I don't know if it made sense to you...

extern int DelayTheEntryForXBars=2;
extern double PriceFromHALine=5; should be optional for the crossover and opening of the original position.
--------------------------------------
extern int DelayTheAdditionalEntryForXBars=3;
extern double PriceFromHALine=5; Must be included as the EA must open an additional position when price comes back to the HA line...
yes I will in future make two different variables for that ;) is on to do list

Cheers :)
Tommaso
Author:  TraderDesk [ Fri Nov 15, 2013 7:22 pm ]
Post subject:  Re: EA request Heiken Ashi

using the latest EA it did not open a new position when price cross up an closed 1 bar. Here are the setting I have set for it.

AdvertisedSpread=5.00000000
UseFixedLot=1
FixedLot=0.10000000

DelayTheEntryForXBars=1
DelayTheAdditionalEntryForXBars=3
PriceFromHALine=0.00000000

AddAdditionalPositionsInTrend=1
MaxAdditionalPositions=3
chart2.png
Did I forget to add a variable correctly?
Author:  milanese [ Fri Nov 15, 2013 7:25 pm ]
Post subject:  Re: EA request Heiken Ashi

TraderDesk wrote:using the latest EA it did not open a new position when price cross up an closed 1 bar. Here are the setting I have set for it.

AdvertisedSpread=5.00000000
UseFixedLot=1
FixedLot=0.10000000

DelayTheEntryForXBars=1
DelayTheAdditionalEntryForXBars=3
PriceFromHALine=0.00000000

AddAdditionalPositionsInTrend=1
MaxAdditionalPositions=3
chart2.png
I see, I will look in the code why this happend..
Edit:should this be a main entry?
Cheers :)
Tommaso
Author:  TraderDesk [ Fri Nov 15, 2013 7:46 pm ]
Post subject:  Re: EA request Heiken Ashi

milanese wrote:
TraderDesk wrote:using the latest EA it did not open a new position when price cross up an closed 1 bar. Here are the setting I have set for it.

AdvertisedSpread=5.00000000
UseFixedLot=1
FixedLot=0.10000000

DelayTheEntryForXBars=1
DelayTheAdditionalEntryForXBars=3
PriceFromHALine=0.00000000

AddAdditionalPositionsInTrend=1
MaxAdditionalPositions=3
chart2.png
I see, I will look in the code why this happend..
Edit:should this be a main entry?
Cheers :)
Tommaso
Hi Tommaso... Yes this was supposed to be the cross with the main entry.... :)
Author:  milanese [ Fri Nov 15, 2013 7:50 pm ]
Post subject:  Re: EA request Heiken Ashi

TraderDesk wrote:
milanese wrote:
TraderDesk wrote:using the latest EA it did not open a new position when price cross up an closed 1 bar. Here are the setting I have set for it.

AdvertisedSpread=5.00000000
UseFixedLot=1
FixedLot=0.10000000

DelayTheEntryForXBars=1
DelayTheAdditionalEntryForXBars=3
PriceFromHALine=0.00000000

AddAdditionalPositionsInTrend=1
MaxAdditionalPositions=3
chart2.png
I see, I will look in the code why this happend..
Edit:should this be a main entry?
Cheers :)
Tommaso
Hi Tommaso... Yes this was supposed to be the cross with the main entry.... :)
uffa no idea, because before this additional stuff it worked.. but normaly it should do so , because in this part I have nothing changed..

Cheers :)
Tommaso
Author:  TraderDesk [ Fri Nov 15, 2013 8:13 pm ]
Post subject:  Re: EA request Heiken Ashi

milanese wrote:
TraderDesk wrote:
milanese wrote:
TraderDesk wrote:using the latest EA it did not open a new position when price cross up an closed 1 bar. Here are the setting I have set for it.

AdvertisedSpread=5.00000000
UseFixedLot=1
FixedLot=0.10000000

DelayTheEntryForXBars=1
DelayTheAdditionalEntryForXBars=3
PriceFromHALine=0.00000000

AddAdditionalPositionsInTrend=1
MaxAdditionalPositions=3
chart2.png
I see, I will look in the code why this happend..
Edit:should this be a main entry?
Cheers :)
Tommaso
Hi Tommaso... Yes this was supposed to be the cross with the main entry.... :)
uffa no idea, because before this additional stuff it worked.. but normaly it should do so , because in this part I have nothing changed..

Cheers :)
Tommaso
I changed the PriceFromHALine=0 to 10 pips and now on the cross if price is within 10 pips and close of bar it works... If it is 0 maybe it waits for price to touch the HA line before opening a position...
Author:  milanese [ Fri Nov 15, 2013 8:17 pm ]
Post subject:  Re: EA request Heiken Ashi

TraderDesk wrote:
milanese wrote:
TraderDesk wrote:
milanese wrote:
TraderDesk wrote:using the latest EA it did not open a new position when price cross up an closed 1 bar. Here are the setting I have set for it.

AdvertisedSpread=5.00000000
UseFixedLot=1
FixedLot=0.10000000

DelayTheEntryForXBars=1
DelayTheAdditionalEntryForXBars=3
PriceFromHALine=0.00000000

AddAdditionalPositionsInTrend=1
MaxAdditionalPositions=3
chart2.png
I see, I will look in the code why this happend..
Edit:should this be a main entry?
Cheers :)
Tommaso
Hi Tommaso... Yes this was supposed to be the cross with the main entry.... :)
uffa no idea, because before this additional stuff it worked.. but normaly it should do so , because in this part I have nothing changed..

Cheers :)
Tommaso
I changed the PriceFromHALine=0 to 10 pips and now on the cross if price is within 10 pips and close of bar it works... If it is 0 maybe it waits for price to touch the HA line before opening a position...
I have to admit I tested it only with PriceFromHALine>0 ..

Cheers :)
Tommaso
Author:  TraderDesk [ Fri Nov 15, 2013 8:34 pm ]
Post subject:  Re: EA request Heiken Ashi

milanese wrote: I have to admit I tested it only with PriceFromHALine>0 ..

Cheers :)
Tommaso
Cool...:) Part of the strategy is when price crosses the HA line then we would look to open a new position based on bars close and/or position of price to HA line... So if price after 3 bars close is like 50 pips from HA line I would not want to open the first position so far away. That is where PriceFromHALine>x would come in. I would say PriceFromHALine<20 and DelayTheEntryForXBars=3 from CROSSOVER then open position. If price was 50 pips from HA after DelayTheEntryForXBars=3 I would not want it to open a new position...

Now if price comes down to 20 pips say after 10 bars I would want it to automatically open a new position since at 50 pips it was too far from HA line but 20 pips is my threshold.
Author:  milanese [ Fri Nov 15, 2013 9:41 pm ]
Post subject:  Re: EA request Heiken Ashi

Ok here comes again an update now we have two variables PriceFromHALine=20
and AdditionalTPriceFromHALine=20


Cheers and have a great weekend :)

Tommaso
Author:  TraderDesk [ Sat Nov 16, 2013 8:11 am ]
Post subject:  Re: EA request Heiken Ashi

milanese wrote:Ok here comes again an update now we have two variables PriceFromHALine=20
and AdditionalTPriceFromHALine=20


Cheers and have a great weekend :)

Tommaso
Hi Tommaso,

If you look at the below chart you can see the EA opens the first original position and like 4 bars later it open 4 more positions.

What it should do is open an additional position spaced out by the DelayTheAdditionalEntryForXBars=4 so it can open up to X more positions but they EACH have to be space apart by 4 bars and the AdditionalTPriceFromHALine=20 parameter must be TRUE....
All times are UTC Page 5 of 17