Page 1 of 1

ALLOWEDSIDE read from text

PostPosted: Mon Aug 14, 2017 11:42 am
by conjure
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?

Re: ALLOWEDSIDE read from text

PostPosted: Thu Aug 17, 2017 2:40 am
by Apprentice

Re: ALLOWEDSIDE read from text

PostPosted: Fri Aug 18, 2017 11:03 am
by conjure
What i need to add to the code to do it?
Is it simple?

Re: ALLOWEDSIDE read from text

PostPosted: Wed Aug 23, 2017 4:11 am
by Apprentice
Give me an example will try to find someone to code it.

Re: ALLOWEDSIDE read from text

PostPosted: Sat Aug 26, 2017 10:27 am
by conjure
Stochastic Fast Strategy with Filters.lua