FXCM Forex Trading

Trend Line Helper

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Re: Trend Line Helper

Postby Cactus » Thu Nov 17, 2016 4:00 pm

Apprentice wrote:Can you share excel / code.


Oh, it is just a simple macro created using "Microsoft Mouse and Keyboard Centre" using just keystrokes to automate inputting the data and the indicator on the chart. It works like this if anyone is using the same app

Code: Select all
<?xml version="1.0" encoding="UTF-8"?><Macro>
   <KeyBoardEvent Down="true">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">46</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">46</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">23</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">23</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">28</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">28</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">47</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">47</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">28</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">28</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57424</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57424</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57415</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57415</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">46</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">46</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">47</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">47</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">28</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">28</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57424</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57424</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57424</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57424</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57416</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57416</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57423</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57423</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57421</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57421</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57419</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57419</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">46</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">46</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">47</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">47</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">28</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">28</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57424</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57424</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57415</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57415</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">46</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">46</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">47</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">47</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">29</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">28</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">28</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">28</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">28</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">15</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">56</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57416</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57416</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57423</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57423</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57421</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57421</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="true">57419</KeyBoardEvent>
   <DelayEvent>110</DelayEvent>
   <KeyBoardEvent Down="false">57419</KeyBoardEvent>
</Macro>


First, have a spreadsheet with O,H,L,C data window opened
Then a marketscope chart window opened
This macro will copy the last row, alt+tab , insert indicator (most recent), add the time, then alt+tab, copy date, alt+tab to insert date... etc.

However this is still slow with a lot of lines to add, and doesn't address the issue I described (in case data isn't visible on chart because it's older than what's availalbe to see, for example, the first point is in year 2012).

I think the normal "line" objects that can be added to the chart by pressing L don't have this issue as this indicator. But it is impossible to "paste" data into the "position" tab into their parameters, only type it or choose from calendar dates. So my macro wouldn't work. I just want a way to draw the lines on two points I need (date/time). I have requested for this in this topic. viewtopic.php?f=27&t=64066
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Initiate
 
Posts: 158
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Re: Trend Line Helper

Postby Cactus » Thu Apr 06, 2017 9:19 pm

Can this issue of lines not being drawn if historical candles with the points are not seen be fixed?
Also, I don't know if all lines draw correctly? The trend line helper line does not look the same as normal line object (different slope)
Last edited by Cactus on Wed Apr 19, 2017 7:05 pm, edited 1 time in total.
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Initiate
 
Posts: 158
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Re: Trend Line Helper

Postby Cactus » Thu Apr 06, 2017 10:49 pm

Also can you create a sample strategy template with this indicator so I can learn from it since I cannot add this indicator into FX Wizard for some reason.
Let the user decide parameters (level1, level2, date1, date2, extend = true) and when price cross below line, buy and if it goes above, sell
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Initiate
 
Posts: 158
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Re: Trend Line Helper

Postby Apprentice » Mon Apr 10, 2017 7:06 am

Your request is added to the development list, Under Id Number 3778
If someone is interested to do this task, please contact me.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 15156
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Trend Line Helper

Postby Apprentice » Wed Apr 19, 2017 1:25 pm

Try this version.
Trend Line Helper.lua
(4.3 KiB) Downloaded 9 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 15156
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Trend Line Helper

Postby Cactus » Wed Apr 19, 2017 7:07 pm

Lovely thank you, now I can paste the numbers instead of putting them in by clicking on calendar
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Initiate
 
Posts: 158
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Previous

Return to Custom Indicators

Who is online

Users browsing this forum: DNoCCIA75 and 9 guests