william17_strategy

Strategies are published here.

Moderator: admin

william17_strategy

Postby Apprentice » Fri Nov 01, 2019 7:29 am

1.png

2.png

Based on request.
viewtopic.php?f=27&t=68927
william17_strategy.lua
(132.57 KiB) Downloaded 57 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 23258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: william17_strategy

Postby william17 » Mon Nov 04, 2019 6:38 pm

Hello Apprentice,

thank you for your work,
But we have a problem with the open position with SAR,
The change SAR UP / SAR DOWN is not respected


So, it is possible to replace by the following idea:
enterLongAction.IsPass = function (source, period, periodFromLast, data)
return source.close[period] > SAR.DOWN:hasData(period)
and source.close[period - 1] < SAR.UP:hasData(period - 1)
and source.close[period] > Ichimoku.SA[period]
and source.close[period] > Ichimoku.SB[period]
and RSI.DATA[period - 1] < rsi_entry_level;
and ADX.DATA[period] > 25;
end

And
enterShortAction.IsPass = function (source, period, periodFromLast, data)
return source.close[period] < SAR.UP:hasData(period)
and source.close[period - 1] > SAR.DOWN:hasData(period - 1)
and source.close[period] < Ichimoku.SA[period]
and source.close[period] < Ichimoku.SB[period]
and RSI.DATA[period - 1] > rsi_entry_level;
and ADX.DATA[period] > 25;
end

As you can see, i have add the ADX indicators,
And for information, here are my settings in upload attachement,

Thank you for your help,
Attachments
Capture.PNG
settings
william17
 
Posts: 51
Joined: Wed Feb 08, 2017 9:24 am

Re: william17_strategy

Postby william17 » Wed Nov 13, 2019 7:43 am

Hello Apprentice,

Ok may be you can't help about my last post,
It doesn't matter,

But i have a problem with your algorithm,
Indeed, when i load it in Notepad++ to do some changes, and when i save it, this saved file dosen't appear in the custom files strategy!!??

Have you an idea please?
william17
 
Posts: 51
Joined: Wed Feb 08, 2017 9:24 am

Re: william17_strategy

Postby Apprentice » Wed Nov 13, 2019 3:37 pm

1. Request
Your request is added to the development list.
Development reference 313.
2. Request
Without access to your modifications, I won't be able to help you.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 23258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: william17_strategy

Postby william17 » Wed Nov 13, 2019 6:04 pm

Thank you for your reply and for the first request

And for the second request, my modifications are only the formule to open a trade (with one indicator added, ADX)

So to explain that well, here in uploaded files,
the first file on which i have worked on (your file, namely "william17_strategy"),
and the second file on which i have made some changes (namely "william1_strategy")

I will be very happy if you could tell me why when i save it with notepad++ after it doesn't appear in the custom file strategy of marketscope…

Thany you very much
Attachments
william17_strategy.lua
first file
(132.57 KiB) Downloaded 27 times
william1_strategy.lua
second file
(132.96 KiB) Downloaded 30 times
william17
 
Posts: 51
Joined: Wed Feb 08, 2017 9:24 am

Re: william17_strategy

Postby Apprentice » Thu Nov 14, 2019 11:25 am

изображение (1).png

1. Use of adx_period instead of ADX_N parameter
2. ";" symbol in an inappropriate place (use VScode with Indicore extension installed, it'll highlight such errors)
3. source.close[period] > SAR.DOWN:hasData(period) This is incorrect as well. SAR does have DN and UP streams. You are using DOWN. hasData checks whether there is value in DN stream (DN stream has a value when SAR below the price).
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 23258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: william17_strategy

Postby william17 » Fri Nov 15, 2019 11:58 am

Thank you very much for your clarification,

So i did some tests…
Some parts works well, and others no...
Focusing only on the change of SAR indicator, how we can write the formule to have a good work?

Because even with your first version, the open positions don't follow the change of SAR…

Could you help me on this point please?
william17
 
Posts: 51
Joined: Wed Feb 08, 2017 9:24 am

Re: william17_strategy

Postby william17 » Thu Nov 21, 2019 12:32 pm

Hello Apprentice,

I would like to know if you have a solution to make work well the change SAR UP / SAR DOWN…

I have done several tests, i can't do it ?

Yet, i have tried several things, but without success…

Know you how we can use the change SAR UP / SAR DOWN (and only that) to have a good work ?

Thank you
william17
 
Posts: 51
Joined: Wed Feb 08, 2017 9:24 am


Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 7 guests