Gday: a D1 Stochastic OB/OS trading robot
-
garyfritz
Re: Gday: a D1 Stochastic OB/OS trading robot
I assume you have your Lot input set properly for your crim? What's your Lotsize and Criminal's minimum lot size?
-
spotdespot
- Trader
- Posts: 768
- Joined: Sun Jan 22, 2012 11:38 pm
Re: Gday: a D1 Stochastic OB/OS trading robot
I'm guessing your original trade size isn't divisible by 3.spyderman wrote:I'm getting some weird error messages. I have an order in cad/jpy that's over 100 pips in profit (). When the jumping stop tries to kick in it goes a little crazy. It does move the s/l, which is good, but then it spews out a long string of errors on that ticket, saying:
"13225934 stop loss modification failed with error(131): invalid trade volume"
Any ideas.
- spyderman
- Trader
- Posts: 338
- Joined: Sun Dec 11, 2011 1:39 pm
Re: Gday: a D1 Stochastic OB/OS trading robot
spotdespot wrote:I'm guessing your original trade size isn't divisible by 3.spyderman wrote:I'm getting some weird error messages. I have an order in cad/jpy that's over 100 pips in profit (). When the jumping stop tries to kick in it goes a little crazy. It does move the s/l, which is good, but then it spews out a long string of errors on that ticket, saying:
"13225934 stop loss modification failed with error(131): invalid trade volume"
Any ideas.
Bingo
Snaggin' some pips
-
kelisa
- Trader
- Posts: 188
- Joined: Sun Mar 04, 2012 6:51 am
Re: Gday: a D1 Stochastic OB/OS trading robot
Invalid trade volume could mean, maybe lot size set was not accepted or balance equity not enough.spyderman wrote:I'm getting some weird error messages. I have an order in cad/jpy that's over 100 pips in profit (). When the jumping stop tries to kick in it goes a little crazy. It does move the s/l, which is good, but then it spews out a long string of errors on that ticket, saying:
"13225934 stop loss modification failed with error(131): invalid trade volume"
Any ideas.
If your strategy is working well, dont be GREEDY and change it!
- fxozgirl
- Trader
- Posts: 1176
- Joined: Wed Nov 16, 2011 9:16 am
- Location: Melbourne, Australia
Re: Gday: a D1 Stochastic OB/OS trading robot
pete14 wrote:Maybe this is a stupid question but what do I have to do to exit a trade at once and not in 3 parts?
I noticed that the first exit most of the time is more profitable than the second or third. Very often the second and third part of the trade are closed at the same time.
Pete, you can't...the EA is set up to close the trades in multiples of 3!
The idea is to lock in some early profit and secure your trade by moving your stop to BE, and letting the rest of the trade run, closing the 2nd part at 100 pips, and the third part at either a Jumping Stop or full take profit.
- fxozgirl
- Trader
- Posts: 1176
- Joined: Wed Nov 16, 2011 9:16 am
- Location: Melbourne, Australia
Re: Gday: a D1 Stochastic OB/OS trading robot
Kenboi.....Yes, this is a Daily strategy, so please don't expect trades every day (even if you have the EA on all pairs). Notwithstanding the few trades taken, it's quite easy for this EA to rack up 500 and more pips a month, so lots of trades are not necessary.garyfritz wrote:This EA doesn't trade frequently so you often won't see trades for a while, unless you trade a lot of pairs.Kenboi wrote:Lets wait a bit longer and see if there's a signal for us from the stochastic indi. Remember, it's a daily chart ea trading so the signal doesn't come that often. I personally don't feel ease when there's not a single trade in 5 days.
However Monday should be busy. If I understand the logic correctly (enter long when 8-bar stoch goes under 20 then over 25, enter short when it goes over 80 then under 75), we should see entries in AUDCHF, CHFJPY, EURAUD, EURJPY, and GBPAUD. Throw an 8,3,3 stoch on a D1 chart and you can see this for yourself. Look at the value of the Signal line.
Gary, your summary is for the entry logic is correct and according to my charts, there should have been an entry on AUDCHF, CHFJPY, EURJPY (these trades are already well into profit), EURAUD wasn't a valid signal for me, GBPAUD was a valid trade however it looks like it is going to close on the cross of the stoch.
- fxozgirl
- Trader
- Posts: 1176
- Joined: Wed Nov 16, 2011 9:16 am
- Location: Melbourne, Australia
Re: Gday: a D1 Stochastic OB/OS trading robot
Hi Kenboi,Kenboi wrote: Thanks for your explanation on those settings. I had those options turned off and the EA just triggered 2 pairs of sell trades (EURJPY and EURAUD) as soon as the market opens. It looks to me that the EA opens the trade at the beginner of the daily candle where it sees a signal. But, is it a little bit late for an entry especially on EURAUD based on the stochastic indicator? Take a look at the pictures.
I'm glad the EA has finally taken some trades for you...
The EA waits until the close of the candle to see if the criteria for trading has been met. Looking at the euraud chart you posted, the candle before the trade was taken had not crossed below the 75 level, so no trade was taken.
You might find it helpful to draw another line on your stoch for the 75/25 levels...just for the visual.
You do not have the required permissions to view the files attached to this post.
- fxozgirl
- Trader
- Posts: 1176
- Joined: Wed Nov 16, 2011 9:16 am
- Location: Melbourne, Australia
Re: Gday: a D1 Stochastic OB/OS trading robot
fxozgirl wrote:
.....Now that I have changed ob/os to 75/25, the EA enters obviously after crossing 75/25.
Steve, is it possible to make these 2 criteria's independant of each other?
To further improve entries, can we still require the stoch lines to move into either 80/20 first and then once the signal line crosses back over 75/25, only then take the trade?
This is something I mentioned in a post a while back, in regards to me changing the stoch levels to 75/25.
the original settings, waited for the stoch to travel above 80 or below 20 and then waited for both the stoch & signal lines to move back below 80 & above 20, obviously with the new settings of 75/25 the same function occurs (albeit at the 75 & 25 levels.)
What I would like to do is have the stoch & signal lines still move above 80 & below 20, but not take the trade until they then cross back below 75 or above 25.
I'm not sure if this is possible to code this or if there is even any coders following this thread, but would appreciate it if anyone knows if this is possible.
-
garyfritz
Re: Gday: a D1 Stochastic OB/OS trading robot
It's certainly possible. That's the way I've coded my Tradestation test.
The EA currently looks at "if (PrevStochSignal >= OverBought && StochSignal < OverBought)". That won't work for a > 80 < 75 entry, because you can't guarantee you'll go from > 80 to < 75 in one bar. You have to remember that you've gone > 80, then wait until you go < 75 to enter. Steve's the better one to do that to the EA since he wrote it, but if he's too swamped to come back and make that change, let me know and I'll try to work it out.
The EA currently looks at "if (PrevStochSignal >= OverBought && StochSignal < OverBought)". That won't work for a > 80 < 75 entry, because you can't guarantee you'll go from > 80 to < 75 in one bar. You have to remember that you've gone > 80, then wait until you go < 75 to enter. Steve's the better one to do that to the EA since he wrote it, but if he's too swamped to come back and make that change, let me know and I'll try to work it out.
- youcrazykids
- Trader
- Posts: 44
- Joined: Sat Nov 19, 2011 8:38 am
- Location: Northumberland, UK
Re: Gday: a D1 Stochastic OB/OS trading robot
Hey there
For the ">80 then <75" sequence and vice versa, I use a "latch" (as I call it). It goes something like:
Hope this helps
youcrazykids
For the ">80 then <75" sequence and vice versa, I use a "latch" (as I call it). It goes something like:
Code: Select all
extern int OBLatch, OSLatch;
if ( StochSignal > 80 ) OBLatch=1;
if ( OBLatch==1 && StochSignal < 75 ) { do whatever... }
if ( StochSignal < 20 ) OSLatch=1;
if ( OSLatch==1 && StochSignal > 25 ) { do whatever... }
youcrazykids