Identify direction of price

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Identify direction of price

Postby jacklrfx » Tue Mar 29, 2016 12:11 pm

Hi,
I have written a piece of code, I would like to test an idea. This indicator should check the trend, there is a NonLagMA with filt, and then check if the trade done is correct or not.

I mean NonLagMa indicates up trend (color[period-59]=color.Up and color[period-60]=color.DN) then I suppose at period 59 to open trade, and then I check if current close price is > than the price at which I have opened the trade.

So the indicator at current period checks if 59 period ago there is a sign of changing in the trend and then checks if the current price is > than the price of opening. The opposite for short trades.

I don't open trade I just want to test if the direction supposed is correct. And I have to test for every period what happened a number (choosen by you, could be any number 59, 21, 74,...) of period before the actual.
Please check also if NonLagMa is repaint, It doesn't seems to be repainted, but I don't know exactly.

I have written the indicator but there is something not working.
Please, have a check.

The indicator should display the number of trades correctly supposed, and the number of trades wrong. If it is possible display entry, exit with arrow.
Attachments
imb.png
ctvt.lua
(5.5 KiB) Downloaded 366 times
jacklrfx
 
Posts: 63
Joined: Mon Apr 20, 2015 2:40 pm


Re: Identify direction of price

Postby Apprentice » Wed Mar 30, 2016 8:06 am

EURUSD m1 (03-30-2016 1432).png

I hope that I understand / preserved your intentions.
ctvt.lua
(5.74 KiB) Downloaded 358 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36476
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Bing [Bot] and 19 guests