Topic: Use previous bar value ( in entering and closing positions )

Hello Popov
i understand when using MA with price close we have to use previous candle use , But  when closing the position we can use both options (previous candle ) or not use it  Right?


Another Q: if we used the Pivot point as an exit point ( pivot point calculations use the previous bar ) so when enter or exit we donot need to use that option because if we use it it will use the day before previous day  Am i right?


http://s2.postimage.org/1fyu4i.jpg

Re: Use previous bar value ( in entering and closing positions )

hello

when we say use previous bar value this means in MT4 = shift -1   , right ?
my Q is:  the charts in FSB draw the actual indicator on chart but use the previous bar in calculations
so to see the indicator at work in MT4 we have to use the shift -1 and it is only found in Moving average  but not used in oscillator indicators  !!!!

Re: Use previous bar value ( in entering and closing positions )

i understand when using MA with price close we have to use previous candle use , But  when closing the position we can use both options (previous candle ) or not use it  Right?

Forex Strategy Builder and Forex Strategy Trader sets "Use previous bar value" parameter automatically.
Specifically for closing a position if you wont to close at a MA, you must use the previous bar value. You don't know the final current value of MA until the end of the bar.

If you want to use MA as a closing logic condition, you have to use the current value. The position closes at Bar close price (Time) so the MA is fixed for this bar and you can use it.

if we used the Pivot point as an exit point ( pivot point calculations use the previous bar ) so when enter or exit we donot need to use that option because if we use it it will use the day before previous day  Am i right?

Pivot Point plots the points on the same bar but trade according to previous bar points. "Use previous bar" option  servers to show that fact to the users.

the charts in FSB draw the actual indicator on chart but use the previous bar in calculations

Yes. That's right.

so to see the indicator at work in MT4 we have to use the shift -1 and it is only found in Moving average  but not used in oscillator indicators

You have to apply "Use previous bar value" logic alone in MT. You don't need "Shift". simple use previous indicator value. 

MACD1=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1);
MACD2=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,2);

if(MACD1 > MACD2 + sigma)
{
    // Enter long
}

if(MACD1 < MACD2 - sigma)
{
    // Enter Short
}

Re: Use previous bar value ( in entering and closing positions )

Hello,

Im trying to create an opening logic condition to go long when the price closed above the moving average (and go short otherwise?).

Im quiite confused about the concept of "use previous bar value".

Can someone help me out?

Re: Use previous bar value ( in entering and closing positions )

This should do it:

[Opening Point of the Position]
Bar Opening
     Enter the market at the beginning of the bar
     Base price  -  Open

[Opening Logic Condition]
Moving Average
     The bar opens above the Moving Average
     Smoothing method  -  Simple
     Base price  -  Close
     Period  -  14
     Shift  -  0
     Use previous bar value  -  Yes