Indicator Request

MPTM's new home
Post Reply
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Indicator Request

Post by milanese »

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
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
Reaper
Trader
Posts: 476
Joined: Sat Feb 09, 2013 12:07 am
Location: UK

Indicator Request

Post by Reaper »

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:
.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Indicator Request

Post by milanese »

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
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
Reaper
Trader
Posts: 476
Joined: Sat Feb 09, 2013 12:07 am
Location: UK

Indicator Request

Post by Reaper »

O okay cheers for that! :)
.
User avatar
Reaper
Trader
Posts: 476
Joined: Sat Feb 09, 2013 12:07 am
Location: UK

Indicator Request

Post by Reaper »

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:
.
Post Reply

Return to “Utilities Indicators and Scripts”