stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Indicator Request
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4019
Page 7 of 7
Author:  milanese [ Sun Jan 18, 2015 12:47 pm ]
Post subject:  Indicator Request

Angat » Sun Jan 18, 2015 12:31 pm wrote:Well this isn't actually what I need, I need something that is going to check the next 6*60*Period() to see if price moves out of this buffer zone. The issue I have right now is the main bulk of my trading code is sitting in a NewBar(TimeFrame) { } segment in my int Start(). Which means that any function that I need to check subsequent bars is going to get reset on every NewBar. It seems the only way I can accomplish what I need is to rewrite my code structure so its not reliant on NewBar().

This is a tough one. :arrrg:
for what exactly you need the NewBar(tf) check? it will often not make sense to put it on the entire main program routine, esp. if you call from there the trailing ecc.. funtions

Cheers :)

Tommaso
Author:  Reaper [ Sun Jan 18, 2015 1:56 pm ]
Post subject:  Indicator Request

milanese » Sun Jan 18, 2015 12:47 pm wrote:
Angat » Sun Jan 18, 2015 12:31 pm wrote:Well this isn't actually what I need, I need something that is going to check the next 6*60*Period() to see if price moves out of this buffer zone. The issue I have right now is the main bulk of my trading code is sitting in a NewBar(TimeFrame) { } segment in my int Start(). Which means that any function that I need to check subsequent bars is going to get reset on every NewBar. It seems the only way I can accomplish what I need is to rewrite my code structure so its not reliant on NewBar().

This is a tough one. :arrrg:
for what exactly you need the NewBar(tf) check? it will often not make sense to put it on the entire main program routine, esp. if you call from there the trailing ecc.. funtions

Cheers :)

Tommaso
Oh I see. You created me the function when I was doing the indicator.

My EA contains the indicator code, I just tested and it doesn't seem to need the NewBar function at all.

What was the purpose of the NewBar function and why you think the likely reason for my EA not needing it?

Cheers Tommaso, I think you have just saved me a lot of stress. :yahoo:
Author:  milanese [ Sun Jan 18, 2015 3:34 pm ]
Post subject:  Indicator Request

Angat » Sun Jan 18, 2015 1:56 pm wrote:
Oh I see. You created me the function when I was doing the indicator.

My EA contains the indicator code, I just tested and it doesn't seem to need the NewBar function at all.

What was the purpose of the NewBar function and why you think the likely reason for my EA not needing it?

Cheers Tommaso, I think you have just saved me a lot of stress. :yahoo:
the NewBar(tf) is a CPU saver not calling a calculation every tick when we need to do something only at the open of a new bar..

Cheers :)

Tommaso
Author:  Reaper [ Sun Jan 18, 2015 6:06 pm ]
Post subject:  Indicator Request

O okay cheers for that! :)
Author:  Reaper [ Thu Jan 22, 2015 6:46 pm ]
Post subject:  Indicator Request

Can anyone point me in a direction of some existing grid code.

e.g. If existing buy/sell trade is 20+ pips in profits enter another buy/sell.

I tried throwing some code together but I don't think I did it right.

I'll give it another go tomorrow, unless someone has some reusable code for me. :clap:
All times are UTC Page 7 of 7