This would only fire if TickSize was equal to 0, and then it would fire every time through the
OnBarUpdate(). It might be an OR rather than AND... I am not sure if there is a spacial bar type, but if you could elaborate, I would appriciate it.
You are correct it is an OR, problem it won't work anyway since getcurrentask will never be equal to anasupertrend, you will have to change the variable type an the plotting would not be correct anymore.
Find attached the indicator anasupertrend modified as requested. The Indy will make a different sound (uptrend,downtrend) if the price will be +/- n ticks from the supertrend. Since I could not match the supertrend value with the market price (different variable types) I had to set the sounds in a tick fork of values (above and below the current price), for example if the trend will change at 1.4253 and ticks are set to 2, the indy will sound between 1.4251 and 1.4255. Basically you want to be advised before the change and that is what the indy does. Beware that in a fast moving market, 2 ticks are too close and the price might not notice the sound therefore I decided to customize the number of ticks before the change of trend. In the indy setup meny under options you can customize the number of ticks before the change of trend. I tested it in the replay mode and it should work correctly.
The following 3 users say Thank You to redratsal for this post:
Sorry for posting this here but I don't know who to contact regarding this indicator.
I upgraded Ninja to ver 7.5 and now when i try to save my workspace i am getting a message that says anaSupertrend could not be serialized.
I also tried to refer to the dataseries and several variables in anaSuperTrend from a strategy and they usually come back as true which is incorrect since the trend cannot be long for 2 months solid. Yet when I print the same info from inside the indicator you can see the values change more frequently (true, false, true....) the way they should leading me to believe it is not serializing properly.
I really do not understand serializing but it sounds like the storing of a dataseries/ variables.
The second symptom is when you try to save the workspace anaSuperTrend does not save but the other 20? indicators on 14 charts do. So every morning I have to re-apply anaSuperTrend to my main chart.
Rebuilding the chart does not solve the problem.
So my question is has anyone else had this problem?
I would like to refer to anaSuperTrend to build a strategy but cannot the way it is working now.
Red, thank you very much for all
i have a problems, i try to iport strategy and/or indicator in ninja, but ninja telle me error
someone can see my pc with team viewer?
i have two pc, one is ok, other i can not import ninja script
thank you to all