Check difference of previous bar - page 2

 
:: I think you better switch the BuySignal & SellSignal

if((Close[1]-Open[1])/Point >= PipDifference ) Order= SellSignal;

if((Close[1]-Open[1])/Point <= -PipDifference ) Order=BuySignal;

matrixebiz:
Thanks man you rock
 

Ok, can you change your file you posted above or just delete it.

Thanks man

 
:: I've changed it, try this one if you like...
 
:: ok, done
matrixebiz:
Ok, can you change your file you posted above or just delete it. Thanks man
 
:: Did a 1.000+ optimization back test first, for fun :: this is the best that came out, begin 2008 till now...
 

:) They always look good in Backtest don't they lol

I'm Just MWF ( Mess'in With Forex) Playing around with some ideas

 

I know I am old school from back in the punch card days but there is no need to do the same thing twice!

if((Close[1]-Open[1])/Point >= PipDifference ) Order= SellSignal;

if((Close[1]-Open[1])/Point <= -PipDifference ) Order=BuySignal;

[/code]

should be

[code]

double ClOp = (Close[1]-Open[1])/Point ;

if( ClOp >= PipDifference ) Order= SellSignal;

if( ClOp <= -PipDifference ) Order=BuySignal;

Not to mention, it is faster to change if you want to modify the formula for ClOp!

 
TheRumpledOne:
I know I am old school from back in the punch card days but there is no need to do the same thing twice!

if((Close[1]-Open[1])/Point >= PipDifference ) Order= SellSignal;

if((Close[1]-Open[1])/Point <= -PipDifference ) Order=BuySignal;

[/code]

should be

[code]

double ClOp = (Close[1]-Open[1])/Point ;

if( ClOp >= PipDifference ) Order= SellSignal;

if( ClOp <= -PipDifference ) Order=BuySignal;

Not to mention, it is faster to change if you want to modify the formula for ClOp!

True, that would work to

 

Ah, well, enough fun, gotta get a beer and grab a bite.

Later dudes Happy Canada Day (if your in Canada )

 
:: Why not delete everything, and make/do it with "Order" only, check further in your code if it's negative or positive & value/amount

int Order = (Close[1]-Open[1])/Point;

TheRumpledOne:
I know I am old school from back in the punch card days but there is no need to do the same thing twice!

if((Close[1]-Open[1])/Point >= PipDifference ) Order= SellSignal;

if((Close[1]-Open[1])/Point <= -PipDifference ) Order=BuySignal;

[/code]should be

[code]

double ClOp = (Close[1]-Open[1])/Point ;

if( ClOp >= PipDifference ) Order= SellSignal;

if( ClOp <= -PipDifference ) Order=BuySignal;

Not to mention, it is faster to change if you want to modify the formula for ClOp!
Reason: