Time Scales and Auto Trading
Author: EMan99
Creation Date: 11/6/2008 12:45 AM
profile picture

EMan99

#1


I know indicators plot diffrently based on the bar scale... but what about price. Price is always price.

If it is in streaming mode should I expect alerts regardless of the scale? In back testing the scale made a diffrence of when an entry and exit order was issued.

In real time will it happen when the price hits the number or is it still dependent on the bar scale to generate the alerts?

I did read the manual but I am still unsure.

Thanks,
profile picture

Cone

#2
I'm confused about what you're confused about!

Strategies can only be traded in the base scale of the chart. That means if the chart is a 1-minute chart, a strategy can generate alerts (create trades) on any minute interval. If the chart has 13-minute bars, then it can create trades on 13-minute intervals.

Likewise, if you strategy creates a 20-bar moving average, this average will be quite different between charts of difference scales. I highlighted bar because this is the variable - it can be any interval!

Clearly if you switch chart scales, you cannot expect to get the same results, even for the same strategy!
profile picture

EMan99

#3
Cone,

I have an entry price pre defined Open + a few ticks.

The code you helped me on the other day, it was a huge help.

When I backtest at a 10 min scale it seems to ignore the open bar if its red, even if the high of that bar is above my Open + a few ticks entry, but if the open bar is green it shows an alert just above the open as I would expect.
As you know there is no way to no what will happen next so why it is not alerting on a red bar I don't know.
If you run it on a 1 min chart it will be a loser in the first 10 min on the same day.

The 10 min chart works in my favor. I am going to run it and see what alerts pop.

I assume I will get an alert as soon as the price hits my BuyAtStop price regardless of the bar scale.
Price is always Price.

Thanks for your help.

profile picture

Cone

#4
You broke the code that I posted for you. It's no wonder it doesn't work correctly.
profile picture

EMan99

#5
Cone,
I am trying to learn how to code, I needed to add a stop loss some how, it is a work in progress and I really appreciate your help in pointing me in the right direction.

I have alot of questions and I try to look them up in the provided manuals, before I pose a question.
I dont want want to be a code braker I really want to learn to do it myself.

Thanks,


This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).