An unhijacked helper for Evaluator's SAFT trading system

fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by fx800 »

Today is BANK HOLIDAY in the UK. So no proper testing till tomorrow.
MickyMouse
Trader
Posts: 36
Joined: Sat Nov 26, 2011 9:42 pm

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by MickyMouse »

fx8000 wrote:Hi MickyMouse

Your OBV_MA indi draws only part of 21 LWMA (top)

The bottom indi is produced by dragging moving average onto the obv window.

Cheers,
Peter
you are right, sorry about that , i made it and compiled while on chart , and it was showing for me .
Anyways, use the attached one, will update the ma as well.
You do not have the required permissions to view the files attached to this post.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by fx800 »

MickyMouse wrote:
fx8000 wrote:Hi MickyMouse

Your OBV_MA indi draws only part of 21 LWMA (top)

The bottom indi is produced by dragging moving average onto the obv window.

Cheers,
Peter
you are right, sorry about that , i made it and compiled while on chart , and it was showing for me .
Anyways, use the attached one, will update the ma as well.

Many thanks. Will try out the new indi.

Cheers,
Peter
User avatar
NeoTrader
Trader
Posts: 436
Joined: Wed Apr 04, 2012 2:52 pm
Location: small Village at Lake Chiemsee, Bavaria, Germany

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by NeoTrader »

hi fx8000,
fx8000 wrote:Your OBV_MA indi draws only part of 21 LWMA (top)

The bottom indi is produced by dragging moving average onto the obv window.
I experience the same Problem.

I Think this is a Empty4 Problem...it seems it does not like to use the iMAOnArray on any Indicator Buffer.
I experienced the same Problem when I developed the TMA & MA cross Rule for my Indicator.
Thats why I use a separate array in my code snippet above...

See attachment for a working version...
have also added maxBar Feature and MAMode to select the Mode you want (Default is LWMA)


happy trading,

NeoTrader

---
You do not have the required permissions to view the files attached to this post.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by fx800 »

NeoTrader wrote:hi fx8000,
fx8000 wrote:Your OBV_MA indi draws only part of 21 LWMA (top)

The bottom indi is produced by dragging moving average onto the obv window.
I experience the same Problem.

I Think this is a Empty4 Problem...it seems it does not like to use the iMAOnArray on any Indicator Buffer.
I experienced the same Problem when I developed the TMA & MA cross Rule for my Indicator.
Thats why I use a separate array in my code snippet above...

See attachment for a working version...
have also added maxBar Feature and MAMode to select the Mode you want (Default is LWMA)


happy trading,

NeoTrader

---
Hi NeoTrader

Thanks. The OBV_MA_2 works for me.

Cheers,
Peter
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by SteveHopwood »

NeoTrader wrote:hi Steve,
SteveHopwood wrote:I have replaced the OBV trendline with the moving average. There is a problem with this, in that I have not found a way to code calls to the Moving Average indi in such a way that it will return the MA of the OBV indi. Instead, I have replaced the lwma on my OBV with a simple ma, and hand-coded the mo calculation. The result of this calculation appears to be out by a few points, so anybody with more accurate code, please sing out.
The following is not a tested code...i just put it together...to show you the concept...this should work...to combine your obv with an MA.

If you have any question feel free to ask here or via PM.

Code: Select all

double obvArray[];
double maCurrent;

ArrayResize(obvArray, MAPeriod + 1);
ArraySetAsSeries(obvArray, true );

for ( j = 0; j <= MAPeriod + 1; j++ ) {
obvArray[j] = iCustom (your call to get the obv, use j for the shift )

// will give you the current MA value for the obv
maCurrent = iMAOnArray( obvArray, 0, MAPeriod, 0, MAMode, 0 ); 
}

hope this helps.

happy trading,

NeoTrader
Thanks NT. It works beautifully. I have linked your indi in post 1.

V 1e is in post 1, with NT's code for calculating the lwma of obv.

I have added code to make the ea change the trend line colour to TradedLineColour once it has sent a trade. This is to allow us to leave the ea in charge without worrying that it might close/find a trade has closed, then trade again if conditions are right. If you want this, then change it to the same colour as that of the trading trendline.

I am not sure that the tp/sl calculations are correct yet.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by fx800 »

SteveHopwood wrote:
NeoTrader wrote:hi Steve,
SteveHopwood wrote:I have replaced the OBV trendline with the moving average. There is a problem with this, in that I have not found a way to code calls to the Moving Average indi in such a way that it will return the MA of the OBV indi. Instead, I have replaced the lwma on my OBV with a simple ma, and hand-coded the mo calculation. The result of this calculation appears to be out by a few points, so anybody with more accurate code, please sing out.
The following is not a tested code...i just put it together...to show you the concept...this should work...to combine your obv with an MA.

If you have any question feel free to ask here or via PM.

Code: Select all

double obvArray[];
double maCurrent;

ArrayResize(obvArray, MAPeriod + 1);
ArraySetAsSeries(obvArray, true );

for ( j = 0; j <= MAPeriod + 1; j++ ) {
obvArray[j] = iCustom (your call to get the obv, use j for the shift )

// will give you the current MA value for the obv
maCurrent = iMAOnArray( obvArray, 0, MAPeriod, 0, MAMode, 0 ); 
}

hope this helps.

happy trading,

NeoTrader
Thanks NT. It works beautifully. I have linked your indi in post 1.

V 1e is in post 1, with NT's code for calculating the lwma of obv.

I have added code to make the ea change the trend line colour to TradedLineColour once it has sent a trade. This is to allow us to leave the ea in charge without worrying that it might close/find a trade has closed, then trade again if conditions are right. If you want this, then change it to the same colour as that of the trading trendline.

I am not sure that the tp/sl calculations are correct yet.

:D
Thank you, Steve. Will start testing tomorrow.

Peter
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by fx800 »

Hi Steve

Shouldn't the AvObv in the following code be replaced by ObvMa ?

//Long trade
//Trendline colour
if (!TradeLong) SendLong = false;
//OBV
if (ObvVal <= AvObv) SendLong = false;

Cheers,
Peter
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by SteveHopwood »

fx8000 wrote:Hi Steve

Shouldn't the AvObv in the following code be replaced by ObvMa ?

//Long trade
//Trendline colour
if (!TradeLong) SendLong = false;
//OBV
if (ObvVal <= AvObv) SendLong = false;

Cheers,
Peter
Nope.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by fx800 »

SteveHopwood wrote:
fx8000 wrote:Hi Steve

Shouldn't the AvObv in the following code be replaced by ObvMa ?

//Long trade
//Trendline colour
if (!TradeLong) SendLong = false;
//OBV
if (ObvVal <= AvObv) SendLong = false;

Cheers,
Peter
Nope.

:D
My sincere apologies.

Peter
Locked

Return to “Automated trading systems”