Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
The yellow line issue, discussed at length in chat, is due to the precision being used in DoubleMA Paint. What is painted on screen vs. what is passed in the DataSeries is different due to this math rounding (precision).
Approximately line 147 the rounding begins. I'm not the original author and do not know why the rounding is necessary.
If you replace:
double val1 = Math.Round( val1Pure, decimals );
double val2 = Math.Round( val2Pure, decimals );
The versions are in fast development. Here are the latest....
The ZIP contains 2 variants of the same strategy
- SharkyMAStrategy_v1_05
- SharkyMAStrategy_v1_05_DMV_version
The first version uses the Signal dataseries to trigger entries and exits
The second (even more experimental) DMV version uses the DMV dataseries in DMAPaint to trigger entries/exits.
The ZIP includes:
- an updated DMAPaint and updated DMA with:
1. Mike's fix as per previous post
2. updated DMAPaint to default PaintBar=false (so it does not repaint the bars by default
when putting the the DMAPaint or DMAPaint containing strategy on a chart)
3. DMA changed to PriceSupported = true
- my updated Internal (adds TEMA, ZeroLagTEMA and ZeroLagHATEMA as choice) .
For details see earlier posts
The strategies are work in progress ... do not use for real trading
Just (8.00 AM) uploaded again a new version. Found logical error in the DMV version that prevented it going short.
(8.32 AM) It looks like there is still a bug in the logic of the DMV version as it re-enters while the code should prevent this.
But still useful to see if using the DMV dataseries gives different entries than using the Signal dataseries
As Max suggested and we discussed in the chat it might be better to hardcode the logic directly without using the DMAPaint
with e.g. statements like .......if ZerolagEMA(ZeroLagEMA,13),13 [0] > ZeroLagEMA(ZeroLagEMA,13)13 [1] etc.
We agree that this is probably the best way forward. But that's for another day .... or one of the others to pick up.
8.15 PM I checked what the 2 versions did last night. The version based on the DMA Signal dataseries and the version based on the DMA DMV dataseries definitively triggered differently.
I think somebody else better first checks the trigger logic. You tend to miss flaws in your own coding.
As mentioned yesterday it is probably better as next step to first hard code the logic in the strategy with statements like
- ZerolagEMA(ZeroLagEMA,12),12 [0] > ZeroLagEMA(ZeroLagEMA,12)12 [1]
- or ZerolagEMA(ZeroLagEMA,12),12 rising etc.
That way we would no longer be dependent on the inside logic of the DMSPaint indicator.
With 'hardcoding' I mean here 'not using the DMA'. I would still make the period of the ZeroLagEMA a changeable parameter.
That would give then 3 versions to compare and evaluate the efficacy / correctness of the triggers.
It is fun the develop on the fly, but IMO we need to get a little structured in the approach.
Don't know if it is wise to already put in break-even and ATM type stuff and complicate the strategy before solving the first part.
Will have little time rest of the week ... so if somebody wants to pick up ... pls do
Back from a long weekend. Looks like a lot has changed in the script(s)! I'll try to catch up and figure out what all has changed. Let me know if I can help with anything.
Thanks for posting this idea . I have one idea about profit management. If you make it to configure profit management through ATM strategy, then it will be better.
I am not Programmer. But have some knowledge. I hire some ninja script consultants before my strategies. They configure it for me. Your all strategy ok, working good, except profit management. For profitmanagement, you can make as manay ATM strategies as you want and just put there name at start of strategy from strategy wizard. Then it automatically picks that specific ATM strategy.
When this happen, then there is no need to give profit/loss/trail tragets inside strategy. You can run as many strategies as you want on different charts of same market as you want, from same wizard, just changing there names.
Up to this point I've only used the built in order handling functions. I have yet to do advanced order handling via IOrder. I have played with ATM strategies a little but nothing earth shattering I'm still in the process of learning the ins/outs of NT (and this forum is a HUGE help).
What KJAVED spoke about sounds interesting as well (eg. pre-configured ATM strategies that a strategy uses). But being a programmer, I will probably end up "coding" my order/profit/stop logic vs. using a pre-configured ATM - but it's nice that NT gives you the ability to do both.
I am interested in testing this strategy Monday for quick scalps, and I would like to revise it to include the following:
I do not want to employ a TrailStop, so set TrailStop default = 0 (not = 1 as it currently is).
I do want an Auto Breakeven feature that once open profit = 2 ticks (set as variable), I want to automatically move my Stop Loss to Entry. This protects my position if my Profit Target is hit but I am not filled, and price then moves against me.
This feature in the ATM Stop Strategy would read as follows:
Auto breakeven (ticks)
Profit trigger: 2 (set as variable) Plus: 0 (set as variable)
I've had good success with an ATM strategy that both sets targets and sets stops (even different levels if desired) and then moves the level to breakeven or breakeven + 1tick (to pay for commissions if needed).
SampleAtmStrategy is a built-in script that you could start with if that's the way you're going.
any one with ideas feel free to make suggestions all ideas will be looked at and if possible we will try anything to make this a really good script...sharky