Help needed in coding afl - AmiBroker | futures io social trading
futures io futures trading


Help needed in coding afl
Started: by milkysahai001 Views / Replies:548 / 0
Last Reply: Attachments:0

Welcome to futures io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.


You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Reply
 
Thread Tools Search this Thread
 

Help needed in coding afl

  #1 (permalink)
Trading Apprentice
Agra+India
 
Futures Experience: Beginner
Platform: MultiCharts, AmiBroker
Favorite Futures: Stock Futures
 
Posts: 39 since Sep 2016
Thanks: 12 given, 3 received

Help needed in coding afl

below is my simple stochastics strategy.i am using this on symphony presto amifuse trading on this bar close price.
i want the trades to take place on next bar open price. but not able to do so. i have also attached the code for presto amifuse- for signal generation.
please help me in getting signals on next bar open.


P=Param("Periods", 14, 5, 30, 1);
PD=Param("Oscillator Avg", 3, 3, 30, 1);
PD1=Param("Smooth1", 3, 3, 30, 1);

res=HHV(H,P);
sup=LLV(L,P);
avd=IIf(C>Ref(res,(RP*-1)), 1, IIf(C<Ref(sup,(RP*-1)), -1, 0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,sup,res);
Plot(tsl, "trend", colorWhite, styleStaircase);

A=Close;
B=(A-LLV(L,P))/(HHV(H,P)-LLV(L,P));
D=MA(B,PD);
D1=MA(D, PD1);

Buy=((Cross(D, D1) AND avn==1));
Sell=D<D1;
Short=((Cross(D1, D) AND avn==-1));
Cover=D>D1;

Buy=ExRem(Buy, Sell);
Sell=ExRem(Sell, Buy);
Short=ExRem(Short, Cover);
Cover=ExRem(Cover, Short);

PlotShapes(IIf(LongSignal, shapeUpArrow, shapeNone), colorWhite);
PlotShapes(IIf(ShortSignal, shapeDownArrow, shapeNone), colorYellow);
PlotShapes(IIf(Sellsignal, shapeStar, shapeNone), colorYellow);
PlotShapes(IIf(CoverSignal, shapeStar, shapeNone), colorWhite);

_SECTION_BEGIN("presto1");
a2=(Sell);
a4=(Cover);
a1=(Buy);
a3=(Short);
a5=Ref(C,-1);
a6=Ref(C,-1);
a7=0;

if(a2[BarCount-2]==1)
{
SellToFuse(a5[BarCount-1],a6[BarCount-2]);
}

if(a4[BarCount-2]==1)
{
CoverToFuse(a5[BarCount-1],a6[BarCount-2]);
}

if(a1[BarCount-2]==1)
{
BuyToFuse(a5[BarCount-1],a7[BarCount-2]);
}
if(a3[BarCount-2]==1)
{
ShortToFuse(a6[BarCount-1],a7[BarCount-2]);
}
_SECTION_END();

Reply With Quote

Reply



futures io > > > > Help needed in coding afl

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

Market Analysis w/Dave Forss @ IQFeed

Apr 25
 

Introducing iSystems with Stage 5 Trading

Apr 27

*NEW* FIO Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

May

Prototyping Python Strategies (part 2) w/Ran Aroussi

Elite only

Ask Me Anything w/Raymond Deux @ NinjaTrader

May 3

An Afternoon with FIO member Softsoap

Elite only
 

Machine Learning & Data Mining Bias w/Kris Longmore @ Robot Wealth

Elite only

Brannigan Barrett (TBA)

Elite only

FIO member Gomi (TBA)

Elite only

FuturesTrader71 (TBA)

Elite only

EasyLanguage Programming w/Chris @ ABC Trading Group

Elite only

Portfolio Diversification w/Brendon Delate

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed for NT7 coding mphoenix NinjaTrader Programming 2 December 18th, 2016 05:41 PM
help needed in coding a variable in afl. milkysahai001 AmiBroker 6 December 15th, 2016 04:54 AM
help needed in coding some variables in easy/powerlanguage! milkysahai001 MultiCharts 3 November 16th, 2016 04:49 AM
Little coding help needed Abde NinjaTrader 8 April 10th, 2014 11:45 AM
Stochastics coding help needed! RodS NinjaTrader Programming 33 October 24th, 2009 05:58 PM


All times are GMT -4. The time now is 07:00 PM.

no new posts
Page generated 2017-04-24 in 0.06 seconds with 21 queries on phoenix via your IP 23.20.24.116