Hi,
Maybe I am going to tell things that are already clear, but based on your posts, I am not sure...
Also, I am not familiar with the Visual JForex platform, only with the JForex SDK and API.
Quote:
What is the effect of Shift 1 on ONTICK?
Shift (as far as it is used in the SDK) can be used to get an indicator value for a previous candle, as describd in
this wiki page.
Or it can be used to get a previous candle, by calling
getBar().
Or to get a previous tick, by calling
getTick().
There is no such thing, like Shift in onTick() and/or onCandle(). Or at least not in the JForex SDK/strategy/non-visual api...
Quote:
With ONTICK using a Shift = 1, that is looking at the previous candle's specified period, usually the CLOSE.
Again here, you refer to ONTICK's Shift. Is this a Visual JForex thing?
Quote:
ONCANDLE looks at the CLOSE of the current and previous candles and compares the two?
onCandle() (again from the SDK point of view), is a function that is being called in a strategy whenever a candle is ready within the subscribed instruments. It doesn't compare anything, it is up to the strategy to do such thing.
About where to check for MA crossover (tick or candle creation):
I would say it is sufficient to 'act' within every candle creation, so use the onCandle() function to discover the cross, and act (submit order, for example). Of course there are situations when you want to react on every price change, not just only when a candle was drawn. But mostly the cross discovery can be properly handled during candle creation.
I hope I made some help with these words. Don't hesitate to reply, and let's make things clear for you.