ALLOWEDSIDE read from text

Moderator: admin

ALLOWEDSIDE read from text

Postby conjure » Mon Aug 14, 2017 11:42 am

Code: Select all
    strategy.parameters:addString("ALLOWEDSIDE", "Allowed side", "Allowed side for trading or signaling, can be Sell, Buy or Both", "Both");
    strategy.parameters:addStringAlternative("ALLOWEDSIDE", "Both", "", "Both");
    strategy.parameters:addStringAlternative("ALLOWEDSIDE", "Buy", "", "Buy");
    strategy.parameters:addStringAlternative("ALLOWEDSIDE", "Sell", "", "Sell");

Is it possible to give a value to the strategy to decide on which side it will play by reading a text on my computer?
Z:\PC1\TrendDn.txt
Z:\PC1\TrendUp.txt

So if there is a TrendDn.txt on Dir Z:\PC1\ play only Sell
and if there is a TrendUp.txt on Dir Z:\PC1\ play only Buy?
conjure
FXCodeBase: Initiate
 
Posts: 135
Joined: Sat Jul 22, 2017 7:27 am


Re: ALLOWEDSIDE read from text

Postby conjure » Fri Aug 18, 2017 11:03 am

What i need to add to the code to do it?
Is it simple?
conjure
FXCodeBase: Initiate
 
Posts: 135
Joined: Sat Jul 22, 2017 7:27 am

Re: ALLOWEDSIDE read from text

Postby Apprentice » Wed Aug 23, 2017 4:11 am

Give me an example will try to find someone to code it.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: ALLOWEDSIDE read from text

Postby conjure » Sat Aug 26, 2017 10:27 am

Stochastic Fast Strategy with Filters.lua
conjure
FXCodeBase: Initiate
 
Posts: 135
Joined: Sat Jul 22, 2017 7:27 am


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 12 guests