hi everybody,
i know the code for a AWSM strategy as follows:
// Type histogramme
ChaosAO=Average[5](MedianPrice)-Average[34](MedianPrice)
// Chaos Awsome Oscillator Signal Line
ChaosAOSignalLine=Average[5](Average[5](MedianPrice)-Average[34](MedianPrice))
i have the following question or what is the code on the following (on dax , 30 minutes )
AWSM is <0
the system should buy if the colour on a balk changes to green ?
thx for any support on that
I do not see any green color in your code, please provide at least an example with a picture to perfectly understand what you need 🙂 Thanks in advance.
hi Nicolas , thx for your mail…
on the code there is no code, thats correct.
the colour changes are only visible on a chart on the indicator awsm (5,34) …thats why i am asking how a code has to look like
when the colour changes for example from red to green in the negative territorium of the awsm ….if so the system should by 1 contract mini DAX in the 30min chart….with %ploss 0,30%
thx for any support
If I don’t apply color myself, I can’t know what is the variable that change color and how? That’s why I asked you to post a picture 🙂
Anyway, color changing are usually made if a variable make a higher high or a lower low ( a u-turn). So for the Chaos Awsome Oscillator Signal Line, it could be code like this:
// Type histogramme
ChaosAO=Average[5](MedianPrice)-Average[34](MedianPrice)
// Chaos Awsome Oscillator Signal Line
ChaosAOSignalLine=Average[5](Average[5](MedianPrice)-Average[34](MedianPrice))
if ChaosAOSignalLine>ChaosAOSignalLine[1] and ChaosAOSignalLine[1]<ChaosAOSignalLine[2] then
// buy or whatever you want here!
endif
Don’t forget to add the condition about the positive / negative territories which I don’t understand well…
hi Nicolas ,
thx so far …havent found the time to sent a screenshot …try to do this in the late afternoon ..
negative teritorium means if awsm <0....system should buy if awsm <0 and if coulour changes from red to green ...
thx so far
buy the way how can i do a screenshot for the awsm out of the chart ?
hi Nicolas,
there is a mistake in your code…
the system shows the following:
syntax mistake=chaosao is not existing
hi nicolas , attached with the awsm chart to understand the colour change…
ok, so let’s restart it from scratch, I made this little indicator to spot buy signals:
ChaosAO=Average[5](MedianPrice)-Average[34](MedianPrice)
r=255
g=0
if ChaosAO>ChaosAO[1] then
r=0
g=255
endif
if ChaosAO>ChaosAO[1] and ChaosAO[1]<ChaosAO[2] and ChaosAO<0 then
drawarrowup(barindex,ChaosAO)
endif
return ChaosAO coloured(r,g,0) style(histogram)
and this is the adapted code to add into an automated trading strategy code:
ChaosAO=Average[5](MedianPrice)-Average[34](MedianPrice)
if ChaosAO>ChaosAO[1] and ChaosAO[1]<ChaosAO[2] and ChaosAO<0 then
buy 1 contract at market
endif
There’s no need of the signal line, only the histogram is important as per your description. Hope it’s ok now 🙂
thx nicolas for your ongoing support … i will check the code this week …i am not the big tecknic freek ….i really have problems in communicate these things …. it took hours to get the chart as an attachement ….and i am not sure if i am able to that for a next time ….. but anyway …big thanks to you
soory nicolas …no succes …. system shows the info ” DRAWWARROWUP” can only be used at probuilder …..
You did not read my post obviously. Please don’t only copy/paste things and try to understand them! :angry:
I made this little indicator to spot buy signals:
So, that would mean that “this is the code of an indicator, use it as an INDICATOR, because this is an INDICATOR, not an AUTOMATED TRADING STRATEGY FOR PROORDER”
and this is the adapted code to add into an automated trading strategy code:
And that sentence should be read as “COPY/PASTE THIS CODE IN A PROORDER WINDOW TO MAKE THINGS HAPPEN! HAPPY CHRISTMAS YA ALL!”
so that means a automated trading strategy has the following code ?
ChaosAO=Average[5](MedianPrice)-Average[34](MedianPrice)
if ChaosAO>ChaosAO[1] and ChaosAO[1]
Ok, let’s copy/paste this code into your platform and you’ll be ok:
defparam cumulateorders=false
ChaosAO=Average[5](MedianPrice)-Average[34](MedianPrice)
if ChaosAO>ChaosAO[1] and ChaosAO[1]<ChaosAO[2] and ChaosAO<0 then
buy 1 contract at market
endif
set target pprofit 30
set stop ploss 30
Change the stoploss and takeprofit values as you want.
hi Nicolas, how has the code to be, if the above mentioned code should be the other way around…so a sellshort code
thx
regards
- You must be logged in to reply to this topic.