Ask! - page 114

 
 
Files:
testergraph.jpg  61 kb
 

IN10TION

Thank you so much for you help. I dont know what I would do with out the generosity of people like yourself. Thank you for sharing you knowledge. I have learned so much and have gotten to much from this forum already. Thank you. I will definately keep you updated. Again, Thank you.

 
 
 

Hello IN10TION,

Yes, after the formation of the doji or inside bar, i want to be able to go 1, 2 or 3 bars before such doji or inside bar and place a buy-stop or a sell-stop.

In addidion, if i want to wait 1, 2 , or 3 bars after the formation...Let me explain that part further: Let's say we have an Inside bar at the close the 10 AM bar. Now i want to take the high or the low of the 12 PM (2 bars later) and place buy-stop or sell stop at 1:01 PM.

Hope i was clear. Should you need me to explain it further, please do not hesitate to ask.

Thanks for the help.

Forexcel

IN10TION:
so you want to take bar price values before or after a doji/inside bar, this doji/inside bar has to be formed first, otherwise you don't know if there is a doji/inside bar, so the next bar after the doji/inside bar has to be the current bar where you place your buy or sell orders, pending or not...

but you want to take price values before the doji/inside bar?

if it's after... you have to wait few bars longer, after the doji/inside bar...

something is not logic about that...

think I need more input
 

Do you already have some code for this, that you started?

in a mq4 file?

the first thing you need is confirmation doji/inside = yes or no

depending on your settings it will look before the doji/inside or wait

when it waits 2 bars it has to decide the orders, depending on the previous bar high or low...

well you can start programming you have some code to find the doji's or insiders?

...

forexcel:
Hello IN10TION,

Yes, after the formation of the doji or inside bar, i want to be able to go 1, 2 or 3 bars before such doji or inside bar and place a buy-stop or a sell-stop.

In addidion, if i want to wait 1, 2 , or 3 bars after the formation...Let me explain that part further: Let's say we have an Inside bar at the close the 10 AM bar. Now i want to take the high or the low of the 12 PM (2 bars later) and place buy-stop or sell stop at 1:01 PM.

Hope i was clear. Should you need me to explain it further, please do not hesitate to ask.

Thanks for the help.

Forexcel
 

EA opening too many orders

What different methods can be used to stop an EA from opening so many multiple positions back to back. I am thinking of adding a sleep function but I wouldnt want to miss out on any trades that could have taken please during the EA was in sleep.

Files:
multi-order.jpg  115 kb
 

if you see that all buys and sells are at the right place, and don't do anything drastically wrong, you then can find another filter, to have a more to the point buy or sell choice... let your EA test run on a visual chart and put also some different indicators on it, and see of those indicators can help you filter out those over orderings. Use a simple stochastic, or change the time period with it, adjust the stochastic values... try RSI, CCI. Stay with the same currency pair that you trust. Every pair has her setting and difficulty. Keep it simple.

cutzpr:
What different methods can be used to stop an EA from opening so many multiple positions back to back. I am thinking of adding a sleep function but I wouldnt want to miss out on any trades that could have taken please during the EA was in sleep.
 
IN10TION:
iBarShift will find for you the bar that start on that day or also the end bar for that day.

int iBarShift( string symbol, int timeframe, datetime time, bool exact=false)

next...

use those bar positions to find the results of iHighest and iLowest

int iHighest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)

int iLowest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)

results & done

int yy = TimeYear(Time[0]);

int mm = TimeMonth(Time[0]);

int dd = TimeDay(Time[0]);

datetime var1;

string yymmddms = yy+"."+mm+"."+dd+" 00:00" ;

var1 = StrToTime(yymmddms);

int shift =i BarShift(NULL,0,var1,false);

int hh = Highest(NULL,0,MODE_HIGH,shift,0);

int ll = Lowest(NULL,0,MODE_LOW,shift,0);

double xRES = iHigh(NULL,0,hh) ;

double xSUP = iLow(NULL,0,ll) ;

Is there a simpler way to find the bar number of today's high and low?