fractal
Break Out ??
count your trades before open new one....
and more errors but try out this first
Hey deVries,
I am having a hard time understanding that statement. My two takeaways were:
1)You want me to choose the first bar?
2) Re-do my OrdersAccounting
Thank you again for your support.
Hey deVries,
I am having a hard time understanding that statement. My two takeaways were:
1)You want me to choose the first bar?
2) Re-do my OrdersAccounting
Thank you again for your support.
double fractalU=iFractals(NULL,0,1,0);
returns see my next post .....
double fractalU=iFractals(NULL,0,1,1);
returns see my next post......
your ordercounting like
int total = OrdersTotal(); if(total<1) {
will give situations no order get open if you have another trade not from this EA open or pending
with backtesting you won't see that but running the EA on an account you will notice
Did a little test on your frctal code
like this
double fractalU; for(int y=0;fractalU < Point;y++) { fractalU=iFractals(NULL,0,1,y); Alert("fractalUp y = "+y+ " "+fractalU); }
Do the same and you will see what bar you have to choose for getting right fractalbar
Did a little test on your frctal code
like this
Do the same and you will see what bar you have to choose for getting right fractalbar
Hi deVries!
You sure are a helpful guy!
Did a little test on your frctal code
like this
Do the same and you will see what bar you have to choose for getting right fractalbar
Hmmm...
deVries, the check worked perfectly and alerted the correct price for each "down" fractal and "up" fractal.
I am still investigating the code for errors, because it is "ignoring" the fractals when processing the order.
You are correct, I need to change the OrdersAccounting sections, because as soon as I put the EA on the chart, it takes a trade.
Did a little test on your frctal code
like this
Do the same and you will see what bar you have to choose for getting right fractalbar
SILLY ME!
After researching the code, I was using => instead of ==, which was causing the buffer to cause issues.
Thank you deVries!!!!
SILLY ME!
After researching the code, I was using => instead of ==, which was causing the buffer to cause issues.
Thank you deVries!!!!
if((BarCloseB>EMA) && (BarCloseB>=fractalU))
changed toif((BarCloseB>EMA) && (BarCloseB==fractalU))
this way now ???? that will also be not correct
.
Something like this
if((BarCloseB>EMA) && (BarCloseB>fractalU)&& fractalU>Point)
might work for you and get fractalU the way you see its done in the test...
You mean......
changed to
this way now ???? that will also be not correct
.
Something like this
might work for you and get fractalU the way you see its done in the test...
I have not implemented your input because it is trading correctly at this time. I will try it later tonight with your input.
Thank you deVries!
Hey deVries:
I am running into issues in my final code, with trying to put a modify stop loss to breakeven after so many pips.
Do you see any glaring error???
extern int StopLoss=10; //-------------------------------------------------// extern bool Move.BE=true; extern int MoveStopTo=1; //----------------------------------------------// //-----------------EXITING ORDERS---------------// if(OrdersTotal()>1) { OrderSelect(0,SELECT_BY_POS,MODE_TRADES); if(OrderType()==(OP_BUY)&&(Move.BE)) { if(Bid - OrderOpenPrice() >= Point * StopLoss) { if(OrderStopLoss() < OrderOpenPrice() + Point * MoveStopTo) { OrderModify(OrderTicket(),OrderOpenPrice(), OrderOpenPrice() + Point * MoveStopTo, OrderTakeProfit(), 0, Red); } } } } if(OrdersTotal()>1) { OrderSelect(0,SELECT_BY_POS,MODE_TRADES); { if(OrderType()==(OP_SELL)&&(Move.BE)) { if(OrderOpenPrice() - Ask >= Point * StopLoss) { if(OrderStopLoss() > OrderOpenPrice() - Point * MoveStopTo) { OrderModify(OrderTicket(),OrderOpenPrice(), OrderOpenPrice() - Point * MoveStopTo, OrderTakeProfit(), 0, Red); } } } } //--------CHECKING FOR ERRORS-------------------// Print(GetLastError()); return(0); } }
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hey guys,
I'm trying to make a fractal breakout EA, that is filtered with time of day and a moving average.
Can anyone point me in the right direction/overview any defects in the code???
1: It is only taking buys after I input the iFractal()
2: It does not enter where the Fractals are